From faaf98b1b6c3ef6903e90a9588779b3e11444290 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Thu, 28 May 2026 11:14:06 +0900 Subject: [PATCH 1/3] update revm --- packages/evm/Cargo.lock | 415 ++++++++-------------------------------- packages/evm/Cargo.toml | 2 +- 2 files changed, 86 insertions(+), 331 deletions(-) diff --git a/packages/evm/Cargo.lock b/packages/evm/Cargo.lock index 8c49eca60..a2d9100a7 100644 --- a/packages/evm/Cargo.lock +++ b/packages/evm/Cargo.lock @@ -50,45 +50,18 @@ dependencies = [ "strum 0.27.2", ] -[[package]] -name = "alloy-consensus" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c0dc44157867da82c469c13186015b86abef209bf0e41625e4b68bac61d728" -dependencies = [ - "alloy-eips 1.7.3", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 1.7.3", - "alloy-trie", - "alloy-tx-macros 1.7.3", - "auto_impl", - "borsh", - "c-kzg", - "derive_more 2.1.1", - "either", - "k256", - "once_cell", - "rand 0.8.5", - "secp256k1 0.30.0", - "serde", - "serde_json", - "serde_with", - "thiserror 2.0.18", -] - [[package]] name = "alloy-consensus" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dbe4e5e9107bf6854e7550b666ca654ff2027eabf8153913e2e31ac4b089779" dependencies = [ - "alloy-eips 2.0.0", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.0.0", + "alloy-serde", "alloy-trie", - "alloy-tx-macros 2.0.0", + "alloy-tx-macros", "auto_impl", "borsh", "c-kzg", @@ -104,31 +77,17 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "alloy-consensus-any" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4cdb42df3871cd6b346d6a938ec2ba69a9a0f49d1f82714bc5c48349268434" -dependencies = [ - "alloy-consensus 1.7.3", - "alloy-eips 1.7.3", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 1.7.3", - "serde", -] - [[package]] name = "alloy-consensus-any" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88fc7bbfb98cf5605a35aadf0ba43a7d9f1608d6f220d05e4fbd5144d3b0b625" dependencies = [ - "alloy-consensus 2.0.0", - "alloy-eips 2.0.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.0.0", + "alloy-serde", "serde", ] @@ -184,26 +143,16 @@ dependencies = [ ] [[package]] -name = "alloy-eips" -version = "1.7.3" +name = "alloy-eip7928" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7ef09f21bd1e9cb8a686f168cb4a206646804567f0889eadb8dcc4c9288c8" +checksum = "4d93ce7e41bcd2b9ee2c1d92c223c1be4a274d387538d6d3f956b768986ce451" dependencies = [ - "alloy-eip2124", - "alloy-eip2930", - "alloy-eip7702", - "alloy-eip7928", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.7.3", - "auto_impl", "borsh", - "c-kzg", - "derive_more 2.1.1", - "either", + "once_cell", "serde", - "serde_with", - "sha2", "thiserror 2.0.18", ] @@ -216,10 +165,10 @@ dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", - "alloy-eip7928", + "alloy-eip7928 0.3.3", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.0.0", + "alloy-serde", "auto_impl", "borsh", "c-kzg", @@ -242,21 +191,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-json-rpc" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff42cd777eea61f370c0b10f2648a1c81e0b783066cd7269228aa993afd487f7" -dependencies = [ - "alloy-primitives", - "alloy-sol-types", - "http 1.4.0", - "serde", - "serde_json", - "thiserror 2.0.18", - "tracing", -] - [[package]] name = "alloy-json-rpc" version = "2.0.0" @@ -272,48 +206,22 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-network" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbca04f9b410fdc51aaaf88433cbac761213905a65fe832058bcf6690585762" -dependencies = [ - "alloy-consensus 1.7.3", - "alloy-consensus-any 1.7.3", - "alloy-eips 1.7.3", - "alloy-json-rpc 1.7.3", - "alloy-network-primitives 1.7.3", - "alloy-primitives", - "alloy-rpc-types-any 1.7.3", - "alloy-rpc-types-eth 1.7.3", - "alloy-serde 1.7.3", - "alloy-signer 1.7.3", - "alloy-sol-types", - "async-trait", - "auto_impl", - "derive_more 2.1.1", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.18", -] - [[package]] name = "alloy-network" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0a3f5a7f3678b71d33fcc45b714fab8928dbc647d5aff2145e72032d5c849bb" dependencies = [ - "alloy-consensus 2.0.0", - "alloy-consensus-any 2.0.0", - "alloy-eips 2.0.0", - "alloy-json-rpc 2.0.0", - "alloy-network-primitives 2.0.0", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-any 2.0.0", - "alloy-rpc-types-eth 2.0.0", - "alloy-serde 2.0.0", - "alloy-signer 2.0.0", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", "alloy-sol-types", "async-trait", "auto_impl", @@ -324,29 +232,16 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "alloy-network-primitives" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d6d15e069a8b11f56bef2eccbad2a873c6dd4d4c81d04dda29710f5ea52f04" -dependencies = [ - "alloy-consensus 1.7.3", - "alloy-eips 1.7.3", - "alloy-primitives", - "alloy-serde 1.7.3", - "serde", -] - [[package]] name = "alloy-network-primitives" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb50dc1fb0e0b2c8748d5bee1aa7acdd18f9e036311bc93a71d97be624030317" dependencies = [ - "alloy-consensus 2.0.0", - "alloy-eips 2.0.0", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-serde 2.0.0", + "alloy-serde", "serde", ] @@ -377,42 +272,6 @@ dependencies = [ "sha3", ] -[[package]] -name = "alloy-provider" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d181c8cc7cf4805d7e589bf4074d56d55064fa1a979f005a45a62b047616d870" -dependencies = [ - "alloy-chains", - "alloy-consensus 1.7.3", - "alloy-eips 1.7.3", - "alloy-json-rpc 1.7.3", - "alloy-network 1.7.3", - "alloy-network-primitives 1.7.3", - "alloy-primitives", - "alloy-rpc-client 1.7.3", - "alloy-rpc-types-eth 1.7.3", - "alloy-signer 1.7.3", - "alloy-sol-types", - "alloy-transport 1.7.3", - "async-stream", - "async-trait", - "auto_impl", - "dashmap", - "either", - "futures", - "futures-utils-wasm", - "lru", - "parking_lot", - "pin-project", - "serde", - "serde_json", - "thiserror 2.0.18", - "tokio", - "tracing", - "wasmtimer", -] - [[package]] name = "alloy-provider" version = "2.0.0" @@ -420,17 +279,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ba5468f78c8893be2d68a7f2fda61753336e5653f006af19781001b5f99e6c" dependencies = [ "alloy-chains", - "alloy-consensus 2.0.0", - "alloy-eips 2.0.0", - "alloy-json-rpc 2.0.0", - "alloy-network 2.0.0", - "alloy-network-primitives 2.0.0", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-client 2.0.0", - "alloy-rpc-types-eth 2.0.0", - "alloy-signer 2.0.0", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", "alloy-sol-types", - "alloy-transport 2.0.0", + "alloy-transport", "async-stream", "async-trait", "auto_impl", @@ -471,35 +330,15 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "alloy-rpc-client" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2792758a93ae32a32e9047c843d536e1448044f78422d71bf7d7c05149e103f" -dependencies = [ - "alloy-json-rpc 1.7.3", - "alloy-primitives", - "alloy-transport 1.7.3", - "futures", - "pin-project", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", - "wasmtimer", -] - [[package]] name = "alloy-rpc-client" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222fd4efff0fb9a25184684742c44fe9fa9a16c4ab5bf97583e71c86598ef8f0" dependencies = [ - "alloy-json-rpc 2.0.0", + "alloy-json-rpc", "alloy-primitives", - "alloy-transport 2.0.0", + "alloy-transport", "futures", "pin-project", "serde", @@ -511,51 +350,19 @@ dependencies = [ "wasmtimer", ] -[[package]] -name = "alloy-rpc-types-any" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd720b63f82b457610f2eaaf1f32edf44efffe03ae25d537632e7d23e7929e1a" -dependencies = [ - "alloy-consensus-any 1.7.3", - "alloy-rpc-types-eth 1.7.3", - "alloy-serde 1.7.3", -] - [[package]] name = "alloy-rpc-types-any" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "949c0f16a94ae33cdb1139b8dbf9e34d7f26ebfe97962e2a4d620b5f65f48fe4" dependencies = [ - "alloy-consensus-any 2.0.0", - "alloy-network-primitives 2.0.0", - "alloy-primitives", - "alloy-rpc-types-eth 2.0.0", - "alloy-serde 2.0.0", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-rpc-types-eth" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2dc411f13092f237d2bf6918caf80977fc2f51485f9b90cb2a2f956912c8c9" -dependencies = [ - "alloy-consensus 1.7.3", - "alloy-consensus-any 1.7.3", - "alloy-eips 1.7.3", - "alloy-network-primitives 1.7.3", + "alloy-consensus-any", + "alloy-network-primitives", "alloy-primitives", - "alloy-rlp", - "alloy-serde 1.7.3", - "alloy-sol-types", - "itertools 0.14.0", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", - "serde_with", - "thiserror 2.0.18", ] [[package]] @@ -564,13 +371,13 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc280a41931bd419af86e9e859dd9726b73313aaa2e479b33c0e344f4b892ddb" dependencies = [ - "alloy-consensus 2.0.0", - "alloy-consensus-any 2.0.0", - "alloy-eips 2.0.0", - "alloy-network-primitives 2.0.0", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.0.0", + "alloy-serde", "alloy-sol-types", "itertools 0.14.0", "serde", @@ -579,17 +386,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "alloy-serde" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ce1e0dbf7720eee747700e300c99aac01b1a95bb93f493a01e78ee28bb1a37" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "2.0.0" @@ -601,21 +397,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-signer" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2425c6f314522c78e8198979c8cbf6769362be4da381d4152ea8eefce383535d" -dependencies = [ - "alloy-primitives", - "async-trait", - "auto_impl", - "either", - "elliptic-curve", - "k256", - "thiserror 2.0.18", -] - [[package]] name = "alloy-signer" version = "2.0.0" @@ -701,36 +482,13 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-transport" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa186e560d523d196580c48bf00f1bf62e63041f28ecf276acc22f8b27bb9f53" -dependencies = [ - "alloy-json-rpc 1.7.3", - "auto_impl", - "base64 0.22.1", - "derive_more 2.1.1", - "futures", - "futures-utils-wasm", - "parking_lot", - "serde", - "serde_json", - "thiserror 2.0.18", - "tokio", - "tower", - "tracing", - "url", - "wasmtimer", -] - [[package]] name = "alloy-transport" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b7b755e64ae6b5de0d762ed2c780e072167ea5e542076a559e00314352a0bf" dependencies = [ - "alloy-json-rpc 2.0.0", + "alloy-json-rpc", "auto_impl", "base64 0.22.1", "derive_more 2.1.1", @@ -764,18 +522,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-tx-macros" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa0c53e8c1e1ef4d01066b01c737fb62fc9397ab52c6e7bb5669f97d281b9bc" -dependencies = [ - "darling 0.21.3", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "alloy-tx-macros" version = "2.0.0" @@ -1644,7 +1390,6 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "serde", "strsim", "syn 2.0.117", ] @@ -3089,7 +2834,7 @@ name = "mainsail_evm_core" version = "0.1.0" dependencies = [ "alloy-primitives", - "alloy-provider 2.0.0", + "alloy-provider", "alloy-sol-types", "anyhow", "bincode", @@ -3202,6 +2947,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" +dependencies = [ + "serde", +] + [[package]] name = "num" version = "0.4.3" @@ -3956,9 +3710,9 @@ dependencies = [ [[package]] name = "revm" -version = "38.0.0" +version = "40.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91202d39dbe8e8d10e9e8f2b76c30da68ecd1d25be69ba6d853ad0d03a3a398a" +checksum = "823da6e5509bb8e5dcd91295870e494917a030ad506fc83301f3f08ad8b15b17" dependencies = [ "revm-bytecode", "revm-context", @@ -3975,9 +3729,9 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "10.0.0" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbb3a3d735efa94c91f2ef6bf20a35f99a77bc78f3e25bd758336901bdf9661" +checksum = "d8b378c2653331fe60969d9745e802cd773d82a20d8aaced914dfcf26ab8f0d9" dependencies = [ "bitvec", "phf 0.13.1", @@ -3987,9 +3741,9 @@ dependencies = [ [[package]] name = "revm-context" -version = "16.0.1" +version = "18.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f68d928d8b228e0faeb1c6ed75c4fde7d124f1ddf9119b67e7a0ad4041237d" +checksum = "bafa298114f3cab706945de14c04e73e6e6d7896302e4183dae273f968e52f80" dependencies = [ "bitvec", "cfg-if", @@ -4004,9 +3758,9 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "17.0.1" +version = "19.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3758e6167c4ba7a59a689c519a047edaefcd4c37d74f279b93ed87bc8aece4" +checksum = "db9c13f1dfc79425931fd184b6bd373dfac7baba50859b01107d5c0e20549cbb" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -4020,13 +3774,14 @@ dependencies = [ [[package]] name = "revm-database" -version = "13.0.1" +version = "15.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c281a1f11d3bcb8c0bba1199ed6bcb001d1aeb3d4fb366819e14f88723989a4e" +checksum = "a69c3ce73454a09ef89a66177239d7c4f5f697227ae27254c99451866603b19d" dependencies = [ - "alloy-eips 1.7.3", - "alloy-provider 1.7.3", - "alloy-transport 1.7.3", + "alloy-eips", + "alloy-provider", + "alloy-transport", + "derive_more 2.1.1", "revm-bytecode", "revm-database-interface", "revm-primitives", @@ -4037,9 +3792,9 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "11.0.1" +version = "12.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89efb9832a4e3742bb4ded5f7fe5bf905e8860e69427d4dfec153484fc6d304" +checksum = "4a2656187f9f9c22ef9dd9300ed71aeaeca3506a6a0a229a07f264649b960d68" dependencies = [ "auto_impl", "either", @@ -4052,9 +3807,9 @@ dependencies = [ [[package]] name = "revm-handler" -version = "18.1.0" +version = "20.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783e903d6922b7f5f9a940d1bb229530502d2924b1aed9d5ca5a94ebf065d460" +checksum = "3ce1d66037ca1394128313bb995fa9f50d834927a389386bb34f8f0ef914648f" dependencies = [ "auto_impl", "derive-where", @@ -4071,9 +3826,9 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "19.0.0" +version = "21.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8216ad58422090d0daa9eb430e0a081f7ad07e7fd30681dee71f8420c99624e0" +checksum = "9fe3635d3411e8318849546570ca0220e783443319e28f5397c9f80b05bf4344" dependencies = [ "auto_impl", "either", @@ -4089,9 +3844,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "35.0.1" +version = "37.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ece9f41b69658c15d748288a4dbdfc06a63f3ce93d983af440de3f1631dce6a" +checksum = "bae56c57ddca1f5c4abd443f826f1b3e49a86a528e7e1ea0fc207cdc4671a37e" dependencies = [ "revm-bytecode", "revm-context-interface", @@ -4102,9 +3857,9 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "34.0.0" +version = "36.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a346a8cc6c8c39bd65306641c692191299c0a7b63d38810e39e8fe9b92378660" +checksum = "191db865091e07ecb80b12ce3048192c76071ca3d2b0a315b111b271cd4ced37" dependencies = [ "ark-bls12-381", "ark-bn254", @@ -4127,24 +3882,24 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "23.0.0" +version = "24.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c99bda77d9661521ba0b4bc04558c6692074f01e65dd420fa3b893033d9b8a2" +checksum = "fe5102d804892908d4ebf68da29b8562895922dffa26c230ff2c4dadcf93916f" dependencies = [ "alloy-primitives", - "num_enum", "once_cell", "serde", ] [[package]] name = "revm-state" -version = "11.0.1" +version = "12.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32490ed687dba31c3c882beb8c20408bdd30ef96690d8f145b0ee9a87040bfe" +checksum = "40eff6067185cf80932e06f6a9c8045b012ecb6f99a8d6edc618ec2792373e14" dependencies = [ - "alloy-eip7928", + "alloy-eip7928 0.4.1", "bitflags 2.11.0", + "nonmax", "revm-bytecode", "revm-primitives", "serde", diff --git a/packages/evm/Cargo.toml b/packages/evm/Cargo.toml index 1ba723da3..21176f4f1 100644 --- a/packages/evm/Cargo.toml +++ b/packages/evm/Cargo.toml @@ -15,7 +15,7 @@ bincode = { version = "1.3.3" } ethers-contract = { version = "2.0.14" } ethers-core = { version = "2.0.14" } ethers-providers = { version = "2.0.14" } -revm = { version = "38.0.0", features = ["alloydb", "serde", "serde-json"] } +revm = { version = "40.0.2", features = ["alloydb", "serde", "serde-json"] } alloy-sol-types = { version = "1.5.7", default-features = false, features = [ "std", ] } From 94aec0db52515779f6c493d633c22b477d4d0d41 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Thu, 28 May 2026 11:14:21 +0900 Subject: [PATCH 2/3] fix precompile trait implementation --- packages/evm/core/src/precompiles.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/evm/core/src/precompiles.rs b/packages/evm/core/src/precompiles.rs index 08edb6b59..e6d3034c2 100644 --- a/packages/evm/core/src/precompiles.rs +++ b/packages/evm/core/src/precompiles.rs @@ -1,5 +1,3 @@ -use std::boxed::Box; - use blst::BLST_ERROR; use blst::min_pk::{PublicKey, Signature}; @@ -9,18 +7,25 @@ use revm::handler::{EthPrecompiles, PrecompileProvider, precompile_output_to_int use revm::interpreter::{CallInputs, InterpreterResult}; use revm::precompile::{PrecompileHalt, PrecompileOutput, PrecompileResult}; use revm::primitives::hardfork::SpecId; -use revm::primitives::{Address, Bytes, address}; +use revm::primitives::{Address, AddressSet, Bytes, address}; pub const BLS_POP_VERIFY_ADDR: Address = address!("0000000000000000000000000000000001181200"); pub struct MainsailPrecompiles { eth: EthPrecompiles, + warm_addresses: AddressSet, } impl MainsailPrecompiles { pub fn new(spec: SpecId) -> Self { + let eth = EthPrecompiles::new(spec); + + let mut warm_addresses = eth.warm_addresses().clone(); + warm_addresses.insert(BLS_POP_VERIFY_ADDR); + Self { - eth: EthPrecompiles::new(spec), + eth, + warm_addresses, } } } @@ -49,10 +54,8 @@ impl PrecompileProvider for MainsailPrecompiles { PrecompileProvider::::run(&mut self.eth, context, inputs) } - fn warm_addresses(&self) -> Box> { - let mut addrs: Vec
= self.eth.warm_addresses().collect(); - addrs.push(BLS_POP_VERIFY_ADDR); - Box::new(addrs.into_iter()) + fn warm_addresses(&self) -> &AddressSet { + &self.warm_addresses } fn contains(&self, address: &Address) -> bool { From 04da63e2b477eb845dd0bfa0025ee9c5e013fcd6 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Thu, 28 May 2026 11:14:44 +0900 Subject: [PATCH 3/3] update tests --- packages/evm/bindings/src/lib.rs | 2 +- packages/evm/core/src/db.rs | 9 +++++---- .../transaction-pool-api/source/evm-call.test.ts | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/evm/bindings/src/lib.rs b/packages/evm/bindings/src/lib.rs index d1440d5ff..f4936d034 100644 --- a/packages/evm/bindings/src/lib.rs +++ b/packages/evm/bindings/src/lib.rs @@ -667,7 +667,7 @@ impl EvmInner { Ok(match result { Ok(result) => PreverifyTxResult { success: true, - initial_gas_used: result.initial_total_gas, + initial_gas_used: result.initial_total_gas(), ..Default::default() }, Err(err) => PreverifyTxResult { diff --git a/packages/evm/core/src/db.rs b/packages/evm/core/src/db.rs index e1cba31a4..78954494a 100644 --- a/packages/evm/core/src/db.rs +++ b/packages/evm/core/src/db.rs @@ -1317,7 +1317,7 @@ mod tests { // 2) Update balance for account let mut state = HashMap::default(); - let mut account = revm::state::Account::new_not_existing(0); + let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO); account.info.balance = U256::from(100); account.status = revm::state::AccountStatus::Touched; @@ -1402,7 +1402,7 @@ mod tests { let address = address!("bd6f65c58a46427af4b257cbe231d0ed69ed5508"); let mut state = HashMap::default(); - let mut account = revm::state::Account::new_not_existing(0); + let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO); account.status = revm::state::AccountStatus::Touched; let mut storage = HashMap::default(); @@ -1469,7 +1469,7 @@ mod tests { let address = address!("bd6f65c58a46427af4b257cbe231d0ed69ed5508"); let mut state = HashMap::default(); - let mut account = revm::state::Account::new_not_existing(0); + let mut account = revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO); account.status = revm::state::AccountStatus::Touched; let mut storage = HashMap::default(); @@ -1572,7 +1572,8 @@ mod tests { let mut state = HashMap::default(); - let mut account = revm::state::Account::new_not_existing(0); + let mut account = + revm::state::Account::new_not_existing(revm::state::TransactionId::ZERO); account.status = revm::state::AccountStatus::Touched; let mut storage = HashMap::default(); diff --git a/tests/functional/transaction-pool-api/source/evm-call.test.ts b/tests/functional/transaction-pool-api/source/evm-call.test.ts index cc001623b..00b7be7d2 100644 --- a/tests/functional/transaction-pool-api/source/evm-call.test.ts +++ b/tests/functional/transaction-pool-api/source/evm-call.test.ts @@ -135,7 +135,7 @@ describe<{ assert.true(await isTransactionCommitted(context, tx)); const legacyAfter = await evm.getAccountInfo(legacyColdWallet.mainsailAddress); - assert.equal(legacyAfter.balance, legacyBefore.balance - 108160000000000n - 5n); + assert.equal(legacyAfter.balance, legacyBefore.balance - 112900000000000n - 5n); const recipientAfter = await evm.getAccountInfo(randomWallet.address); assert.equal(recipientAfter.balance, 5n); @@ -157,7 +157,7 @@ describe<{ const recipientBefore = await evm.getAccountInfo(randomWallet.address); assert.equal(recipientBefore.balance, 0n); - const gasSpentPerTx = 108160000000000n; + const gasSpentPerTx = 112900000000000n; const valuePerTx = 5n; const N = 10n;