Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
573d57f
runtime: Use proper u32 block number type
lexnv Aug 13, 2025
3aee688
revive: Make other types u32
lexnv Aug 13, 2025
94e4f3f
revive: Config block hash count for dev node
lexnv Aug 13, 2025
e90e9b7
revive/tests: fix runtime tests
lrubasze Aug 8, 2025
65f5167
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Aug 14, 2025
f9f8871
revive: Use allow types for computing receipt trie root
lexnv Aug 14, 2025
1bbf06f
revive: Remove comments
lexnv Aug 14, 2025
68ea78f
revive: Compute alloy header
lexnv Aug 14, 2025
e3b6127
revive: Reconstruct the ETH block
lexnv Aug 14, 2025
64acac0
revive: Introduce an ETH block builder
lexnv Aug 15, 2025
cb1a2b9
revive: Use the ETH block builder on_finalize
lexnv Aug 15, 2025
98a053d
revive: Inline storage drainer
lexnv Aug 15, 2025
e0592ad
revive: Add better storage documentation
lexnv Aug 15, 2025
77047d1
revive: Emit events while storing tx not while processing
lexnv Aug 15, 2025
b290d48
revive: Add wrapper for emitting events unstored
lexnv Aug 15, 2025
61c6e53
revive: Remove state root config and use tx root instead
lexnv Aug 15, 2025
3fb025b
cargo: Remove experimental feature flags
lexnv Aug 15, 2025
58983b6
revive: Remove encoding since we rely on alloy
lexnv Aug 15, 2025
fa7a321
revive: Remove manual implementation of the eth header
lexnv Aug 15, 2025
82c530a
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 15, 2025
54079df
cargo: Use workspace deps
lexnv Aug 15, 2025
73b9712
revive: Remove unnecesary types and imports
lexnv Aug 15, 2025
1cfc1d0
revieve: Remove decoder with mem
lexnv Aug 15, 2025
59a2d1c
revive: Fix clippy
lexnv Aug 15, 2025
4b60ea3
revive: Fix typo documentation
lexnv Aug 15, 2025
a558ed3
revive: Add a bit more details into docs
lexnv Aug 15, 2025
af9f0de
revive: Add comments wrt weights used
lexnv Aug 15, 2025
89be061
revive/tx: Extract the effective gas price from signed transactions
lexnv Aug 18, 2025
4fdd001
revive: Replace emitted events with storage values
lexnv Aug 18, 2025
62fd301
revive: Store only `Event::ContractEmitted`
lexnv Aug 18, 2025
68f6019
revive/block_hash: Cap gas limit of the block to u64::MAX
lexnv Aug 18, 2025
22eda99
revive: Adjust weight estimates comment
lexnv Aug 18, 2025
d1d75d9
revive: Remove the block hash config param
lexnv Aug 18, 2025
00f1178
revive/tx: Use signed_payload instead of custom encoding fn
lexnv Aug 18, 2025
c6eddee
revive: Rename to ReceiptGasInfo
lexnv Aug 19, 2025
d56af9a
revive: Impl default for EthBlockBluilder
lexnv Aug 19, 2025
b04d4bb
revive: Add a evm base gas price to future proof
lexnv Aug 19, 2025
16e5f19
revive: Collect only related events
lexnv Aug 19, 2025
cad1019
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 19, 2025
39ffb2b
Revert "revive: Collect only related events"
lexnv Aug 19, 2025
1d4d722
revive: Add comment for ReceiptInfoData
lexnv Aug 19, 2025
fa4409b
revive: Use storage value for inflight events
lexnv Aug 19, 2025
66dfcfe
revive: Use storage value for inflight txes
lexnv Aug 19, 2025
7ba1b05
revive: Kill storge on initialize
lexnv Aug 19, 2025
4601afd
revive: Remove commets from on initialize
lexnv Aug 19, 2025
c1f0127
revive: Impl block hash directly on the RPC block type
lexnv Aug 19, 2025
b8b44f3
revive: Fix unused import
lexnv Aug 19, 2025
bdacdb3
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Aug 19, 2025
1fd25cd
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 20, 2025
67b464d
revive: Kill all storage entries on init
lexnv Aug 20, 2025
bc09159
revive: Ensure eth_call and eth_instantiate_with_code are signed
lexnv Aug 20, 2025
4935008
revive: Add block storage environmental to capture events properly and
lexnv Aug 20, 2025
44bb632
revive/hash: Use alloy logs bloom to compute the hashes
lexnv Aug 20, 2025
4abf8d9
revive: Remove manual bitor impl
lexnv Aug 20, 2025
faacd19
revive/tests: Enrich the test builder with eth instantiate
lexnv Aug 20, 2025
a7b212a
revive/tests: Add tests for storage items
lexnv Aug 20, 2025
4d27c43
revive/tests: Add test assets
lexnv Aug 21, 2025
6f1f2ea
revive/exec: Use block number for ETH block storage
lexnv Aug 21, 2025
fddc589
revive/rpc-types: Remove extra derives from types no longer in storage
lexnv Aug 21, 2025
98c07d8
revive: Unwrap or default for gas limits
lexnv Aug 21, 2025
c1a0659
revive/block-hash/tests: Use imports instead of full paths
lexnv Aug 21, 2025
d063d09
revive: Rename mod eth block storage
lexnv Aug 21, 2025
10487a5
revive: Rename to InflightEthTxEvents
lexnv Aug 21, 2025
b383ccb
revive/tests: Fix unused import
lexnv Aug 21, 2025
df5e277
revive: Rename to InflightEthTransactions
lexnv Aug 21, 2025
6c1175b
revive: Rename comment for accounting storage
lexnv Aug 21, 2025
9a112ab
revive: Remove max comment
lexnv Aug 21, 2025
4ed70dd
revive/block_hash: Simplify trait bounds
lexnv Aug 21, 2025
9c0ca44
revive: Capture events from the exec to avoid matching
lexnv Aug 21, 2025
6898e2b
revive: Use structs to place transaction details into storage
lexnv Aug 21, 2025
90cfe69
revive: Pass transactionSigned into the eth call directly
lexnv Aug 21, 2025
ce0eec2
frame/bench: Fix benchmarks
lexnv Aug 21, 2025
abfe65f
revive: Simplify the block_hash computations
lexnv Aug 21, 2025
83bf5bd
revive: No longer capture the tx index into storage
lexnv Aug 21, 2025
4fd292f
revive/tests: Fix cargo clippy
lexnv Aug 21, 2025
42d3009
revive: Update documentation for eth calls
lexnv Aug 21, 2025
d19a6ce
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 22, 2025
1f4903f
revive: Fetch the type of the transaction
lexnv Aug 22, 2025
17c4b00
revive: Ensure receipts are encoded with the tx type rlp
lexnv Aug 22, 2025
1f40e2a
revive/exec: Fall back to system block hashes
lexnv Aug 22, 2025
3b04c38
revive: Use all fields of the header for hashing
lexnv Aug 22, 2025
804f8b2
revive: Do not use coma after default
lexnv Aug 22, 2025
3172e38
revive: Remove Transaction7702Signed
lexnv Aug 22, 2025
e7a4e72
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 22, 2025
93ef609
cargo: Remove deps on primitives
lexnv Aug 22, 2025
d75af78
revive: Optimize storage reads with append instead of mutate
lexnv Aug 22, 2025
1443a15
revive: Remove stale comment
lexnv Aug 22, 2025
67f7a7f
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Aug 25, 2025
99d9104
revive: Adjust merge conflicts
lexnv Aug 25, 2025
11b547d
revive: Remove lenght to fee config type
lexnv Aug 25, 2025
5ffb427
revive: Make storage types public to crate only
lexnv Aug 25, 2025
1fbd45e
revive: Remove effective gas price from storage
lexnv Aug 25, 2025
70083d9
revive: Saturate add for gas usage
lexnv Aug 25, 2025
45effc4
revive: Remove stale EVM gas price
lexnv Aug 25, 2025
034cfd5
revive: Ensure length does not overflow
lexnv Aug 25, 2025
0f8ae18
revive/tests: Clean up unused imports
lexnv Aug 25, 2025
415cb12
revive: Extract tx type from encoded bytes
lexnv Aug 25, 2025
fb7d1a6
revive: Adjust ETH calls to use the encoded bytes directly
lexnv Aug 25, 2025
5f71ff4
revive: Rename variable to align with latest changes
lexnv Aug 25, 2025
970a5aa
revive: Kill only RPC items in on_initialize
lexnv Aug 25, 2025
050acc2
bench: Adjust the benchmarks
lexnv Aug 25, 2025
ccbe1fa
revive/tests: Adjust testing to new stored items
lexnv Aug 26, 2025
74ed66c
revive/codec: Implement decode for 7702 signedtx
lexnv Aug 26, 2025
3b8baf7
revive: Update gas used in block hash
lexnv Aug 26, 2025
d1c5cfa
changes: Compare incremental Trie Builder for space saveup optimizati…
lexnv Sep 17, 2025
27c7b38
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Sep 17, 2025
7a002c2
revive: Fix alloy consensus features to compile tests
lexnv Sep 18, 2025
9b14b44
revive: Remove alloy-rlp crate import
lexnv Sep 18, 2025
c08e505
revive/cargo: Add alloy trie as dependency
lexnv Sep 18, 2025
365b53f
revive: Use alloy-trie crate
lexnv Sep 18, 2025
e1317d3
revive/tests: Simplify test assets
lexnv Sep 18, 2025
607740c
runtime/tests: Bump the test limit of call size to 512 bytes
lexnv Sep 18, 2025
e5b05f7
Pallet revive benchmarks (#9496)
lrubasze Sep 22, 2025
f14faee
revive: Move eth block storage to dedicated module
lexnv Sep 18, 2025
5312398
revive/hash: Save the block hash in the returned block
lexnv Sep 22, 2025
9adc0f0
revive: Simplify the build API
lexnv Sep 22, 2025
a881f4b
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Sep 22, 2025
3b5e642
revive/benchmarks: use block_storage module
lrubasze Sep 22, 2025
6b070cd
Update from github-actions[bot] running command 'bench --runtime dev …
github-actions[bot] Sep 22, 2025
83058e2
Update from github-actions[bot] running command 'prdoc --audience nod…
github-actions[bot] Sep 22, 2025
cb9cbe9
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Sep 22, 2025
fd04988
revive: Remove signed type from rlp codec
lexnv Sep 22, 2025
153bd7d
revive: better docs
lexnv Sep 22, 2025
71daa4d
revive: Change to Identity for storage map
lexnv Sep 22, 2025
ea066ca
revive: Remove stale comment
lexnv Sep 22, 2025
957418a
revive/api: Make block author nonoptional
lexnv Sep 22, 2025
410913c
revive/tests: update tests after weights changes
lrubasze Sep 22, 2025
5b2beaf
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Sep 22, 2025
f91fa8c
revive: Change transactionSigned back into bytes
lexnv Sep 23, 2025
0e5f274
frame: Ensure EVMOrigin for eth_call and eth_instantiate
lexnv Sep 23, 2025
3231893
revive: Add docs about transaction_encoded
lexnv Sep 23, 2025
5e501d3
revive: Implement event limits on Stack object
lexnv Sep 23, 2025
8e0a7bf
revive/benchmarks: separate on_finalize benchmarks
lrubasze Sep 23, 2025
3959e16
revive: Move limit checking into deposit_event directly
lexnv Sep 23, 2025
40cd147
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Sep 23, 2025
e81271b
revive: Apply cargo fmt
lexnv Sep 23, 2025
e52b146
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Sep 23, 2025
2466181
revive: Use saturating add where possible
lexnv Sep 23, 2025
1428e9b
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Sep 23, 2025
7faa0d1
revive: Import TransactionSigned from evm
lexnv Sep 23, 2025
56ba0d1
Add EnsureEVM origin to pallets
lexnv Sep 23, 2025
2ea7b21
Add EnsureEVM origin to subtrate-node runtime
lrubasze Sep 23, 2025
6efcbf9
update expected compile error after serde update
lrubasze Sep 23, 2025
bee04d0
revive: update README
lrubasze Sep 24, 2025
6da298a
revive/benchmarking: revert weights to let benchmark bot commit prope…
lrubasze Sep 24, 2025
72d75f5
Revert "Add EnsureEVM origin to pallets"
lexnv Sep 24, 2025
addc6a4
Revert "frame: Ensure EVMOrigin for eth_call and eth_instantiate"
lexnv Sep 24, 2025
630f468
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Sep 24, 2025
5596841
Revert "Add EnsureEVM origin to subtrate-node runtime"
lrubasze Sep 24, 2025
9782821
Revert "Add EnsureEVM origin to subtrate-node runtime"
lexnv Sep 24, 2025
41c7e69
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Sep 24, 2025
f49c713
Update cargo.lock with minimal changes
lexnv Sep 24, 2025
eeb34a0
Revert "update expected compile error after serde update"
lrubasze Sep 24, 2025
102a578
Update from github-actions[bot] running command 'bench --runtime dev …
github-actions[bot] Sep 24, 2025
c9d7ae4
revive: Efficiently store first tx/receipt into a dedicated object
lexnv Sep 24, 2025
9358571
revive/tests: Adjust testing to the new API
lexnv Sep 24, 2025
69b04b9
revive/rpc: regenerate revive_chain.metadata
lrubasze Sep 24, 2025
95e1f15
revive/rpc: revert changes within lib.rs and receipt_extractor.rs
lrubasze Sep 24, 2025
a139a35
revive/rpc: update block_author
lrubasze Sep 24, 2025
1faebb2
revive/tests: update tests after weights changes
lrubasze Sep 24, 2025
f5127eb
Merge branch 'master' into lexnv/minimal-poc-block-storage
lrubasze Sep 25, 2025
f894abc
Update from github-actions[bot] running command 'bench --runtime dev …
github-actions[bot] Sep 25, 2025
a44a155
revive: Ensure the IR forms fallback to index 1
lexnv Sep 25, 2025
dd91bef
revive/tests: Move away from hardcoded gas and use expected values
lexnv Sep 25, 2025
dcb138c
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Sep 25, 2025
5bd73cd
revive: Add more documentation
lexnv Sep 25, 2025
6cdf623
revive: Optimize one storage access for build phase
lexnv Sep 25, 2025
56bda94
revive: Hide away the storage loads
lexnv Sep 25, 2025
10db306
revive/tests: Adjust testing to new API
lexnv Sep 25, 2025
5f905b3
revive: Move receipt and logs bloom to dedicated module
lexnv Sep 25, 2025
4ef2982
revive: Move incremental builder to dedicated module
lexnv Sep 25, 2025
1895820
revive: Move block builder to a dedicated module
lexnv Sep 25, 2025
5921361
revive: Move functionality away from lib.rs into block_storage
lexnv Sep 25, 2025
3fc1b6c
revive: Adjust docs
lexnv Sep 25, 2025
35cb484
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Sep 25, 2025
ec41a8e
revive: Adjust benchmarks to new import paths
lexnv Sep 26, 2025
4c282b5
revive: Introduce a builder phase for explicit usage
lexnv Sep 26, 2025
f8afc46
revive: Make write/read API explicit
lexnv Sep 26, 2025
6be3f21
revive/tests: Adjust testing to new API
lexnv Sep 26, 2025
3096a15
revive: Add debug / error logs
lexnv Sep 26, 2025
d50b802
revive/tests: Add conformance tests for accrue log bloom
lexnv Sep 26, 2025
dcfd21c
revive/tests: Add conformance tests for accrue other blooms
lexnv Sep 26, 2025
dde6596
revive/tests: Add conformance tests for accumulate receipt
lexnv Sep 26, 2025
92066f3
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Sep 26, 2025
b9dfe44
revive: Adjust docs
lexnv Sep 26, 2025
ef02568
revive: add optional stats to the IncrementalHashBuilder
lrubasze Sep 29, 2025
f30f5c2
revive: add IncrementalHashBuilder tests
lrubasze Sep 29, 2025
c0558ec
revive: add IncrementalHashBuilderIR size tests
lrubasze Sep 29, 2025
3724648
revive: IncrementalHashBuilder tests - cleanup
lrubasze Sep 29, 2025
e83036d
revive: take 'EthereumBlockBuilderIR' into account in integrity_test
lrubasze Sep 30, 2025
53d0543
Merge branch 'master' into lexnv/minimal-poc-block-storage
lrubasze Sep 30, 2025
8768be0
Merge branch 'master' into lexnv/minimal-poc-block-storage
lrubasze Sep 30, 2025
d86e643
fmt Cargo.toml
lrubasze Sep 30, 2025
1a5151e
cargo: Update cargo lock with minimal changes
lexnv Sep 30, 2025
2716b30
revive: Downgrade log to debug
lexnv Sep 30, 2025
5f6497f
revive: adjust MAX_TRANSACTION_PAYLOAD_SIZE
lrubasze Oct 3, 2025
bebd690
Merge branch 'master' into temp/lexnv/minimal-poc-block-storage
lrubasze Oct 6, 2025
13172f1
revive: fixes after master merge
lrubasze Oct 6, 2025
be1d2e9
Merge branch 'master' into lexnv/minimal-poc-block-storage
lexnv Oct 6, 2025
3d37952
revive: fix failing tests
lrubasze Oct 6, 2025
b53514b
revive: fix benchmarks
lrubasze Oct 6, 2025
e015a21
revive/cargo: Remove default-features = false
lexnv Oct 8, 2025
3476049
revive/rpc: Add default-features = true to cargo toml
lexnv Oct 8, 2025
8fdd41e
revive: Avoid reencoding the tx
lexnv Oct 8, 2025
d510e4f
revive: Pub export minimal types from block hash
lexnv Oct 8, 2025
a0e6f5a
revive: Remove unneeded trait bounds for hooks
lexnv Oct 8, 2025
c77ccf2
revive: Rename weight_utils to weightinfo_extension mod
lexnv Oct 8, 2025
7d12deb
revive: Panic on API missuse from revive pallet
lexnv Oct 8, 2025
608d431
revive: Simplify processing test statistics
lexnv Oct 8, 2025
4782a26
revive: Take tx on finalized weight into account
lexnv Oct 8, 2025
63906e9
revive: Revert merge conflict EthTransactInfo
lexnv Oct 8, 2025
390dc51
revive: Modify create_call signature
lexnv Oct 8, 2025
c6ba22d
revive/runtime_api: Add eth_receipt_data to extract gas info from
lexnv Oct 8, 2025
12e3cb5
revive: Revert hard cap limits for depositng events
lexnv Oct 8, 2025
842b061
revive: Fix return of deposit_event fn
lexnv Oct 8, 2025
2512cfb
revive: Export only ReceiptGasInfo as gas info
lexnv Oct 8, 2025
d519363
revive: Use default instead of new methods for incremental builder
lexnv Oct 8, 2025
74b14be
revive: Add comments about mem usage
lexnv Oct 8, 2025
cc45e76
revive: Ensure memory builder is taken into account
lexnv Oct 8, 2025
7742c4e
revive: Take mem usage and storage usage into account for integrity
lexnv Oct 8, 2025
9e57597
revive: Take event limits into account
lexnv Oct 8, 2025
2e23551
revive/tests: Manual impl derive to avoid needless trait bounds
lexnv Oct 8, 2025
cd24087
revive: Add debug logs for eth block builder
lexnv Oct 9, 2025
fa6493d
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Oct 9, 2025
31311f4
revive: Charge extra weight for events to ensure enough memory and
lexnv Oct 9, 2025
cd1100b
revive: Use DefaultNoBound
lexnv Oct 9, 2025
7b02443
revive: Remove unneeded trait bounds from benchmarking
lexnv Oct 9, 2025
31a4bd7
revive: Use weight instead of u64
lexnv Oct 9, 2025
78c8417
revive: make block_hash module public
lrubasze Oct 9, 2025
f366d31
revive: set block timestamps in seconds as Eth uses
lrubasze Oct 9, 2025
ca2ca80
Revert "revive: make block_hash module public"
lrubasze Oct 9, 2025
36a9ca4
revive: Add more logs for integrity check
lexnv Oct 9, 2025
917844d
revive/tests: Bump fee for tests
lexnv Oct 9, 2025
0875791
revive: Adjust more tests
lexnv Oct 9, 2025
32f429e
revive: Adjust gas of fixtures
lexnv Oct 9, 2025
954bee2
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Oct 9, 2025
481ca1c
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Oct 9, 2025
6415d25
Merge branch 'master' into lexnv/minimal-poc-block-storage
lrubasze Oct 10, 2025
41407e6
asset-hub/tests: Increase gas
lexnv Oct 10, 2025
98d271e
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Oct 10, 2025
7648c8f
asset-hub: Adjust more tests
lexnv Oct 10, 2025
89649b1
xcm: Adjust ERC20TransferGasLimit to allow higher fees
lexnv Oct 10, 2025
4c60922
revive: Remove cloning of encoded bytes
lexnv Oct 15, 2025
91f79d1
revive: Use constants for tx payload size
lexnv Oct 15, 2025
1ccd2ba
revive: Remove stale comment
lexnv Oct 15, 2025
1f79ac1
revive: Make block author infalliable
lexnv Oct 15, 2025
a71fe20
revive: weightinfo_extension as crate module
lexnv Oct 15, 2025
7696c7a
revive/tests: Revert balance changes
lexnv Oct 15, 2025
d73e8e1
revive/rpc: Remove substitute for TransactionSigned
lexnv Oct 15, 2025
655e068
Merge remote-tracking branch 'origin/master' into lexnv/minimal-poc-b…
lexnv Oct 15, 2025
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
82 changes: 63 additions & 19 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,11 @@ pallet-oracle-runtime-api = { path = "substrate/frame/honzon/oracle/runtime-api"
Inflector = { version = "0.11.4" }
aes-gcm = { version = "0.10" }
ahash = { version = "0.8.2" }
alloy-consensus = { version = "1.0.20", default-features = false }
alloy-consensus = { version = "1.0.24", default-features = false }
alloy-core = { version = "1.2.1", default-features = false }
alloy-primitives = { version = "1.2.1", default-features = false }
alloy-rlp = { version = "0.3", default-features = false }
alloy-trie = { version = "0.9.1", default-features = false }
always-assert = { version = "0.1" }
anyhow = { version = "1.0.81", default-features = false }
approx = { version = "0.5.1" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter<

parameter_types! {
/// Taken from the real gas and deposits of a standard ERC20 transfer call.
pub const ERC20TransferGasLimit: Weight = Weight::from_parts(700_000_000, 200_000);
pub const ERC20TransferGasLimit: Weight = Weight::from_parts(500_000_000_000, 10 * 1024 * 1024);
pub const ERC20TransferStorageDepositLimit: Balance = 10_200_000_000;
pub ERC20TransfersCheckingAccount: AccountId = PalletId(*b"py/revch").into_account_truncating();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,8 @@ fn withdraw_and_deposit_erc20s() {
let revive_account = pallet_revive::Pallet::<Runtime>::account_id();
let checking_account =
asset_hub_westend_runtime::xcm_config::ERC20TransfersCheckingAccount::get();
let initial_wnd_amount = 10_000_000_000_000u128;
let initial_wnd_amount = 100_000_000_000_000_000u128;
sp_tracing::init_for_tests();

ExtBuilder::<Runtime>::default().build().execute_with(|| {
// Bring the revive account to life.
Expand All @@ -1688,15 +1689,15 @@ fn withdraw_and_deposit_erc20s() {
let initial_amount_u256 = U256::from(1_000_000_000_000u128);
let constructor_data = sol_data::Uint::<256>::abi_encode(&initial_amount_u256);
let Contract { addr: erc20_address, .. } = bare_instantiate(&sender, code)
.gas_limit(Weight::from_parts(2_000_000_000, 200_000))
.gas_limit(Weight::from_parts(500_000_000_000, 10 * 1024 * 1024))
.storage_deposit_limit(Balance::MAX)
.data(constructor_data)
.build_and_unwrap_contract();

let sender_balance_before = <Balances as fungible::Inspect<_>>::balance(&sender);

let erc20_transfer_amount = 100u128;
let wnd_amount_for_fees = 1_000_000_000_000u128;
let wnd_amount_for_fees = 10_000_000_000_000u128;
// Actual XCM to execute locally.
let message = Xcm::<RuntimeCall>::builder()
.withdraw_asset((Parent, wnd_amount_for_fees))
Expand All @@ -1712,7 +1713,7 @@ fn withdraw_and_deposit_erc20s() {
assert_ok!(PolkadotXcm::execute(
RuntimeOrigin::signed(sender.clone()),
Box::new(VersionedXcm::V5(message)),
Weight::from_parts(2_500_000_000, 220_000),
Weight::from_parts(600_000_000_000, 15 * 1024 * 1024),
));

// Revive is not taking any fees.
Expand Down Expand Up @@ -1801,7 +1802,7 @@ fn smart_contract_not_erc20_will_error() {
let (code, _) = compile_module("dummy").unwrap();

let Contract { addr: non_erc20_address, .. } = bare_instantiate(&sender, code)
.gas_limit(Weight::from_parts(2_000_000_000, 200_000))
.gas_limit(Weight::from_parts(500_000_000_000, 10 * 1024 * 1024))
.storage_deposit_limit(Balance::MAX)
.build_and_unwrap_contract();

Expand Down Expand Up @@ -1859,7 +1860,7 @@ fn smart_contract_does_not_return_bool_fails() {
let constructor_data = sol_data::Uint::<256>::abi_encode(&initial_amount_u256);

let Contract { addr: non_erc20_address, .. } = bare_instantiate(&sender, code)
.gas_limit(Weight::from_parts(2_000_000_000, 200_000))
.gas_limit(Weight::from_parts(500_000_000_000, 10 * 1024 * 1024))
.storage_deposit_limit(Balance::MAX)
.data(constructor_data)
.build_and_unwrap_contract();
Expand Down Expand Up @@ -1915,7 +1916,7 @@ fn expensive_erc20_runs_out_of_gas() {
let initial_amount_u256 = U256::from(1_000_000_000_000u128);
let constructor_data = sol_data::Uint::<256>::abi_encode(&initial_amount_u256);
let Contract { addr: non_erc20_address, .. } = bare_instantiate(&sender, code)
.gas_limit(Weight::from_parts(2_000_000_000, 200_000))
.gas_limit(Weight::from_parts(500_000_000_000, 10 * 1024 * 1024))
.storage_deposit_limit(Balance::MAX)
.data(constructor_data)
.build_and_unwrap_contract();
Expand Down
46 changes: 46 additions & 0 deletions prdoc/pr_9418.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
title: 'frame/revive: ETH block storage'
doc:
- audience: Node Dev
description: |-
This PR constructs the Ethereum block in the following way:
- events (logs) are captured via an `environmental!` variable to reduce reliance on pallet storage
- A maximum of 512 events is allowed per transaction, with the size of an event capped to `self.ext.max_value_size()`
- A memory-efficient intermediate block builder is deserialized and serialized back to the pallet storage
- The intermediate block builder builds the transaction and event root hashes using low level RLP encoding primitives to achieve around 90% pallet storage optimization
- For more details, see https://github.com/paritytech/polkadot-sdk/pull/9764
- A fixup is included for 7702 transaction rlp serialization/deserialization is added to ensure we can build the Ethereum block hash from live Ethereum blocks.
- The maximum `CALL_PARAMS_MAX_SIZE` is increased to 512 to 244 to accommodate the transaction added to the Eth call


This PR also includes benchmarking:
- https://github.com/paritytech/polkadot-sdk/pull/9496

### Testing Done
- pallet storage testing and capturing of events / transactions are added at `tests/block_hash.rs`
- incremental block storage is tested in `evm/block_hash.rs`, which ensures RLP encoding / hash builder and identical hashes from live ethereum blocks
- tested via RPC work

### Next Steps
- https://github.com/paritytech/polkadot-sdk/pull/9512
- https://github.com/paritytech/polkadot-sdk/pull/9616
- https://github.com/paritytech/polkadot-sdk/pull/9452


Builds upon https://github.com/paritytech/polkadot-sdk/pull/9413

Part of: https://github.com/paritytech/contract-issues/issues/139
crates:
- name: pallet-revive
bump: patch
- name: sp-core
bump: patch
- name: asset-hub-westend-runtime
bump: patch
- name: penpal-runtime
bump: patch
- name: pallet-xcm
bump: patch
- name: pallet-assets
bump: patch
- name: pallet-revive-eth-rpc
bump: patch
2 changes: 1 addition & 1 deletion substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
/// Max size for serialized extrinsic params for this testing runtime.
/// This is a quite arbitrary but empirically battle tested value.
#[cfg(test)]
pub const CALL_PARAMS_MAX_SIZE: usize = 244;
pub const CALL_PARAMS_MAX_SIZE: usize = 512;

/// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics.
#[cfg(feature = "std")]
Expand Down
Loading