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

feat(l1): snap sync healing [WIP] #1455

Draft
wants to merge 341 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
341 commits
Select commit Hold shift + click to select a range
349d05f
Add byte limit
fmoletta Oct 31, 2024
4fd0ee5
Add request processing
fmoletta Oct 31, 2024
d02e8f2
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Oct 31, 2024
0575a44
Merge branch 'snap-storage-range' of github.com:lambdaclass/lambda_et…
fmoletta Oct 31, 2024
aa29e5f
Fix lingering conflicts
fmoletta Oct 31, 2024
89e144a
Save progress
fmoletta Oct 31, 2024
1d8c3f9
Progress
fmoletta Nov 1, 2024
ea34fbc
Progress
fmoletta Nov 1, 2024
e57f386
remove unused code
fmoletta Nov 1, 2024
0a31fc9
Handle wrong path input lens
fmoletta Nov 1, 2024
2c0e30e
Add restrictions
fmoletta Nov 1, 2024
b3c4816
Fix error handling
fmoletta Nov 1, 2024
80bbc30
clippy+fmt
fmoletta Nov 1, 2024
b7b978a
Add hive test
fmoletta Nov 1, 2024
f02d29a
Cleanup
fmoletta Nov 1, 2024
0e5a005
Draft
fmoletta Nov 1, 2024
003d445
:(
fmoletta Nov 1, 2024
23974bb
Fix code to handle nibbles properly
fmoletta Nov 1, 2024
b159f7d
Simplify code
fmoletta Nov 1, 2024
12b0268
refactor
fmoletta Nov 1, 2024
8e4c884
Remove debug code
fmoletta Nov 1, 2024
b80f19f
Cleanup code
fmoletta Nov 1, 2024
f03ef1e
Merge branch 'snap-bytecodes' into snap-trie-nodes
fmoletta Nov 1, 2024
098a584
Remove debug command
fmoletta Nov 1, 2024
9a57e37
Un-comment noisy info
fmoletta Nov 1, 2024
f54af1d
Update comment
fmoletta Nov 1, 2024
b307261
reorder
fmoletta Nov 1, 2024
9da6ec9
Cite sources
fmoletta Nov 1, 2024
8a0fbbb
Move funcs to encodings module
fmoletta Nov 1, 2024
200d014
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 4, 2024
2332889
Merge branch 'snap-storage-range' into snap-bytecodes
fmoletta Nov 4, 2024
1805ef6
Update workflow
fmoletta Nov 4, 2024
b270580
Update workflow
fmoletta Nov 4, 2024
6af2d6e
Merge branch 'snap-storage-range' into snap-bytecodes
fmoletta Nov 4, 2024
9ec2129
Update workflow
fmoletta Nov 4, 2024
2be03ee
Progress
fmoletta Nov 5, 2024
09f688b
Clippy
fmoletta Nov 5, 2024
f494ad9
Merge branch 'snap-storage-range' into snap-bytecodes
fmoletta Nov 5, 2024
64610c3
Merge branch 'snap-bytecodes' into snap-trie-nodes
fmoletta Nov 5, 2024
d3acbd4
Merge branch 'snap-trie-nodes' into validate-account-range
fmoletta Nov 5, 2024
824afbc
progress
fmoletta Nov 5, 2024
19c0bf0
Remove path field from BranchNode
fmoletta Nov 5, 2024
d32bb4e
Start dumb nibbles impl
fmoletta Nov 5, 2024
7cad9b6
Impl common_prefix
fmoletta Nov 5, 2024
3b69cd7
Update name & doc
fmoletta Nov 5, 2024
16d1432
Impl next
fmoletta Nov 5, 2024
d7c036f
Use DumbNibbles: LeafNode get & insert
fmoletta Nov 5, 2024
a2afdfd
Use DumbNibbles: ExtensionNode get & insert
fmoletta Nov 5, 2024
3a65df9
Make code compile
fmoletta Nov 5, 2024
43ae680
Fix node encoding for LeafNode
fmoletta Nov 5, 2024
e69e954
Fix leaf nibbles
fmoletta Nov 5, 2024
998ed51
Fix leaf partial when inserting to leaf
fmoletta Nov 6, 2024
3cfd7c4
Fixes
fmoletta Nov 6, 2024
ad40f23
Fix
fmoletta Nov 6, 2024
a41cf2b
Fix
fmoletta Nov 6, 2024
68d5f83
Fix
fmoletta Nov 6, 2024
275659a
Fix
fmoletta Nov 6, 2024
6e1b4b7
[DEBUG] Add debug prints
fmoletta Nov 6, 2024
167c591
[DEBUG] Add debug prints
fmoletta Nov 6, 2024
aad0bcf
Fix
fmoletta Nov 6, 2024
71357dd
[DEBUG] Add debug prints
fmoletta Nov 6, 2024
cd847b9
refactor: add next_choice method
fmoletta Nov 6, 2024
37c93d7
Simplify leaf node encoding
fmoletta Nov 7, 2024
92313f0
Simplify encoding of Leaf
fmoletta Nov 7, 2024
3eb5ee9
Simplify encoding of Extension
fmoletta Nov 7, 2024
eb4fd0c
Simplify encoding of Branch
fmoletta Nov 7, 2024
d50e0ff
Remove the NodeEncoder
fmoletta Nov 7, 2024
856224d
Clippy
fmoletta Nov 7, 2024
f713657
Update TrieIterator
fmoletta Nov 7, 2024
30ba82f
Add proptest
fmoletta Nov 7, 2024
21537d4
Remove old nibble representation
fmoletta Nov 7, 2024
28bd344
Rename DumbNibbles -> Nibbles
fmoletta Nov 7, 2024
c56ad04
Update some doc
fmoletta Nov 7, 2024
bebce62
Simplify BranchNode::remove
fmoletta Nov 7, 2024
08c6668
Simplify
fmoletta Nov 7, 2024
e1f032f
Update doc
fmoletta Nov 7, 2024
9dc2752
Fix unit test
fmoletta Nov 7, 2024
bbe367d
Fix test + code
fmoletta Nov 7, 2024
63f1645
Update test values
fmoletta Nov 7, 2024
237f291
Fix potential panick
fmoletta Nov 7, 2024
d5dfa30
Fix
fmoletta Nov 7, 2024
55b0c37
Fix unit tests
fmoletta Nov 7, 2024
01090b4
Remove outdated comment
fmoletta Nov 7, 2024
e1be0c6
[DEBUG] Remove debug prints
fmoletta Nov 7, 2024
bed25f7
Remove funny name test
fmoletta Nov 7, 2024
f2c2eef
doc nibbles module
fmoletta Nov 7, 2024
9050b0c
Remove todo
fmoletta Nov 7, 2024
345ae96
remove debug print
fmoletta Nov 7, 2024
0fa490f
avoid clone
fmoletta Nov 7, 2024
df62fab
Decode leaf & extension nodes
fmoletta Nov 8, 2024
de3695f
Decode branch nodesc
fmoletta Nov 8, 2024
cb92b60
Impl decode_raw for Node directly
fmoletta Nov 8, 2024
87994d3
Update test & remove impls for each node kind
fmoletta Nov 8, 2024
ec31d42
Clippy
fmoletta Nov 8, 2024
439a010
Remove unused fn
fmoletta Nov 8, 2024
69f583c
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 8, 2024
58d7cb0
Add doc comments
fmoletta Nov 8, 2024
797d486
Fix typos
fmoletta Nov 8, 2024
f2ea85f
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 8, 2024
34e2535
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 8, 2024
5b3f4b9
Merge branch 'decode_node' into validate-account-range
fmoletta Nov 11, 2024
b0beea8
Dont write nodes to DB if they are already inlined
fmoletta Nov 11, 2024
52fec40
Merge branch 'dont-store-if-inlined' into validate-account-range
fmoletta Nov 11, 2024
39b9d19
progress
fmoletta Nov 11, 2024
b2375ca
Save current progress
fmoletta Nov 12, 2024
04f94a3
Fix logic
fmoletta Nov 12, 2024
fc3ecc8
Fix logic
fmoletta Nov 12, 2024
774e1d1
Fix logic
fmoletta Nov 12, 2024
827439e
Add extension node logic to remove internal nodes
fmoletta Nov 12, 2024
377b794
Improve test
fmoletta Nov 12, 2024
185b884
Add comment
fmoletta Nov 12, 2024
2c8bb52
Add proptest
fmoletta Nov 12, 2024
76d719a
Add proptest
fmoletta Nov 12, 2024
9254ce8
Add test case
fmoletta Nov 12, 2024
0a27aab
rename func
fmoletta Nov 12, 2024
68661c9
Add doc
fmoletta Nov 12, 2024
fdcbc99
Add doc
fmoletta Nov 13, 2024
6f1e304
Add special case test
fmoletta Nov 13, 2024
925f536
Fix peripherial code
fmoletta Nov 13, 2024
f7f0bdb
Add proptest for special case: no keys
fmoletta Nov 13, 2024
0023b8a
Fix
fmoletta Nov 13, 2024
8e8dba3
Fix logic
fmoletta Nov 13, 2024
1a534cc
Fix logic
fmoletta Nov 13, 2024
6a9db29
Refactor has_right_element
fmoletta Nov 13, 2024
ff88780
Fix logic
fmoletta Nov 13, 2024
7583488
Unify criteria
fmoletta Nov 13, 2024
849a354
Refactor
fmoletta Nov 13, 2024
0908bd5
Clippy
fmoletta Nov 13, 2024
c445edc
Add doc
fmoletta Nov 13, 2024
ec13ce5
Reorder code + add doc
fmoletta Nov 13, 2024
2445f53
Fix logic
fmoletta Nov 13, 2024
16cb1b6
Check result in tests
fmoletta Nov 13, 2024
8151cef
Add tests for unsuccesful cases
fmoletta Nov 13, 2024
a7d5415
Add tests for unsuccesful cases
fmoletta Nov 13, 2024
6c9dd01
Add error handling
fmoletta Nov 13, 2024
87f2445
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 13, 2024
ad0f921
[Postpone] changes not related to the trie
fmoletta Nov 13, 2024
4fc5244
Fix
fmoletta Nov 13, 2024
dab6172
Remove debug code
fmoletta Nov 13, 2024
d02c374
Rename fn and module
fmoletta Nov 13, 2024
07e1f46
clippy
fmoletta Nov 13, 2024
2b36bbb
Update code
fmoletta Nov 13, 2024
2d711b6
Improve interface
fmoletta Nov 13, 2024
56a4ee9
Remove code leftover from debug
fmoletta Nov 13, 2024
c444a01
Consistency
fmoletta Nov 13, 2024
d59b09a
Fix
fmoletta Nov 13, 2024
8dd7c6d
Add test
fmoletta Nov 13, 2024
7e4205c
Remove TODO
fmoletta Nov 13, 2024
c59b8be
Revert "[Postpone] changes not related to the trie"
fmoletta Nov 13, 2024
03b73c8
Fix
fmoletta Nov 13, 2024
e7d3dc4
Add helper methods
fmoletta Nov 13, 2024
5d4ad34
Add syncmode argument
fmoletta Nov 14, 2024
a3820e4
crate
fmoletta Nov 15, 2024
afcdc5a
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 15, 2024
c3d5106
Add SnapSyncManager + send snap replies to them
fmoletta Nov 15, 2024
fa275ec
Add channel between kademlia table and peer connection handler
fmoletta Nov 15, 2024
c88d114
SyncManager first iteration
fmoletta Nov 21, 2024
798fb05
Start syncer in fork_choice handler
fmoletta Nov 21, 2024
a875680
First iteration of state retrieval planning
fmoletta Nov 22, 2024
356eaf0
[REVERT ME] Make V2 endpoints work in order to run hive sync test
fmoletta Nov 22, 2024
a6d64f9
Add parallel state fetching first draft
fmoletta Nov 25, 2024
3f6df84
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 26, 2024
fc9cc3e
Store block bodies and headers
fmoletta Nov 26, 2024
6b33d11
Set latest block
fmoletta Nov 26, 2024
e6c2a08
Start snap fetching
fmoletta Nov 26, 2024
da6cff8
Refactor comunication between backend and peer
fmoletta Nov 26, 2024
64835f3
Avoid holding the mutex for the kademlia table when sending requests …
fmoletta Nov 26, 2024
c798c35
Migrate to full sync
fmoletta Nov 27, 2024
62084e8
Error handling
fmoletta Nov 27, 2024
02a89b2
Fixes
fmoletta Nov 27, 2024
a60948d
revert uneeded changes
fmoletta Nov 27, 2024
cc4452e
revert uneeded changes
fmoletta Nov 27, 2024
c86b553
Updates & fixes
fmoletta Nov 27, 2024
05848a2
Add ethereum/sync test suite to hive (1 test)
fmoletta Nov 27, 2024
9d608f9
Default to full-sync
fmoletta Nov 27, 2024
57f1e29
revert uneeded changes
fmoletta Nov 27, 2024
a7350d8
revert uneeded changes
fmoletta Nov 27, 2024
eb3ff59
Fixes
fmoletta Nov 27, 2024
dc6fdf1
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 27, 2024
0a8d4e8
Clippy
fmoletta Nov 27, 2024
cfce53d
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Nov 27, 2024
493fa91
revert hive workflow change
fmoletta Nov 27, 2024
c6d6767
Revert "[REVERT ME] Make V2 endpoints work in order to run hive sync …
fmoletta Nov 27, 2024
95a9af2
revert hive workflow change
fmoletta Nov 27, 2024
fd90f18
reduce tracing output
fmoletta Nov 27, 2024
3191ddd
fmt
fmoletta Nov 27, 2024
576ee33
Fix
fmoletta Nov 27, 2024
a069f80
Revert "Revert "[REVERT ME] Make V2 endpoints work in order to run hi…
fmoletta Nov 27, 2024
90f9ca5
Snap Sync: Account Range
fmoletta Nov 27, 2024
b00ac70
Update tracing + set correct bytes response limit
fmoletta Nov 28, 2024
024efc9
Fix decoding of GetStorageRange
fmoletta Nov 28, 2024
7821db9
First steps of bytecode fetch queue + improve task spawning and joini…
fmoletta Nov 29, 2024
85ce202
Connect state rebuilding to bytecode fetcher
fmoletta Nov 29, 2024
973f2d9
Fix
fmoletta Nov 29, 2024
cafa197
Impl request storage ranges
fmoletta Nov 29, 2024
cbdeeb6
Storage fetcher skeleton
fmoletta Nov 29, 2024
c76cfeb
Add storage fetcher process
fmoletta Dec 2, 2024
586ec79
Signal end
fmoletta Dec 2, 2024
3f5bb77
Fix
fmoletta Dec 2, 2024
98f3270
Fix
fmoletta Dec 2, 2024
7028663
Fix
fmoletta Dec 2, 2024
711d987
Mute tracing
fmoletta Dec 2, 2024
d5b1ab5
Update
fmoletta Dec 4, 2024
2a59cdc
Update batch size
fmoletta Dec 4, 2024
e21a77a
Add error handling
fmoletta Dec 4, 2024
aec4c48
Add syncmode enum
fmoletta Dec 4, 2024
e1b2c6e
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Dec 4, 2024
317ccb5
Restore store creation
fmoletta Dec 4, 2024
146d767
Uncomment tracing
fmoletta Dec 4, 2024
f53646c
Remove unused fn
fmoletta Dec 4, 2024
ec6a9d4
Fix storage ranges verify logic
fmoletta Dec 4, 2024
1c945f6
Clippy
fmoletta Dec 4, 2024
5b93fbd
Revert "Revert "Revert "[REVERT ME] Make V2 endpoints work in order t…
fmoletta Dec 4, 2024
776ddc8
Clippy
fmoletta Dec 4, 2024
be70833
Fix clippy
fmoletta Dec 4, 2024
f501b02
Revert unstable lib feature
fmoletta Dec 4, 2024
ca622b6
Improve doc
fmoletta Dec 4, 2024
43c9309
Fix diagram linking
fmoletta Dec 4, 2024
ffb9e68
Improve spacing
fmoletta Dec 4, 2024
fa81f67
Improve spacing
fmoletta Dec 4, 2024
b7197a8
Fix typos
fmoletta Dec 4, 2024
eccaf9e
Add doc about bytecode fetcher
fmoletta Dec 4, 2024
559076c
Add doc about storage_fetcher + add improvement idea
fmoletta Dec 4, 2024
a07f35e
revert uneeded change + add doc
fmoletta Dec 4, 2024
81ae7ed
Commit diagram
fmoletta Dec 4, 2024
563d51b
fmt
fmoletta Dec 4, 2024
f10e6fb
Rename doc files
fmoletta Dec 4, 2024
8d70af3
Typo check
fmoletta Dec 4, 2024
af20a75
Revert "Revert "Revert "Revert "[REVERT ME] Make V2 endpoints work in…
fmoletta Dec 5, 2024
2715bf5
Fix `StorageRanges` decoding
fmoletta Dec 5, 2024
951b208
Update encoding
fmoletta Dec 5, 2024
35a81c5
Add max retries
fmoletta Dec 9, 2024
90d68f2
Add methods to manipulate trie state during snap sync
fmoletta Dec 9, 2024
581b325
State Healing first progress
fmoletta Dec 9, 2024
4ef7f11
Add storage healing
fmoletta Dec 10, 2024
2238897
Intergrate bytecode sender
fmoletta Dec 10, 2024
28e6229
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
fmoletta Dec 10, 2024
a878cf1
Fix
fmoletta Dec 10, 2024
ef2caf2
Fix
fmoletta Dec 10, 2024
f33584f
Fix
fmoletta Dec 10, 2024
385e264
Fix
fmoletta Dec 10, 2024
f002e91
Fix
fmoletta Dec 11, 2024
52831d0
Fix
fmoletta Dec 11, 2024
5d58c9a
Fix
fmoletta Dec 11, 2024
e90bc1d
Remove debug prints
fmoletta Dec 11, 2024
612deb4
Simplify storage healer + fetcher
fmoletta Dec 11, 2024
86203dd
Avoid requesting storage we already have
fmoletta Dec 11, 2024
8642f53
Fix
fmoletta Dec 11, 2024
74e0e5d
Remove error used as signal
fmoletta Dec 11, 2024
6bbbada
Fix
fmoletta Dec 11, 2024
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
116 changes: 113 additions & 3 deletions crates/networking/p2p/peer_channels.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use std::{sync::Arc, time::Duration};
use std::{collections::BTreeMap, sync::Arc, time::Duration};

use bytes::Bytes;
use ethrex_core::{
types::{AccountState, BlockBody, BlockHeader},
H256, U256,
};
use ethrex_rlp::encode::RLPEncode;
use ethrex_trie::verify_range;
use ethrex_trie::Nibbles;
use ethrex_trie::{verify_range, Node};
use tokio::sync::{mpsc, Mutex};

use crate::{
Expand All @@ -15,7 +16,8 @@ use crate::{
BlockBodies, BlockHeaders, GetBlockBodies, GetBlockHeaders, BLOCK_HEADER_LIMIT,
},
snap::{
AccountRange, ByteCodes, GetAccountRange, GetByteCodes, GetStorageRanges, StorageRanges,
AccountRange, ByteCodes, GetAccountRange, GetByteCodes, GetStorageRanges, GetTrieNodes,
StorageRanges, TrieNodes,
},
},
snap::encodable_to_proof,
Expand Down Expand Up @@ -318,4 +320,112 @@ impl PeerChannels {
}
Some((storage_keys, storage_values, should_continue))
}

