Commit fcce5b67 authored by Mark Tyneway's avatar Mark Tyneway

fix: update batch submitter to include all ts info

This commit fixes a bug in the batch submitter where not all timestamp
information was being correctly rolled up. This has temporarily caused
certain L1 syncing nodes to generate an incorrect state root. This PR
will be followed by a second PR with an update to the DTL to guarantee
that incorrect timestampd data can be corrected.
parent a135aa3d
---
'@eth-optimism/batch-submitter': patch
---
Updates batch submitter to also include separate timestamps for deposit transactions"
...@@ -138,7 +138,7 @@ services: ...@@ -138,7 +138,7 @@ services:
- dtl - dtl
- l2geth - l2geth
deploy: deploy:
replicas: 0 replicas: 1
build: build:
context: .. context: ..
dockerfile: ./ops/docker/Dockerfile.geth dockerfile: ./ops/docker/Dockerfile.geth
......
...@@ -260,11 +260,20 @@ export class TransportDB { ...@@ -260,11 +260,20 @@ export class TransportDB {
return null return null
} }
// handle backwards compatibility
let timestamp = enqueue.timestamp
if (transaction.timestamp !== 0) {
timestamp = transaction.timestamp
}
// TODO: compute the patch contexts
// else if tx in patchContexts
// timestamp = patchContexts[tx].timestamp
return { return {
...transaction, ...transaction,
...{ ...{
blockNumber: enqueue.blockNumber, blockNumber: enqueue.blockNumber,
timestamp: enqueue.timestamp, timestamp,
gasLimit: enqueue.gasLimit, gasLimit: enqueue.gasLimit,
target: enqueue.target, target: enqueue.target,
origin: enqueue.origin, origin: enqueue.origin,
......
...@@ -143,7 +143,7 @@ export const handleEventsSequencerBatchAppended: EventHandlerSet< ...@@ -143,7 +143,7 @@ export const handleEventsSequencerBatchAppended: EventHandlerSet<
.toNumber(), .toNumber(),
batchIndex: extraData.batchIndex.toNumber(), batchIndex: extraData.batchIndex.toNumber(),
blockNumber: BigNumber.from(0).toNumber(), blockNumber: BigNumber.from(0).toNumber(),
timestamp: BigNumber.from(0).toNumber(), timestamp: context.timestamp,
gasLimit: BigNumber.from(0).toString(), gasLimit: BigNumber.from(0).toString(),
target: constants.AddressZero, target: constants.AddressZero,
origin: constants.AddressZero, origin: constants.AddressZero,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment