@@ -54,7 +54,7 @@ func NewDataSourceFactory(log log.Logger, cfg *rollup.Config, fetcher L1Fetcher,
5454 altDAEnabled : cfg .AltDAEnabled (),
5555 batchAuthenticatorAddress : cfg .BatchAuthenticatorAddress ,
5656 batchAuthLookbackWindow : cfg .BatchAuthLookbackWindowOrDefault (),
57- espressoEnforcementTime : cfg .EspressoEnforcementTime ,
57+ espressoTime : cfg .EspressoTime ,
5858 }
5959 return & DataSourceFactory {
6060 log : log ,
@@ -68,12 +68,12 @@ func NewDataSourceFactory(log log.Logger, cfg *rollup.Config, fetcher L1Fetcher,
6868
6969// OpenData returns the appropriate data source for the L1 block `ref`.
7070//
71- // The Espresso enforcement gate is evaluated against the L1 origin time
72- // (ref.Time), mirroring the upstream pattern used for ecotoneTime: the
73- // data-source layer is per-L1-block, so it gates on L1 time. The fork timestamp
74- // itself is conceptually an L2 timestamp but the per-L1-block decision is
75- // stable as long as L1 origin time and L2 block time are within
76- // MaxSequencerDrift of each other (always true on a healthy chain).
71+ // The Espresso gate is evaluated against the L1 origin time (ref.Time),
72+ // mirroring the upstream pattern used for ecotoneTime: the data-source layer
73+ // is per-L1-block, so it gates on L1 time. The fork timestamp itself is
74+ // conceptually an L2 timestamp but the per-L1-block decision is stable as
75+ // long as L1 origin time and L2 block time are within MaxSequencerDrift of
76+ // each other (always true on a healthy chain).
7777func (ds * DataSourceFactory ) OpenData (ctx context.Context , ref eth.L1BlockRef , batcherAddr common.Address ) (DataIter , error ) {
7878 // Creates a data iterator from blob or calldata source so we can forward it to the altDA source
7979 // if enabled as it still requires an L1 data source for fetching input commmitments.
@@ -99,25 +99,25 @@ type DataSourceConfig struct {
9999 batchInboxAddress common.Address
100100 altDAEnabled bool
101101 // batchAuthenticatorAddress is the L1 address of the BatchAuthenticator contract.
102- // Event-based authentication via this contract is required only post-EspressoEnforcement
102+ // Event-based authentication via this contract is required only post-Espresso
103103 // activation; pre-fork the data source uses upstream sender-based authorization.
104104 batchAuthenticatorAddress common.Address
105105 // batchAuthLookbackWindow is the number of L1 blocks to scan for BatchInfoAuthenticated events.
106106 batchAuthLookbackWindow uint64
107- // espressoEnforcementTime is the activation timestamp of the Espresso enforcement
108- // hardfork. When the L1 origin time of the block being scanned is >=
109- // *espressoEnforcementTime (and this pointer is non-nil), batches must be
110- // authenticated by emitted BatchInfoAuthenticated events. Otherwise upstream
111- // sender-based authorization applies.
112- espressoEnforcementTime * uint64
107+ // espressoTime is the activation timestamp of the Espresso hardfork. When the
108+ // L1 origin time of the block being scanned is >= *espressoTime (and this
109+ // pointer is non-nil), batches must be authenticated by emitted
110+ // BatchInfoAuthenticated events. Otherwise upstream sender-based
111+ // authorization applies.
112+ espressoTime * uint64
113113}
114114
115- // isEspressoEnforcement returns true if Espresso enforcement is active for the
116- // given L1 origin time. The fork is conceptually an L2-timestamp hardfork but
117- // the per-L1-block data-source decision is gated on L1 origin time, mirroring
115+ // isEspresso returns true if the Espresso hardfork is active for the given L1
116+ // origin time. The fork is conceptually an L2-timestamp hardfork but the
117+ // per-L1-block data-source decision is gated on L1 origin time, mirroring
118118// upstream's ecotoneTime treatment.
119- func (c DataSourceConfig ) isEspressoEnforcement (l1OriginTime uint64 ) bool {
120- return c .espressoEnforcementTime != nil && l1OriginTime >= * c .espressoEnforcementTime
119+ func (c DataSourceConfig ) isEspresso (l1OriginTime uint64 ) bool {
120+ return c .espressoTime != nil && l1OriginTime >= * c .espressoTime
121121}
122122
123123// isValidBatchTx checks basic transaction validity for batch submission:
@@ -142,7 +142,7 @@ func isValidBatchTx(tx *types.Transaction, batchInboxAddr common.Address, logger
142142
143143// isAuthorizedBatchSender performs upstream-style sender-based authorization: it
144144// recovers the L1 sender of the transaction and checks it matches the configured
145- // batcher address. This is the pre-EspressoEnforcement authorization path.
145+ // batcher address. This is the pre-Espresso authorization path.
146146func isAuthorizedBatchSender (tx * types.Transaction , l1Signer types.Signer , batcherAddr common.Address , logger log.Logger ) bool {
147147 sender , err := l1Signer .Sender (tx )
148148 if err != nil {
@@ -162,12 +162,12 @@ func isAuthorizedBatchSender(tx *types.Transaction, l1Signer types.Signer, batch
162162// block (passed as l1OriginTime), mirroring the data-source layer's ecotoneTime
163163// treatment.
164164//
165- // Pre-EspressoEnforcement (l1OriginTime < *EspressoEnforcementTime , or unset):
165+ // Pre-Espresso (l1OriginTime < *EspressoTime , or unset):
166166//
167167// upstream behavior — the L1 sender of the transaction must match the configured
168168// batcher address. The authenticatedHashes map is unused.
169169//
170- // Post-EspressoEnforcement :
170+ // Post-Espresso :
171171//
172172// the batch's commitment hash must appear in authenticatedHashes (i.e. a
173173// BatchInfoAuthenticated event was emitted for this commitment within the
@@ -181,7 +181,7 @@ func isBatchTxAuthorized(
181181 l1OriginTime uint64 ,
182182 logger log.Logger ,
183183) bool {
184- if ! dsCfg .isEspressoEnforcement (l1OriginTime ) {
184+ if ! dsCfg .isEspresso (l1OriginTime ) {
185185 // Pre-fork: upstream sender-based authorization.
186186 return isAuthorizedBatchSender (tx , dsCfg .l1Signer , batcherAddr , logger )
187187 }
0 commit comments