/// Requests state trie nodes given the root of the trie where they are contained and their path (be them full or partial)
/// Returns the nodes or None if:
/// - There are no available peers (the node just started up or was rejected by all other nodes)
/// - The response timed out
/// - The response was empty or not valid
pub async fn request_state_trienodes(
&self,
state_root: H256,
paths: Vec<Nibbles>,
) -> Option<Vec<Node>> {
let request_id = rand::random();
let expected_nodes = paths.len();
let request = RLPxMessage::GetTrieNodes(GetTrieNodes {
id: request_id,
root_hash: state_root,
// [acc_path, acc_path,...] -> [[acc_path], [acc_path]]
paths: paths
.into_iter()
.map(|vec| vec![Bytes::from(vec.encode_compact())])
.collect(),
bytes: MAX_RESPONSE_BYTES,
});
self.sender.send(request).await.ok()?;
let mut receiver = self.receiver.lock().await;
let nodes = tokio::time::timeout(PEER_REPLY_TIMOUT, async move {
loop {
match receiver.recv().await {
Some(RLPxMessage::TrieNodes(TrieNodes { id, nodes })) if id == request_id => {
return Some(nodes)
}
// Ignore replies that don't match the expected id (such as late responses)
Some(_) => continue,
None => return None,
}
}
})
.await
.ok()??;
(!nodes.is_empty() && nodes.len() <= expected_nodes)
.then(|| {
nodes
.iter()
.map(|node| Node::decode_raw(node))
.collect::<Result<Vec<_>, _>>()
.ok()
})
.flatten()
}

