Adding a withdrawal requests to the queue costs 74160 gas per call, which means you can add ~480 withdrawals per block. Within two blocks, the fee to add more withdrawals to the queue will take roughly 2.6 million ETH in the next block. The amount of ETH needed to add another withdrawal will go down over the next blocks, but the curve of the increase is extremely steep. You can kinda think of it as if the 12.5% increase per block of 1559 is only applied every 480 blocks. So whenever this increase applied, the fee not only goes up by 12.5% but by (12.5%)^480, thus the fee increases quite suddenly. The fee will slowly go down on every block, but it will take 126 blocks until the fee is below 1 ETH to add a withdrawal to the queue. This means that an attacker can grief staking pools quite easily. NUMBERS
3/4/2025I'm adding a testcase for EIP-4844 which will be shipped in the Cancun hardfork. The graphql schema will change to include the additional fields in the block and transaction data structures. Refer to https://github.com/ethereum/execution-apis/pull/468 for the schema changes. The graphql simulator https://github.com/ethereum/hive/tree/master/simulators/ethereum/graphql comes with a chain. However this chain does not include 4844 blocks. So we need to update the chain and add new blocks + txes. For that we use https://github.com/s1na/graphqltestgen. graphqltestgen This tool is used to extend an existing chain which at first consisted of only frontier blocks and later extended with post-merge blocks. The benefit here is we can test the response at fork boundaries too. It takes in a genesis configuration assumed to be at ./genesis.json and the RLP-serialized list of blocks at ./chain.rlp. Note: you need to modify the code to implement the kind of block you want to add. The new chain will be written to ./newchain.rlp. Note since the merge forks happen after a given timestamp. Since the new block should be Cancun, the genesis file must be modified with a value for "cancunTime". To calculate the value, we need to know the timestamp of the last block. This is because the chain generator will automatically assign parentBlock + 10 as the timestamp of any new block. So I print the current header with go run main.go head to find out the latest timestamp.
10/3/2023tracer hooks OnBalanceChange(addr common.Address, prev, new *big.Int, reason BalanceChangeReason) OnNonceChange(addr common.Address, prev, new uint64) OnCodeChange(addr common.Address, prevCodeHash common.Hash, prevCode []byte, codeHash common.Hash, code []byte) OnStorageChange(addr common.Address, slot common.Hash, prev, new common.Hash) OnLog(log *types.Log) OnNewAccount(addr common.Address) blockchain
8/8/2023This is a guide on how to write test cases for eth_multicall and execute them. There are several pieces to this puzzle: Tests are implemented in rpctestgen which outputs IO (Json-rpc request response sequence) artefacts. .io files are copied over to Hive simulation rpc-compat Then we can execute the tests against a client using Hive CLI Now let's go over them one by one. Rpctestgen This is a tool written in Go. It creates a chain from code and starts a Geth node with that. The test cases describe the request to be made which is then sent to geth to fill in the response. The test case can do validation of the response and optionally fail to generate the artefact.
6/19/2023