-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Tx delayer hashes do not match when submitting blob txs #10824
Comments
Attempts two fixes at e2e epochs test. First, it increases the L1 block time, to account for general CI slowness. Second, it adds more retries to the L1 gas utils getTx, since the e2e epochs test works using the tx delayer, which artificially introduces a delay between a tx being sent and it being available in anvil, so it triggered a timeout in the utils. **Update**: Increasing the retries caused the error to change, we were getting a timeout in teardown. This was caused because the sequencer got stuck in waiting for the tx to be mined for way too long (more than 5 minutes, the afterAll hook timeout), and the `node.stop()` waits for the current loops to end before returning. But what's interesting is _why_ the sequencer got stuck in waiting for its tx to be mined. The tx was being delayed by the tx-delayer, which intercepts txs, manually computes their tx hash to return it to the caller immediately, and holds on the tx to submit it to anvil at a later point in time. What came up is that the tx hash we were manually computing over txs with blobs did not match the tx hash returned by anvil. This has been logged as #10824. However, we can sidestep this issue by just choosing a reasonable value for max attempts so teardown doesn't timeout. --------- Co-authored-by: ludamad <adam.domurad@gmail.com>
Comment by @MirandaWood:
|
Confirmed that tx hash for blob txs is computed omitting the blob. From fn tx_hash_with_type(&self, signature: &Signature, ty: u8) -> alloy_primitives::TxHash {
// eip4844 tx_hash is always based on the non-sidecar encoding
self.tx.tx_hash_with_type(signature, ty)
} Where the encoded fields are: fn rlp_encode_fields(&self, out: &mut dyn alloy_rlp::BufMut) {
self.chain_id.encode(out);
self.nonce.encode(out);
self.max_priority_fee_per_gas.encode(out);
self.max_fee_per_gas.encode(out);
self.gas_limit.encode(out);
self.to.encode(out);
self.value.encode(out);
self.input.0.encode(out);
self.access_list.encode(out);
self.max_fee_per_blob_gas.encode(out);
self.blob_versioned_hashes.encode(out);
} |
The tx delayer computes the hash of a tx manually to return it to the caller. However, the hash it computes and the hash it receives from anvil once it's actually submitted do not match. Tested it with the latest version of anvil and still happens, need to figure out whether this is an issue with viem, anvil, or how we're computing the hash manually.
For reference, we're computing tx hash using the input from
sendRawTx
directly:And that txHash does not match the response from anvil when we actually call
sendRawTx
on it with theserializedTransaction
.See here for a run where it happens consistently.
The text was updated successfully, but these errors were encountered: