Skip to content

Commit

Permalink
Merge branch 'main' into feat/da/exec/seq
Browse files Browse the repository at this point in the history
  • Loading branch information
popcnt1 authored Jan 11, 2025
2 parents fa32692 + 8bef814 commit 43478a4
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 133 deletions.
238 changes: 119 additions & 119 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ reqwest = { version = "0.12", features = ["json", "stream"] }
schemars = { version = "0.8.21", features = ["either"] }
serde = { version = "1.0.216", features = ["derive", "rc"] }
serde_bytes = "0.11.15"
serde_json = { version = "1.0.134", features = ["preserve_order"] }
serde_json = { version = "1.0.135", features = ["preserve_order"] }
serde_yaml = "0.9"
serde_with = { version = "2.1.0", features = ["hex"] }
signature = "2.2.0"
Expand All @@ -217,7 +217,7 @@ smallvec = "1.6.1"
thiserror = "1.0.69"
tiny-keccak = { version = "2", features = ["keccak", "sha3"] }
tiny-bip39 = "2.0.0"
tokio = { version = "1.42.0", features = ["full"] }
tokio = { version = "1.43.0", features = ["full"] }
tokio-tungstenite = { version = "0.24.0", features = ["native-tls"] }
tokio-stream = "0.1.17"
tracing = "0.1.41"
Expand Down Expand Up @@ -313,14 +313,14 @@ scopeguard = "1.1"
uuid = { version = "1.11.0", features = ["v4", "fast-rng"] }
protobuf = { version = "2.28", features = ["with-bytes"] }
rocksdb = { git = "https://github.com/rooch-network/rust-rocksdb.git", rev = "41d102327ba3cf9a2335d1192e8312c92bc3d6f9", features = ["lz4", "mt_static"] }
lz4 = { version = "1.28.0" }
lz4 = { version = "1.28.1" }
ripemd = { version = "0.1.3" }
fastcrypto-zkp = { version = "0.1.3" }
function_name = { version = "0.3.0" }
rustc-hash = { version = "2.1.0" }
xorf = { version = "0.11.0" }
vergen-git2 = { version = "1.0.0", features = ["build", "cargo", "rustc"] }
vergen-pretty = "0.3.6"
vergen-pretty = "0.3.7"
crossbeam-channel = "0.5.14"
inferno = "0.11.21"
handlebars = "4.2.2"
Expand Down
18 changes: 12 additions & 6 deletions crates/rooch-da/src/backend/openda/avail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const SUBMIT_API_PATH: &str = "v2/submit";

const TURBO_MIN_BACKOFF_DELAY: Duration = Duration::from_millis(500);
const TURBO_SUBMIT_API_PATH: &str = "user/submit_raw_data";
const DEFAULT_TURBO_PAYMENT_TOKEN: &str = "ethereum";

