Skip to content

Commit 3c36763

Browse files
nbaztectgmichel
authored andcommitted
upgrade to v0.9.37 (moonbeam-foundation#2072)
* upgrade to v0.9.37 * fix tests * update frontier * fix tests * add root-testing pallet * add call_index * Fix tracing reference hash --------- Co-authored-by: tgmichel <[email protected]>
1 parent 2581164 commit 3c36763

File tree

107 files changed

+3054
-2007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3054
-2007
lines changed

Cargo.lock

Lines changed: 2014 additions & 1082 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/rpc-core/trace/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "0.6.0"
1010
[dependencies]
1111
ethereum-types = "0.14"
1212
futures = { version = "0.3.1", features = [ "compat" ] }
13-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
13+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1414
moonbeam-client-evm-tracing = { path = "../../evm-tracing" }
1515
moonbeam-rpc-core-types = { path = "../types" }
1616
serde = { version = "1.0", features = [ "derive" ] }

client/rpc-core/txpool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ version = "0.6.0"
1010
[dependencies]
1111
ethereum = { version = "0.14.0", default-features = false, features = [ "with-codec" ] }
1212
ethereum-types = "0.14"
13-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
13+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1414
serde = { version = "1.0", features = [ "derive" ] }
1515
serde_json = "1.0"
1616

17-
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
17+
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }

client/rpc/debug/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "0.1.0"
1010
[dependencies]
1111
futures = { version = "0.3", features = [ "compat" ] }
1212
hex-literal = "0.3.4"
13-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
13+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1414
tokio = { version = "1.10", features = [ "sync", "time" ] }
1515

1616
# Moonbeam
@@ -32,7 +32,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad
3232
# Frontier
3333
ethereum = { version = "0.14.0", default-features = false, features = [ "with-codec" ] }
3434
ethereum-types = "0.14"
35-
fc-consensus = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
36-
fc-db = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
37-
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32", features = [ "rpc_binary_search_estimate" ] }
38-
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
35+
fc-consensus = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }
36+
fc-db = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }
37+
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37", features = [ "rpc-binary-search-estimate" ] }
38+
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }

client/rpc/debug/src/lib.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
1616
use futures::{SinkExt, StreamExt};
17-
use jsonrpsee::core::RpcResult;
17+
use jsonrpsee::core::{async_trait, RpcResult};
1818
pub use moonbeam_rpc_core_debug::{DebugServer, TraceParams};
1919

2020
use tokio::{
@@ -62,7 +62,7 @@ impl Debug {
6262
}
6363
}
6464