/// Requests storage trie nodes given the root of the state trie where they are contained and
/// a hashmap mapping the path to the account in the state trie (aka hashed address) to the paths to the nodes in its storage trie (can be full or partial)
/// Returns the nodes or None if:
/// - There are no available peers (the node just started up or was rejected by all other nodes)
/// - The response timed out
/// - The response was empty or not valid
pub async fn request_storage_trienodes(
&self,
state_root: H256,
paths: BTreeMap<H256, Vec<Nibbles>>,
) -> Option<Vec<Node>> {
let request_id = rand::random();
let expected_nodes = paths.iter().fold(0, |acc, item| acc + item.1.len());
let request = RLPxMessage::GetTrieNodes(GetTrieNodes {
id: request_id,
root_hash: state_root,
// {acc_path: [path, path, ...]} -> [[acc_path, path, path, ...]]
paths: paths
.into_iter()
.map(|(acc_path, paths)| {
[
vec![Bytes::from(acc_path.0.to_vec())],
paths
.into_iter()
.map(|path| Bytes::from(path.encode_compact()))
.collect(),
]
.concat()
})
.collect(),
bytes: MAX_RESPONSE_BYTES,
});
self.sender.send(request).await.ok()?;
let mut receiver = self.receiver.lock().await;
let nodes = tokio::time::timeout(PEER_REPLY_TIMOUT, async move {
loop {
match receiver.recv().await {
Some(RLPxMessage::TrieNodes(TrieNodes { id, nodes })) if id == request_id => {
return Some(nodes)
}
// Ignore replies that don't match the expected id (such as late responses)
Some(_) => continue,
None => return None,
}
}
})
.await
.ok()??;
(!nodes.is_empty() && nodes.len() <= expected_nodes)
.then(|| {
nodes
.iter()
.map(|node| Node::decode_raw(node))
.collect::<Result<Vec<_>, _>>()
.ok()
})
.flatten()
}
}
2 changes: 1 addition & 1 deletion crates/networking/p2p/rlpx/snap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl RLPDecode for StorageSlot {
let decoder = Decoder::new(rlp)?;
let (hash, decoder) = decoder.decode_field("hash")?;
let (data, decoder) = decoder.get_encoded_item()?;
let data = U256::decode(ethrex_rlp::decode::decode_bytes(&data)?.0)?;
let data = U256::decode(&ethrex_rlp::decode::decode_bytes(&data)?.0)?;
Ok((Self { hash, data }, decoder.finish()?))
}
}
Loading
Loading