Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable blocking RPC methods #1032

Merged
merged 8 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock

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

3 changes: 3 additions & 0 deletions bin/citrea/provers/risc0/guest-mock/Cargo.lock

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

1 change: 1 addition & 0 deletions crates/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sov-state = { path = "../sovereign-sdk/module-system/sov-state" }
citrea-primitives = { path = "../primitives" }

anyhow = { workspace = true }
async-trait = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
clap = { workspace = true, optional = true }
hex = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions crates/evm/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub struct EstimatedDiffSize {
#[rpc_gen(client, server)]
impl<C: sov_modules_api::Context> Evm<C> {
/// Handler for `net_version`
#[rpc_method(name = "net_version")]
#[rpc_method(name = "net_version", blocking)]
rakanalh marked this conversation as resolved.
Show resolved Hide resolved
rakanalh marked this conversation as resolved.
Show resolved Hide resolved
pub fn net_version(&self, working_set: &mut WorkingSet<C>) -> RpcResult<String> {
debug!("evm module: net_version");

Expand All @@ -106,7 +106,7 @@ impl<C: sov_modules_api::Context> Evm<C> {

/// Handler for: `eth_chainId`
#[rpc_method(name = "eth_chainId")]
pub fn chain_id(&self, working_set: &mut WorkingSet<C>) -> RpcResult<Option<U64>> {
pub async fn chain_id(&self, working_set: &mut WorkingSet<C>) -> RpcResult<Option<U64>> {
rakanalh marked this conversation as resolved.
Show resolved Hide resolved
rakanalh marked this conversation as resolved.
Show resolved Hide resolved
tracing::debug!("evm module: eth_chainId");

let chain_id = reth_primitives::U64::from(
Expand Down Expand Up @@ -613,7 +613,7 @@ impl<C: sov_modules_api::Context> Evm<C> {
/// Handler for: `eth_call`
//https://github.com/paradigmxyz/reth/blob/f577e147807a783438a3f16aad968b4396274483/crates/rpc/rpc/src/eth/api/transactions.rs#L502
//https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc-types/src/eth/call.rs#L7
#[rpc_method(name = "eth_call")]
#[rpc_method(name = "eth_call", blocking)]
pub fn get_call(
&self,
request: reth_rpc_types::TransactionRequest,
Expand Down Expand Up @@ -712,7 +712,7 @@ impl<C: sov_modules_api::Context> Evm<C> {
}

/// Handler for `eth_createAccessList`
#[rpc_method(name = "eth_createAccessList")]
#[rpc_method(name = "eth_createAccessList", blocking)]
pub fn create_access_list(
&self,
request: reth_rpc_types::TransactionRequest,
Expand Down Expand Up @@ -902,7 +902,7 @@ impl<C: sov_modules_api::Context> Evm<C> {

/// Handler for: `eth_estimateGas`
// https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc/src/eth/api/call.rs#L172
#[rpc_method(name = "eth_estimateGas")]
#[rpc_method(name = "eth_estimateGas", blocking)]
pub fn eth_estimate_gas(
&self,
request: reth_rpc_types::TransactionRequest,
Expand All @@ -916,7 +916,7 @@ impl<C: sov_modules_api::Context> Evm<C> {
}

/// Handler for: `eth_estimateDiffSize`
#[rpc_method(name = "eth_estimateDiffSize")]
#[rpc_method(name = "eth_estimateDiffSize", blocking)]
pub fn eth_estimate_diff_size(
&self,
request: reth_rpc_types::TransactionRequest,
Expand Down
1 change: 1 addition & 0 deletions crates/soft-confirmation-rule-enforcer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ sov-rollup-interface = { path = "../sovereign-sdk/rollup-interface" }
sov-state = { path = "../sovereign-sdk/module-system/sov-state" }

anyhow = { workspace = true }
async-trait = { workspace = true }
borsh = { workspace = true }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
serde = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ license = { workspace = true }
repository = { workspace = true }

version = { workspace = true }
readme = "README.md"
publish = false
readme = "README.md"
resolver = "2"

[dependencies]
async-trait = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
serde = { workspace = true, optional = true }
sov-modules-api = { path = "../../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../../sov-state" }
serde = { workspace = true, optional = true }
borsh = { workspace = true, features = ["rc"] }

[dev-dependencies]
tempfile = { workspace = true }
sov-prover-storage-manager = { path = "../../../../full-node/sov-prover-storage-manager", features = ["test-utils"] }
tempfile = { workspace = true }

[features]
default = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
[package]
name = "sov-value-setter"
description = "A Sovereign SDK example module for setting/reading value from state"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "A Sovereign SDK example module for setting/reading value from state"

version = { workspace = true }
publish = false
readme = "README.md"
resolver = "2"
publish = false


[dev-dependencies]
tempfile = { workspace = true }
sov-modules-api = { path = "../../../sov-modules-api", features = ["native"] }
sov-prover-storage-manager = { path = "../../../../full-node/sov-prover-storage-manager", features = ["test-utils"] }

tempfile = { workspace = true }

[dependencies]
anyhow = { workspace = true }
sov-modules-api = { path = "../../../sov-modules-api" }
sov-state = { path = "../../../sov-state" }
async-trait = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
clap = { workspace = true, optional = true }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
sov-modules-api = { path = "../../../sov-modules-api" }
sov-state = { path = "../../../sov-state" }
thiserror = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
clap = { workspace = true, optional = true }

[features]
default = ["native"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
[package]
name = "sov-vec-setter"
description = "A Sovereign SDK example module for setting/reading vectors from state"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "A Sovereign SDK example module for setting/reading vectors from state"

version = { workspace = true }
publish = false
readme = "README.md"
resolver = "2"
publish = false

[dev-dependencies]
tempfile = { workspace = true }
sov-modules-api = { path = "../../../sov-modules-api", features = ["native", "macros"] }
sov-prover-storage-manager = { path = "../../../../full-node/sov-prover-storage-manager", features = ["test-utils"] }
tempfile = { workspace = true }

[dependencies]
anyhow = { workspace = true }
sov-modules-api = { path = "../../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../../sov-state", default-features = false }
async-trait = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
clap = { workspace = true, optional = true }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
sov-modules-api = { path = "../../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../../sov-state", default-features = false }
thiserror = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
clap = { workspace = true, optional = true }

[features]
default = ["native"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "sov-accounts"
description = "A Sovereign SDK module for managing rollup state using accounts"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "A Sovereign SDK module for managing rollup state using accounts"

version = { workspace = true }
readme = "README.md"
Expand All @@ -14,49 +14,41 @@ resolver = "2"
[dependencies]
anyhow = { workspace = true }
arbitrary = { workspace = true, optional = true }
async-trait = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
clap = { workspace = true, optional = true }
jsonrpsee = { workspace = true, features = ["macros", "client-core", "server"], optional = true }
proptest = { workspace = true, optional = true }
proptest-derive = { workspace = true, optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
thiserror = { workspace = true }
clap = { workspace = true, optional = true }
jsonrpsee = { workspace = true, features = [
"macros",
"client-core",
"server",
], optional = true }

sov-modules-api = { path = "../../sov-modules-api", default-features = false, features = [
"macros",
] }
sov-modules-api = { path = "../../sov-modules-api", default-features = false, features = ["macros"] }
sov-state = { path = "../../sov-state" }


[dev-dependencies]
sov-prover-storage-manager = { path = "../../../full-node/sov-prover-storage-manager", features = ["test-utils"] }
tempfile = { workspace = true }
sov-prover-storage-manager = { path = "../../../full-node/sov-prover-storage-manager", features = [
"test-utils",
] }

[features]
default = ["native"]
arbitrary = [
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",
"sov-state/arbitrary",
"sov-modules-api/arbitrary",
"sov-state/arbitrary",
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",
"sov-state/arbitrary",
"sov-modules-api/arbitrary",
"sov-state/arbitrary",
]
native = [
"serde",
"serde_json",
"jsonrpsee",
"schemars",
"clap",
"sov-state/native",
"sov-modules-api/native",
"serde",
"serde_json",
"jsonrpsee",
"schemars",
"clap",
"sov-state/native",
"sov-modules-api/native",
]
serde = []
Loading
Loading