/// Avail client: A turbo and Light
/// Turbo client has higher priority, if not available, use the Light client
Expand Down Expand Up @@ -71,6 +72,7 @@ impl OpenDAAdapter for AvailFusionAdapter {
pub struct AvailFusionClientConfig {
pub turbo_endpoint: Option<String>,
pub turbo_auth_token: Option<String>,
pub turbo_payment_token: Option<String>,
pub light_endpoint: Option<String>,
pub max_retries: usize,
}
Expand All @@ -82,6 +84,7 @@ impl AvailFusionClientConfig {
) -> anyhow::Result<Self> {
let turbo_endpoint = scheme_config.get("turbo_endpoint").cloned();
let turbo_auth_token = scheme_config.get("turbo_auth_token").cloned();
let turbo_payment_token = scheme_config.get("turbo_payment_token").cloned();
let light_endpoint = scheme_config.get("light_endpoint").cloned();

if turbo_endpoint.is_none() && light_endpoint.is_none() {
Expand All @@ -95,6 +98,7 @@ impl AvailFusionClientConfig {
turbo_endpoint,
turbo_auth_token,
light_endpoint,
turbo_payment_token,
max_retries,
})
}
Expand All @@ -105,6 +109,9 @@ impl AvailFusionClientConfig {
endpoint,
self.max_retries,
self.turbo_auth_token.as_ref().unwrap(),
self.turbo_payment_token
.as_deref()
.unwrap_or(DEFAULT_TURBO_PAYMENT_TOKEN),
)?)
} else {
None
Expand All @@ -128,13 +135,15 @@ pub(crate) struct AvailTurboClient {
http_client: Client,
max_retries: usize,
auth_token: String,
payment_token: String,
}

impl AvailTurboClient {
pub(crate) fn new(
endpoint: &str,
max_retries: usize,
auth_token: &str,
payment_token: &str,
) -> anyhow::Result<Self> {
let client = Client::new();

Expand All @@ -143,6 +152,7 @@ impl AvailTurboClient {
http_client: client,
max_retries,
auth_token: auth_token.to_string(),
payment_token: payment_token.to_string(),
})
}

Expand Down Expand Up @@ -185,18 +195,14 @@ impl OpenDAAdapter for AvailTurboClient {
let mut attempts = 0;
let mut retry_delay = TURBO_MIN_BACKOFF_DELAY;

// token for turbo submit,
// will support more tokens in the future
const TOKEN: &str = "avail";

loop {
attempts += 1;
let request = self
.http_client
.post(&submit_url)
.query(&[("token", TOKEN.to_string())])
.query(&[("token", self.payment_token.clone())])
.bearer_auth(&self.auth_token)
.header("Content-Type", "application/json")
.header("Content-Type", "text/plain")
.body(segment_bytes.to_vec());

let response = request.send().await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/testsuite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ assert_cmd = "2.0"
cucumber = "0.21.1"
futures = { workspace = true }
testcontainers = { version = "0.15.0", git = "https://github.com/yubing744/testcontainers-rs", rev = "6b87dc53ab3bc6eb4d15c7e73a3c57dcbf40d0af" }
tokio = { version = "1.42", features = ["macros", "rt-multi-thread", "sync", "time"] }
tokio = { version = "1.43", features = ["macros", "rt-multi-thread", "sync", "time"] }
jpst = "0.1.1"
tracing = "0.1"
backtrace = "0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import PostHeader from "/components/blog/postHeader";

<PostHeader />

![](/blog/babylon-integration.jpg)

## What is Rooch Network?
Rooch Network is a native application layer for the Bitcoin ecosystem, based on the Stackable L2 solution, serving as the go-to Bitcoin assets launchpad and Bitcoin application infra for users and devs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import PostHeader from "/components/blog/postHeader";

<PostHeader />

![](/blog/babylon-integration.jpg)

## Rooch Network 是什么?
Rooch Network 是 Bitcoin 的原生应用层,基于堆叠式 L2 解决方案,为用户和开发者提供比特币资产的启动平台和比特币应用基础设施。

Expand Down
2 changes: 1 addition & 1 deletion docs/website/pages/blog/bug-bounty3.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The total reward pool for this program is **$200,000**. Rewards will be allocate

## Program Duration

End date: 12 pm, Feb 8th (UTC+8)
Until the mainnet goes online!

We will carefully evaluate each report and contact you within a reasonable time frame.

Expand Down
2 changes: 1 addition & 1 deletion docs/website/pages/blog/bug-bounty3.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Rooch Network 第二期漏洞赏金获得了各领域开发者及安全专家的

## 活动截止时间

2月8日晚上12点
直到主网上线!

我们将认真评估每一个报告,并在合理时间内与您联系。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ StoreConfig init store dir "/tmp/.tmpHkNH5Q/dev/roochdb/rooch_store" "/tmp/.tmpH

## 解决数据兼容问题

如果有遇到服务数据冲突的问题,首先执行清楚命令,再继续启动服务:
如果有遇到服务数据冲突的问题,首先执行清除命令,再继续启动服务:

```shell
$ rooch server clean
Expand Down
Binary file added docs/website/public/blog/babylon-integration.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 43478a4

Please sign in to comment.