Skip to content

Revert "fix(monad): exclude blob suites from MONAD_EIGHT (#15)"#20

Draft
pdobacz wants to merge 1 commit intoforks/monad_ninefrom
revert-blob-removal
Draft

Revert "fix(monad): exclude blob suites from MONAD_EIGHT (#15)"#20
pdobacz wants to merge 1 commit intoforks/monad_ninefrom
revert-blob-removal

Conversation

@pdobacz
Copy link
Collaborator

@pdobacz pdobacz commented Mar 20, 2026

Unfortunately #15 broke running of tests with monad. This is a hot take but it seems that when RLP decoding the header it misses the blob-related header fields. I'm not sure this is a matter of monad's RLP decoding or the #15 introducing an unexpected format of block headers.

Opening as DRAFT, only so that a release can be cut with correctly filling tests. CC @haythemsellami

Problem Description

When you run the tests with monad's monad_ethereum_test, you'll get:

[ RUN      ] BlockchainTests.blockchain_tests/berlin/eip2929_gas_cost_increases/call/call_insufficient_balance.json

      0x560301150ec7
      0x560301150f26
      0x560301150d8b
      0x560301204421
      0x5603010c00b0
      0x5603010ce932
      0x5603015bc462
      0x5603015a8cae
      0x5603015a8e35
      0x5603015a902f
      0x5603015b2e3c
      0x5603015b3325
      0x560300fd01b8
      0x77d95f02a578
      0x77d95f02a63b
      0x56030101b275

   Attempting async signal unsafe human readable stacktrace (this may hang):
      0x560301150ec7: monad::stack_backtrace::capture(std::span<std::byte, 18446744073709551615ul>)
                      [/Users/user/sources/monad/category/core/backtrace.cpp:155]
      0x560301150f26: monad_stack_backtrace_capture_and_print
                      [/Users/user/sources/monad/category/core/backtrace.cpp:163]
      0x560301150d8b: monad_assertion_failed
                      [/Users/user/sources/monad/category/core/assert.c:40]
      0x560301204421: monad::TrieDb::read_eth_header()
                      [/Users/user/sources/monad/category/execution/ethereum/db/trie_db.cpp:357]
      0x5603010c00b0: void monad::(anonymous namespace)::process_test<monad::MonadTraits<(monad_revision)8> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, bool)
                      [/Users/user/sources/monad/test/ethereum_test/src/blockchain_test.cpp:508]
      0x5603010ce932: monad::test::BlockchainTest::TestBody()
                      [/Users/user/sources/monad/test/ethereum_test/src/blockchain_test.cpp:786]
      0x5603015bc462: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
      0x5603015a8cae: testing::Test::Run()
      0x5603015a8e35: testing::TestInfo::Run()
      0x5603015a902f: testing::TestSuite::Run()
      0x5603015b2e3c: testing::internal::UnitTestImpl::RunAllTests()
      0x5603015b3325: testing::UnitTest::Run()
      0x560300fd01b8: main.cold
                      [/Users/user/sources/monad/test/ethereum_test/src/main.cpp:132]
      0x77d95f02a578: __libc_start_call_main
                      [../sysdeps/nptl/libc_start_call_main.h:74]
      0x77d95f02a63b: __libc_start_main
                      [../csu/libc-start.c:347]
      0x56030101b275: _start
monad-ethereum-test: /Users/user/sources/monad/category/execution/ethereum/db/trie_db.cpp:357: virtual monad::BlockHeader monad::TrieDb::read_eth_header(): Assertion 'decode_res.has_value()' failed.
assertion failure message: FATAL: Could not decode eth header : overflow

Currently, the decoding code seems to first expect blobGasUsed in the header:

...
            if (payload.size() > 0) {
                BOOST_OUTCOME_TRY(
                    block_header.blob_gas_used,
                    decode_unsigned<uint64_t>(payload));
                BOOST_OUTCOME_TRY(
                    block_header.excess_blob_gas,
                    decode_unsigned<uint64_t>(payload));
                BOOST_OUTCOME_TRY(
                    block_header.parent_beacon_block_root,
                    decode_bytes32(payload));

                if (payload.size() > 0) {
                    BOOST_OUTCOME_TRY(
                        block_header.requests_hash, decode_bytes32(payload));
                }

...

and then requestsHash. In the test block headers, only the latter field is present:

...
            "baseFeePerGas": "0x07",
            "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
...

which I think leads to the decoder interpreting requestsHash as blobGasUsed leading to an overflow error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant