nimbus-eth1/vendor
Jacek Sieka 768307d91d
Cache code and invalid jump destination tables (fixes #2268) (#2404)
It is common for many accounts to share the same code - at the database
level, code is stored by hash meaning only one copy exists per unique
program but when loaded in memory, a copy is made for each account.

Further, every time we execute the code, it must be scanned for invalid
jump destinations which slows down EVM exeuction.

Finally, the extcodesize call causes code to be loaded even if only the
size is needed.

This PR improves on all these points by introducing a shared
CodeBytesRef type whose code section is immutable and that can be shared
between accounts. Further, a dedicated `len` API call is added so that
the EXTCODESIZE opcode can operate without polluting the GC and code
cache, for cases where only the size is requested - rocksdb will in this
case cache the code itself in the row cache meaning that lookup of the
code itself remains fast when length is asked for first.

With 16k code entries, there's a 90% hit rate which goes up to 99%
during the 2.3M attack - the cache significantly lowers memory
consumption and execution time not only during this event but across the
board.
2024-06-21 09:44:10 +02:00
..
NimYAML@189844a72b Replace status-im/portal-spec-tests with ethereum fork version (#2097) 2024-03-22 11:28:44 +01:00
libtommath@f96ffdf388 Bump libtommath to f96ffdf38803218fe74079738c9ff888bc9ab48c (#2069) 2024-03-15 20:52:41 +07:00
nim-bearssl@a806cbfab5 Bump nim-bearssl for gcc-14 compatibility (#2366) 2024-06-16 10:20:42 +07:00
nim-blscurve@f29698d2e9 Bump nim-blscurve for gcc-14 compatibility (#2365) 2024-06-15 17:34:07 +00:00
nim-bncurve@9677794afb update submodules to accomodate styleCheck 2022-04-14 08:39:50 +07:00
nim-chronicles@33761a5f77 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-chronos@8a306763ce Bump nim-chronos to 8a306763cec8105fa83574b56734b0f66823f844 (#2183) 2024-05-14 12:58:32 +07:00
nim-confutils@0adf3b7db7 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-eth@26212c881b Bump nim-eth/web3/kzg4844/nimbus-eth2 and related fixes (#2392) 2024-06-19 08:57:45 +07:00
nim-evmc@6e26114856 Cache code and invalid jump destination tables (fixes #2268) (#2404) 2024-06-21 09:44:10 +02:00
nim-faststreams@11b9d952a8 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-graphql@54dcec7f6f Bump nim-graphql to 54dcec7f6f01a2f1e0d5115b7352a1e16182a655 2024-05-14 09:23:09 +07:00
nim-http-utils@be57dbc902 Bump submodules (#2045) 2024-02-22 09:03:15 +07:00
nim-json-rpc@f40a8ba5c8 Bump nim-json-rpc to f40a8ba5c87748d89392f59d0c0f7cddba06cb60 (#2388) 2024-06-19 01:28:37 +00:00
nim-json-serialization@4d0b0662ed Bump nim-json-serialization to 4d0b0662ed960ab2c5a1ddbd08f77048bac13ae7 (#2222) 2024-05-26 10:48:45 +07:00
nim-kzg4844@f12616d067 Bump nim-eth/web3/kzg4844/nimbus-eth2 and related fixes (#2392) 2024-06-19 08:57:45 +07:00
nim-libbacktrace@aab85b6d24 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-libp2p@77d40c34f4 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-metrics@2e29df0950 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-nat-traversal@54bf8aa291 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-normalize@b828f07037 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-presto@a9687dda1c bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-results@e2adf66b8b results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
nim-rocksdb@f5dcb34ae8 Fix dboptions init (#2391) 2024-06-19 10:55:57 +02:00
nim-secp256k1@194b715b16 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-serialization@005ee90cb6 Bump nim-serialization to 005ee90cb6aa563cdd690910455ea05f916ead3f (#2358) 2024-06-14 17:42:12 +07:00
nim-snappy@913c426d57 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-sqlite3-abi@1453b19b1a bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-ssz-serialization@b71ebc41c8 Bump ssz-serialization to b71ebc41c8e5027580be77a9707df1a64e6d9c8b (#2393) 2024-06-19 14:14:15 +02:00
nim-stew@28743363ff avoid unnecessary memory allocations and lookups (#2334) 2024-06-11 11:38:58 +02:00
nim-stint@9d2b382c5d Bump nim-stint to 9d2b382c5dc34f0d6bbd93b2a5d65dde85067e0f (#2223) 2024-05-26 10:48:59 +07:00
nim-taskpools@d4c43137c0 Bump submodules (#2045) 2024-02-22 09:03:15 +07:00
nim-testutils@ae476c6731 Bump submodules (#2045) 2024-02-22 09:03:15 +07:00
nim-toml-serialization@24bbfcb8e4 Bump submodules (#2045) 2024-02-22 09:03:15 +07:00
nim-unicodedb@3db16f8ece bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-unittest2@e96f321503 bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-web3@fc226d4511 Bump nim-eth/web3/kzg4844/nimbus-eth2 and related fixes (#2392) 2024-06-19 08:57:45 +07:00
nim-websock@63bcc2902d bumps (#2261) 2024-05-31 16:27:14 +07:00
nim-zlib@45b06fca15 Bump submodules (#2045) 2024-02-22 09:03:15 +07:00
nim-zxcvbn@d0fb557f74 Bump cryptographics libraries (#2041) 2024-02-21 16:14:00 +07:00
nimbus-build-system@03bfa4c6ac use Nim 2.0.6 (#2384) 2024-06-19 01:27:54 +00:00
nimbus-eth2@7a8c1d818a Bump nim-eth/web3/kzg4844/nimbus-eth2 and related fixes (#2392) 2024-06-19 08:57:45 +07:00
nimbus-security-resources@ce9945b1b1 Add missing nimbus-eth2 modules (#1224) 2022-09-14 15:10:05 +02:00
nimcrypto@71bca15508 keccak: improve perf a little (#2321) 2024-06-07 16:48:27 +00:00
portal-mainnet@52d206cdad Fluffy portal testnet support (#2383) 2024-06-18 15:32:57 +08:00
portal-spec-tests@0c2434bd78 Several spec fixes for HistoricalSummaries + add test-vector test (#2217) 2024-05-24 23:15:04 +02:00
tempfile.nim@96fe74e698 Bump most of the submodules (#1156) 2022-07-08 20:28:31 +02:00