Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

48 changes: 45 additions & 3 deletions relayer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ rustls = { version = "0.23.36", features = [
], default-features = false }
# Use a pinned version of fhevm gateway bindings contract as the feature branch is still unmerged.
fhevm_gateway_bindings = { git = "https://github.com/zama-ai/fhevm.git", rev = "aa25e2e089da3651f59b8c68a3d32865301ea6bf", default-features = false }
fhevm_host_bindings = { git = "https://github.com/zama-ai/fhevm.git", tag = "v0.11.0", default-features = false }
# Use a pinned version of fhevm host bindings contract as the feature branch is still unmerged.
fhevm_host_bindings = { git = "https://github.com/zama-ai/fhevm.git", rev = "2a6cf820b", default-features = false }
utoipa = { version = "5.4.0", features = ["axum_extras", "preserve_path_order"] }
utoipa-redoc = { version = "6.0.0", features = ["axum"] }
validator = { version = "0.20.0", features = ["derive"] }
Expand Down Expand Up @@ -87,3 +88,4 @@ tempfile = "3.25.0"
rand = "0.10.0"
rstest = "0.26.1"
serde_yaml = "0.9.34"
serial_test = "3.4.0"
7 changes: 7 additions & 0 deletions relayer/config/local.mainnet.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ host_chains:
url: "https://ethereum-rpc.publicnode.com"
acl_address: "0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6"

protocol_config:
ethereum_http_rpc_url: "https://ethereum-rpc.publicnode.com"
address: "TODO"
retry:
max_attempts: 3
retry_interval_ms: 200

gateway:
blockchain_rpc:
# MUST support method eth_sendRawTransactionSync
Expand Down
7 changes: 7 additions & 0 deletions relayer/config/local.testnet.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ host_chains:
url: "https://ethereum-sepolia-rpc.publicnode.com"
acl_address: "0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D"

protocol_config:
ethereum_http_rpc_url: "https://ethereum-sepolia-rpc.publicnode.com"
address: "TODO"
retry:
max_attempts: 3
retry_interval_ms: 200

gateway:
blockchain_rpc:
# MUST support method eth_sendRawTransactionSync
Expand Down
7 changes: 7 additions & 0 deletions relayer/config/local.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ host_chains:
url: "http://localhost:8545"
acl_address: "0x339EBB773A9bC1deCFfD5ef4BC7c907e26C1f836"

protocol_config:
ethereum_http_rpc_url: "http://localhost:8545"
address: "0x1234567890123456789012345678901234567890"
retry:
max_attempts: 3
retry_interval_ms: 200

gateway:
blockchain_rpc:
# MUST support method eth_sendRawTransactionSync
Expand Down
2 changes: 1 addition & 1 deletion relayer/docs/http-api-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ See [ID.md](ID.md) for detailed relationships.

Both POST (202) and GET (202) responses include a `Retry-After` header computed from real-time queue depth and drain rate — not a fixed value.

- Format: RFC 7231 timestamp for 429; seconds for 202
- Format: relative seconds for both 429 and 202
- POST: estimated from queue depth at submission time
- GET: estimated from the request's current position and processing stage
- See [dynamic-retry-after-design.md](dynamic-retry-after-design.md) for formulas and examples
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Add resolved_threshold column to user_decrypt_req.
-- Stores the dynamic threshold used when the write side marked the request as completed.
-- Nullable for backward compatibility: old software ignores this column, new rows get the value.
-- NULL means "use static config default" (for rows created before this migration).
ALTER TABLE user_decrypt_req ADD COLUMN resolved_threshold BIGINT;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe to enforce the NOT NULL constraint rule, we can set the current "static config default" instead of leaving it as NULL

3 changes: 2 additions & 1 deletion relayer/src/config/retry_after.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use serde::Deserialize;

use super::settings::AppConfigError;
use super::settings::{deserialize_vec_from_map_or_seq, AppConfigError};

/// Configuration for dynamic retry-after computation. All fields required.
#[derive(Debug, Deserialize, Clone)]
Expand All @@ -18,6 +18,7 @@ pub struct RetryAfterConfig {
pub nominal_times: NominalProcessingTimes,

/// Backoff intervals for ReceiptReceived state (Copro/KMS wait).
#[serde(deserialize_with = "deserialize_vec_from_map_or_seq")]
pub copro_kms_backoff_intervals: Vec<BackoffInterval>,
}

Expand Down
Loading
Loading