65-
#[jsonrpsee::core::async_trait]
65+
#[async_trait]
6666
impl DebugServer for Debug {
6767
/// Handler for `debug_traceTransaction` request. Communicates with the service-defined task
6868
/// using channels.
@@ -150,7 +150,7 @@ where
150150
raw_max_memory_usage: usize,
151151
) -> (impl Future<Output = ()>, DebugRequester) {
152152
let (tx, mut rx): (DebugRequester, _) =
153-
sc_utils::mpsc::tracing_unbounded("debug-requester");
153+
sc_utils::mpsc::tracing_unbounded("debug-requester", 100_000);
154154

155155
let fut = async move {
156156
loop {
@@ -320,7 +320,10 @@ where
320320
// Get Blockchain backend
321321
let blockchain = backend.blockchain();
322322
// Get the header I want to work with.
323-
let header = match client.header(reference_id) {
323+
let Ok(hash) = client.expect_block_hash_from_id(&reference_id) else {
324+
return Err(internal_err("Block header not found"))
325+
};
326+
let header = match client.header(hash) {
324327
Ok(Some(h)) => h,
325328
_ => return Err(internal_err("Block header not found")),
326329
};
@@ -357,7 +360,7 @@ where
357360

358361
// Get block extrinsics.
359362
let exts = blockchain
360-
.body(reference_id)
363+
.body(hash)
361364
.map_err(|e| internal_err(format!("Fail to read blockchain db: {:?}", e)))?
362365
.unwrap_or_default();
363366

@@ -452,7 +455,10 @@ where
452455
// Get Blockchain backend
453456
let blockchain = backend.blockchain();
454457
// Get the header I want to work with.
455-
let header = match client.header(reference_id) {
458+
let Ok(reference_hash) = client.expect_block_hash_from_id(&reference_id) else {
459+
return Err(internal_err("Block header not found"))
460+
};
461+
let header = match client.header(reference_hash) {
456462
Ok(Some(h)) => h,
457463
_ => return Err(internal_err("Block header not found")),
458464
};
@@ -461,7 +467,7 @@ where
461467

462468
// Get block extrinsics.
463469
let exts = blockchain
464-
.body(reference_id)
470+
.body(reference_hash)
465471
.map_err(|e| internal_err(format!("Fail to read blockchain db: {:?}", e)))?
466472
.unwrap_or_default();
467473

client/rpc/finality/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "0.1.0"
1010

1111
[dependencies]
1212
futures = { version = "0.3", features = [ "compat" ] }
13-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
13+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1414
parity-scale-codec = "3.0.0"
1515
tokio = { version = "1.12.0", features = [ "sync", "time" ] }
1616

client/rpc/manual-xcm/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ version = "0.1.0"
1111
flume = "0.10.9"
1212
futures = { version = "0.3", features = [ "compat" ] }
1313
hex-literal = "0.3.3"
14-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
14+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1515
parity-scale-codec = "3.0.0"
1616
tokio = { version = "1.12.0", features = [ "sync", "time" ] }
17-
xcm = { git = "https://github.com/purestake/polkadot", branch = "moonbeam-polkadot-v0.9.32", default-features = false }
17+
xcm = { git = "https://github.com/purestake/polkadot", branch = "moonbeam-polkadot-v0.9.37", default-features = false }
1818

19-
cumulus-primitives-core = { git = "https://github.com/purestake/cumulus", branch = "moonbeam-polkadot-v0.9.32" }
19+
cumulus-primitives-core = { git = "https://github.com/purestake/cumulus", branch = "moonbeam-polkadot-v0.9.37" }

client/rpc/trace/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version = "0.6.0"
1111
ethereum = { version = "0.14.0", features = [ "with-codec" ] }
1212
ethereum-types = "0.14"
1313
futures = { version = "0.3" }
14-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
14+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1515
serde = { version = "1.0", features = [ "derive" ] }
1616
sha3 = "0.10"
1717
tokio = { version = "1.10", features = [ "sync", "time" ] }
@@ -36,7 +36,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v
3636
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
3737

3838
# Frontier
39-
fc-consensus = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
40-
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32", features = [ "rpc_binary_search_estimate" ] }
41-
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
42-
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32" }
39+
fc-consensus = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }
40+
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37", features = [ "rpc-binary-search-estimate" ] }
41+
fc-rpc-core = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }
42+
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37" }

client/rpc/trace/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,9 @@ where
127127
continue; // no traces for genesis block.
128128
}
129129

130-
let block_id = BlockId::<B>::Number(block_height);
131-
let block_header = self
130+
let block_hash = self
132131
.client
133-
.header(block_id)
132+
.hash(block_height)
134133
.map_err(|e| {
135134
format!(
136135
"Error when fetching block {} header : {:?}",
@@ -139,8 +138,6 @@ where
139138
})?
140139
.ok_or_else(|| format!("Block with height {} don't exist", block_height))?;
141140

142-
let block_hash = block_header.hash();
143-
144141
block_hashes.push(block_hash);
145142
}
146143

@@ -448,7 +445,7 @@ where
448445
) -> (impl Future<Output = ()>, CacheRequester) {
449446
// Communication with the outside world :
450447
let (requester_tx, mut requester_rx) =
451-
sc_utils::mpsc::tracing_unbounded("trace-filter-cache");
448+
sc_utils::mpsc::tracing_unbounded("trace-filter-cache", 100_000);
452449

453450
// Task running in the service.
454451
let task = async move {
@@ -782,7 +779,7 @@ where
782779
// Get Subtrate block data.
783780
let api = client.runtime_api();
784781
let block_header = client
785-
.header(substrate_block_id)
782+
.header(substrate_hash)
786783
.map_err(|e| {
787784
format!(
788785
"Error when fetching substrate block {} header : {:?}",
@@ -825,7 +822,7 @@ where
825822
// Get extrinsics (containing Ethereum ones)
826823
let extrinsics = backend
827824
.blockchain()
828-
.body(substrate_block_id)
825+
.body(substrate_hash)
829826
.map_err(|e| {
830827
format!(
831828
"Blockchain error when fetching extrinsics of block {} : {:?}",

client/rpc/txpool/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/PureStake/moonbeam/"
88
version = "0.6.0"
99

1010
[dependencies]
11-
jsonrpsee = { version = "0.15.0", default-features = false, features = [ "macros", "server" ] }
11+
jsonrpsee = { version = "0.16.2", default-features = false, features = [ "macros", "server" ] }
1212
rlp = "0.5"
1313
serde = { version = "1.0", features = [ "derive" ] }
1414
sha3 = "0.10"
@@ -29,4 +29,4 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v
2929

3030
# Frontier
3131
ethereum-types = "0.14"
32-
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.32", features = [ "rpc_binary_search_estimate" ] }
32+
fc-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.37", features = [ "rpc-binary-search-estimate" ] }

0 commit comments

Comments
 (0)