diff --git a/cmd/run.go b/cmd/run.go index 3e0161ab95..bda1dd2480 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -416,6 +416,8 @@ func runJSONRPCServer(c config.Config, etherman *etherman.Client, chainID uint64 } func createSequencer(cfg config.Config, pool *pool.Pool, st *state.State, etherman *etherman.Client, eventLog *event.EventLog) *sequencer.Sequencer { + cfg.Sequencer.L2Coinbase = cfg.SequenceSender.L2Coinbase + seq, err := sequencer.New(cfg.Sequencer, cfg.State.Batch, cfg.Pool, pool, st, etherman, eventLog) if err != nil { log.Fatal(err) diff --git a/docs/config-file/node-config-doc.html b/docs/config-file/node-config-doc.html index bdfe21719d..6c0d86709e 100644 --- a/docs/config-file/node-config-doc.html +++ b/docs/config-file/node-config-doc.html @@ -38,7 +38,7 @@
"300ms"
StateConsistencyCheckInterval is the time the sequencer waits to check if a state inconsistency has happened
"1m"
"300ms"
-
ForcedBatchesTimeout is the time the finalizer waits after receiving closing signal to process Forced Batches
"1m"
+
L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase
Must contain a minimum of 20
items
Must contain a maximum of 20
items
ForcedBatchesTimeout is the time the finalizer waits after receiving closing signal to process Forced Batches
"1m"
"300ms"
NewTxsWaitInterval is the time the finalizer sleeps between each iteration, if there are no transactions to be processed
"1m"
"300ms"
diff --git a/docs/config-file/node-config-doc.md b/docs/config-file/node-config-doc.md
index 109d5a860f..de92d44222 100644
--- a/docs/config-file/node-config-doc.md
+++ b/docs/config-file/node-config-doc.md
@@ -1958,16 +1958,17 @@ CheckLastL2BlockHashOnCloseBatch=true
**Type:** : `object`
**Description:** Configuration of the sequencer service
-| Property | Pattern | Type | Deprecated | Definition | Title/Description |
-| ------------------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------ |
-| - [DeletePoolTxsL1BlockConfirmations](#Sequencer_DeletePoolTxsL1BlockConfirmations ) | No | integer | No | - | DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool |
-| - [DeletePoolTxsCheckInterval](#Sequencer_DeletePoolTxsCheckInterval ) | No | string | No | - | Duration |
-| - [TxLifetimeCheckInterval](#Sequencer_TxLifetimeCheckInterval ) | No | string | No | - | Duration |
-| - [TxLifetimeMax](#Sequencer_TxLifetimeMax ) | No | string | No | - | Duration |
-| - [LoadPoolTxsCheckInterval](#Sequencer_LoadPoolTxsCheckInterval ) | No | string | No | - | Duration |
-| - [StateConsistencyCheckInterval](#Sequencer_StateConsistencyCheckInterval ) | No | string | No | - | Duration |
-| - [Finalizer](#Sequencer_Finalizer ) | No | object | No | - | Finalizer's specific config properties |
-| - [StreamServer](#Sequencer_StreamServer ) | No | object | No | - | StreamServerCfg is the config for the stream server |
+| Property | Pattern | Type | Deprecated | Definition | Title/Description |
+| ------------------------------------------------------------------------------------ | ------- | ---------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- |
+| - [DeletePoolTxsL1BlockConfirmations](#Sequencer_DeletePoolTxsL1BlockConfirmations ) | No | integer | No | - | DeletePoolTxsL1BlockConfirmations is blocks amount after which txs will be deleted from the pool |
+| - [DeletePoolTxsCheckInterval](#Sequencer_DeletePoolTxsCheckInterval ) | No | string | No | - | Duration |
+| - [TxLifetimeCheckInterval](#Sequencer_TxLifetimeCheckInterval ) | No | string | No | - | Duration |
+| - [TxLifetimeMax](#Sequencer_TxLifetimeMax ) | No | string | No | - | Duration |
+| - [LoadPoolTxsCheckInterval](#Sequencer_LoadPoolTxsCheckInterval ) | No | string | No | - | Duration |
+| - [StateConsistencyCheckInterval](#Sequencer_StateConsistencyCheckInterval ) | No | string | No | - | Duration |
+| - [L2Coinbase](#Sequencer_L2Coinbase ) | No | array of integer | No | - | L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase |
+| - [Finalizer](#Sequencer_Finalizer ) | No | object | No | - | Finalizer's specific config properties |
+| - [StreamServer](#Sequencer_StreamServer ) | No | object | No | - | StreamServerCfg is the config for the stream server |
### 10.1. `Sequencer.DeletePoolTxsL1BlockConfirmations`
@@ -2113,7 +2114,12 @@ LoadPoolTxsCheckInterval="500ms"
StateConsistencyCheckInterval="5s"
```
-### 10.7. `[Sequencer.Finalizer]`
+### 10.7. `Sequencer.L2Coinbase`
+
+**Type:** : `array of integer`
+**Description:** L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase
+
+### 10.8. `[Sequencer.Finalizer]`
**Type:** : `object`
**Description:** Finalizer's specific config properties
@@ -2136,7 +2142,7 @@ StateConsistencyCheckInterval="5s"
| - [SequentialProcessL2Block](#Sequencer_Finalizer_SequentialProcessL2Block ) | No | boolean | No | - | SequentialProcessL2Block indicates if the processing of a L2 Block must be done in the same finalizer go func instead
in the processPendingL2Blocks go func |
| - [Metrics](#Sequencer_Finalizer_Metrics ) | No | object | No | - | Metrics is the config for the sequencer metrics |
-#### 10.7.1. `Sequencer.Finalizer.ForcedBatchesTimeout`
+#### 10.8.1. `Sequencer.Finalizer.ForcedBatchesTimeout`
**Title:** Duration
@@ -2162,7 +2168,7 @@ StateConsistencyCheckInterval="5s"
ForcedBatchesTimeout="1m0s"
```
-#### 10.7.2. `Sequencer.Finalizer.NewTxsWaitInterval`
+#### 10.8.2. `Sequencer.Finalizer.NewTxsWaitInterval`
**Title:** Duration
@@ -2188,7 +2194,7 @@ ForcedBatchesTimeout="1m0s"
NewTxsWaitInterval="100ms"
```
-#### 10.7.3. `Sequencer.Finalizer.ResourceExhaustedMarginPct`
+#### 10.8.3. `Sequencer.Finalizer.ResourceExhaustedMarginPct`
**Type:** : `integer`
@@ -2202,7 +2208,7 @@ NewTxsWaitInterval="100ms"
ResourceExhaustedMarginPct=10
```
-#### 10.7.4. `Sequencer.Finalizer.ForcedBatchesL1BlockConfirmations`
+#### 10.8.4. `Sequencer.Finalizer.ForcedBatchesL1BlockConfirmations`
**Type:** : `integer`
@@ -2216,7 +2222,7 @@ ResourceExhaustedMarginPct=10
ForcedBatchesL1BlockConfirmations=64
```
-#### 10.7.5. `Sequencer.Finalizer.L1InfoTreeL1BlockConfirmations`
+#### 10.8.5. `Sequencer.Finalizer.L1InfoTreeL1BlockConfirmations`
**Type:** : `integer`
@@ -2230,7 +2236,7 @@ ForcedBatchesL1BlockConfirmations=64
L1InfoTreeL1BlockConfirmations=64
```
-#### 10.7.6. `Sequencer.Finalizer.ForcedBatchesCheckInterval`
+#### 10.8.6. `Sequencer.Finalizer.ForcedBatchesCheckInterval`
**Title:** Duration
@@ -2256,7 +2262,7 @@ L1InfoTreeL1BlockConfirmations=64
ForcedBatchesCheckInterval="10s"
```
-#### 10.7.7. `Sequencer.Finalizer.L1InfoTreeCheckInterval`
+#### 10.8.7. `Sequencer.Finalizer.L1InfoTreeCheckInterval`
**Title:** Duration
@@ -2282,7 +2288,7 @@ ForcedBatchesCheckInterval="10s"
L1InfoTreeCheckInterval="10s"
```
-#### 10.7.8. `Sequencer.Finalizer.BatchMaxDeltaTimestamp`
+#### 10.8.8. `Sequencer.Finalizer.BatchMaxDeltaTimestamp`
**Title:** Duration
@@ -2308,7 +2314,7 @@ L1InfoTreeCheckInterval="10s"
BatchMaxDeltaTimestamp="30m0s"
```
-#### 10.7.9. `Sequencer.Finalizer.L2BlockMaxDeltaTimestamp`
+#### 10.8.9. `Sequencer.Finalizer.L2BlockMaxDeltaTimestamp`
**Title:** Duration
@@ -2334,7 +2340,7 @@ BatchMaxDeltaTimestamp="30m0s"
L2BlockMaxDeltaTimestamp="3s"
```
-#### 10.7.10. `Sequencer.Finalizer.StateRootSyncInterval`
+#### 10.8.10. `Sequencer.Finalizer.StateRootSyncInterval`
**Title:** Duration
@@ -2387,7 +2393,7 @@ StateRootSyncInterval="1h0m0s"
FlushIdCheckInterval="50ms"
```
-#### 10.7.12. `Sequencer.Finalizer.HaltOnBatchNumber`
+#### 10.8.11. `Sequencer.Finalizer.HaltOnBatchNumber`
**Type:** : `integer`
@@ -2402,7 +2408,7 @@ The Sequencer will halt after it closes the batch equal to this number
HaltOnBatchNumber=0
```
-#### 10.7.13. `Sequencer.Finalizer.SequentialBatchSanityCheck`
+#### 10.8.12. `Sequencer.Finalizer.SequentialBatchSanityCheck`
**Type:** : `boolean`
@@ -2417,7 +2423,7 @@ sequential way (instead than in parallel)
SequentialBatchSanityCheck=false
```
-#### 10.7.14. `Sequencer.Finalizer.SequentialProcessL2Block`
+#### 10.8.13. `Sequencer.Finalizer.SequentialProcessL2Block`
**Type:** : `boolean`
@@ -2432,7 +2438,7 @@ in the processPendingL2Blocks go func
SequentialProcessL2Block=false
```
-#### 10.7.15. `[Sequencer.Finalizer.Metrics]`
+#### 10.8.14. `[Sequencer.Finalizer.Metrics]`
**Type:** : `object`
**Description:** Metrics is the config for the sequencer metrics
@@ -2442,7 +2448,7 @@ SequentialProcessL2Block=false
| - [Interval](#Sequencer_Finalizer_Metrics_Interval ) | No | string | No | - | Duration |
| - [EnableLog](#Sequencer_Finalizer_Metrics_EnableLog ) | No | boolean | No | - | EnableLog is a flag to enable/disable metrics logs |
-##### 10.7.15.1. `Sequencer.Finalizer.Metrics.Interval`
+##### 10.8.14.1. `Sequencer.Finalizer.Metrics.Interval`
**Title:** Duration
@@ -2468,7 +2474,7 @@ SequentialProcessL2Block=false
Interval="1h0m0s"
```
-##### 10.7.15.2. `Sequencer.Finalizer.Metrics.EnableLog`
+##### 10.8.14.2. `Sequencer.Finalizer.Metrics.EnableLog`
**Type:** : `boolean`
@@ -2482,7 +2488,7 @@ Interval="1h0m0s"
EnableLog=true
```
-### 10.8. `[Sequencer.StreamServer]`
+### 10.9. `[Sequencer.StreamServer]`
**Type:** : `object`
**Description:** StreamServerCfg is the config for the stream server
@@ -2497,7 +2503,7 @@ EnableLog=true
| - [Log](#Sequencer_StreamServer_Log ) | No | object | No | - | Log is the log configuration |
| - [UpgradeEtrogBatchNumber](#Sequencer_StreamServer_UpgradeEtrogBatchNumber ) | No | integer | No | - | UpgradeEtrogBatchNumber is the batch number of the upgrade etrog |
-#### 10.8.1. `Sequencer.StreamServer.Port`
+#### 10.9.1. `Sequencer.StreamServer.Port`
**Type:** : `integer`
@@ -2511,7 +2517,7 @@ EnableLog=true
Port=0
```
-#### 10.8.2. `Sequencer.StreamServer.Filename`
+#### 10.9.2. `Sequencer.StreamServer.Filename`
**Type:** : `string`
@@ -2525,7 +2531,7 @@ Port=0
Filename=""
```
-#### 10.8.3. `Sequencer.StreamServer.Version`
+#### 10.9.3. `Sequencer.StreamServer.Version`
**Type:** : `integer`
@@ -2539,7 +2545,7 @@ Filename=""
Version=0
```
-#### 10.8.4. `Sequencer.StreamServer.ChainID`
+#### 10.9.4. `Sequencer.StreamServer.ChainID`
**Type:** : `integer`
@@ -2553,7 +2559,7 @@ Version=0
ChainID=0
```
-#### 10.8.5. `Sequencer.StreamServer.Enabled`
+#### 10.9.5. `Sequencer.StreamServer.Enabled`
**Type:** : `boolean`
@@ -2567,7 +2573,7 @@ ChainID=0
Enabled=false
```
-#### 10.8.6. `[Sequencer.StreamServer.Log]`
+#### 10.9.6. `[Sequencer.StreamServer.Log]`
**Type:** : `object`
**Description:** Log is the log configuration
@@ -2578,7 +2584,7 @@ Enabled=false
| - [Level](#Sequencer_StreamServer_Log_Level ) | No | enum (of string) | No | - | - |
| - [Outputs](#Sequencer_StreamServer_Log_Outputs ) | No | array of string | No | - | - |
-##### 10.8.6.1. `Sequencer.StreamServer.Log.Environment`
+##### 10.9.6.1. `Sequencer.StreamServer.Log.Environment`
**Type:** : `enum (of string)`
@@ -2594,7 +2600,7 @@ Must be one of:
* "production"
* "development"
-##### 10.8.6.2. `Sequencer.StreamServer.Log.Level`
+##### 10.9.6.2. `Sequencer.StreamServer.Log.Level`
**Type:** : `enum (of string)`
@@ -2615,11 +2621,11 @@ Must be one of:
* "panic"
* "fatal"
-##### 10.8.6.3. `Sequencer.StreamServer.Log.Outputs`
+##### 10.9.6.3. `Sequencer.StreamServer.Log.Outputs`
**Type:** : `array of string`
-#### 10.8.7. `Sequencer.StreamServer.UpgradeEtrogBatchNumber`
+#### 10.9.7. `Sequencer.StreamServer.UpgradeEtrogBatchNumber`
**Type:** : `integer`
diff --git a/docs/config-file/node-config-schema.json b/docs/config-file/node-config-schema.json
index b50c34b655..05fcba8522 100644
--- a/docs/config-file/node-config-schema.json
+++ b/docs/config-file/node-config-schema.json
@@ -790,6 +790,15 @@
"300ms"
]
},
+ "L2Coinbase": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array",
+ "maxItems": 20,
+ "minItems": 20,
+ "description": "L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase"
+ },
"Finalizer": {
"properties": {
"ForcedBatchesTimeout": {
diff --git a/sequencer/batch.go b/sequencer/batch.go
index 79d84026dd..4ba3f1ee57 100644
--- a/sequencer/batch.go
+++ b/sequencer/batch.go
@@ -306,7 +306,7 @@ func (f *finalizer) openNewWIPBatch(batchNumber uint64, stateRoot common.Hash) *
return &Batch{
batchNumber: batchNumber,
- coinbase: f.sequencerAddress,
+ coinbase: f.l2Coinbase,
initialStateRoot: stateRoot,
imStateRoot: stateRoot,
finalStateRoot: stateRoot,
@@ -323,7 +323,7 @@ func (f *finalizer) insertSIPBatch(ctx context.Context, batchNumber uint64, stat
// open next batch
newStateBatch := state.Batch{
BatchNumber: batchNumber,
- Coinbase: f.sequencerAddress,
+ Coinbase: f.l2Coinbase,
Timestamp: now(),
StateRoot: stateRoot,
GlobalExitRoot: state.ZeroHash,
diff --git a/sequencer/config.go b/sequencer/config.go
index c0bfb8968d..03aeeb740b 100644
--- a/sequencer/config.go
+++ b/sequencer/config.go
@@ -3,6 +3,7 @@ package sequencer
import (
"github.com/0xPolygonHermez/zkevm-data-streamer/log"
"github.com/0xPolygonHermez/zkevm-node/config/types"
+ "github.com/ethereum/go-ethereum/common"
)
// Config represents the configuration of a sequencer
@@ -25,6 +26,9 @@ type Config struct {
// StateConsistencyCheckInterval is the time the sequencer waits to check if a state inconsistency has happened
StateConsistencyCheckInterval types.Duration `mapstructure:"StateConsistencyCheckInterval"`
+ // L2Coinbase defines which address is going to receive the fees. It gets the config value from SequenceSender.L2Coinbase
+ L2Coinbase common.Address `mapstructure:"L2Coinbase"`
+
// Finalizer's specific config properties
Finalizer FinalizerCfg `mapstructure:"Finalizer"`
diff --git a/sequencer/datastreamer.go b/sequencer/datastreamer.go
index 84b56c0a35..fd4a9c5f66 100644
--- a/sequencer/datastreamer.go
+++ b/sequencer/datastreamer.go
@@ -22,7 +22,7 @@ func (f *finalizer) DSSendL2Block(ctx context.Context, batchNumber uint64, block
L1InfoTreeIndex: l1InfoTreeIndex,
L1BlockHash: blockResponse.BlockHashL1,
GlobalExitRoot: blockResponse.GlobalExitRoot,
- Coinbase: f.sequencerAddress,
+ Coinbase: f.l2Coinbase,
ForkID: forkID,
BlockHash: blockHash,
StateRoot: blockResponse.BlockHash, //From etrog, the blockhash is the block root
diff --git a/sequencer/finalizer.go b/sequencer/finalizer.go
index 42d61984c0..919ffa36d7 100644
--- a/sequencer/finalizer.go
+++ b/sequencer/finalizer.go
@@ -35,7 +35,7 @@ var (
type finalizer struct {
cfg FinalizerCfg
isSynced func(ctx context.Context) bool
- sequencerAddress common.Address
+ l2Coinbase common.Address
workerIntf workerInterface
poolIntf txPool
stateIntf stateInterface
@@ -95,7 +95,7 @@ func newFinalizer(
poolIntf txPool,
stateIntf stateInterface,
etherman ethermanInterface,
- sequencerAddr common.Address,
+ l2Coinbase common.Address,
isSynced func(ctx context.Context) bool,
batchConstraints state.BatchConstraintsCfg,
eventLog *event.EventLog,
@@ -106,7 +106,7 @@ func newFinalizer(
f := finalizer{
cfg: cfg,
isSynced: isSynced,
- sequencerAddress: sequencerAddr,
+ l2Coinbase: l2Coinbase,
workerIntf: workerIntf,
poolIntf: poolIntf,
stateIntf: stateIntf,
diff --git a/sequencer/finalizer_test.go b/sequencer/finalizer_test.go
index 6eebfd25d0..a2f04d9887 100644
--- a/sequencer/finalizer_test.go
+++ b/sequencer/finalizer_test.go
@@ -79,11 +79,11 @@ var (
}
// chainID = new(big.Int).SetInt64(400)
// pvtKey = "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e"
- nonce1 = uint64(1)
- nonce2 = uint64(2)
- seqAddr = common.Address{}
- oldHash = common.HexToHash("0x01")
- newHash = common.HexToHash("0x02")
+ nonce1 = uint64(1)
+ nonce2 = uint64(2)
+ l2Coinbase = common.Address{}
+ oldHash = common.HexToHash("0x01")
+ newHash = common.HexToHash("0x02")
// newHash2 = common.HexToHash("0x03")
// stateRootHashes = []common.Hash{oldHash, newHash, newHash2}
// txHash = common.HexToHash("0xf9e4fe4bd2256f782c66cffd76acdb455a76111842bb7e999af2f1b7f4d8d092")
@@ -117,7 +117,7 @@ func TestNewFinalizer(t *testing.T) {
poolMock.On("GetLastSentFlushID", context.Background()).Return(uint64(0), nil)
// arrange and act
- f = newFinalizer(cfg, poolCfg, workerMock, poolMock, stateMock, ethermanMock, seqAddr, isSynced, bc, eventLog, nil, newTimeoutCond(&sync.Mutex{}), nil)
+ f = newFinalizer(cfg, poolCfg, workerMock, poolMock, stateMock, ethermanMock, l2Coinbase, isSynced, bc, eventLog, nil, newTimeoutCond(&sync.Mutex{}), nil)
// assert
assert.NotNil(t, f)
@@ -125,7 +125,7 @@ func TestNewFinalizer(t *testing.T) {
assert.Equal(t, f.workerIntf, workerMock)
assert.Equal(t, poolMock, poolMock)
assert.Equal(t, f.stateIntf, stateMock)
- assert.Equal(t, f.sequencerAddress, seqAddr)
+ assert.Equal(t, f.l2Coinbase, l2Coinbase)
assert.Equal(t, f.batchConstraints, bc)
}
@@ -2197,7 +2197,7 @@ func setupFinalizer(withWipBatch bool) *finalizer {
}
wipBatch = &Batch{
batchNumber: 1,
- coinbase: seqAddr,
+ coinbase: l2Coinbase,
initialStateRoot: oldHash,
imStateRoot: newHash,
timestamp: now(),
@@ -2213,7 +2213,7 @@ func setupFinalizer(withWipBatch bool) *finalizer {
return &finalizer{
cfg: cfg,
isSynced: isSynced,
- sequencerAddress: seqAddr,
+ l2Coinbase: l2Coinbase,
workerIntf: workerMock,
poolIntf: poolMock,
stateIntf: stateMock,
diff --git a/sequencer/forcedbatch.go b/sequencer/forcedbatch.go
index 3dbce0b512..de1082c347 100644
--- a/sequencer/forcedbatch.go
+++ b/sequencer/forcedbatch.go
@@ -85,7 +85,7 @@ func (f *finalizer) processForcedBatch(ctx context.Context, forcedBatch state.Fo
// Open new batch on state for the forced batch
processingCtx := state.ProcessingContext{
BatchNumber: newBatchNumber,
- Coinbase: f.sequencerAddress,
+ Coinbase: f.l2Coinbase,
Timestamp: time.Now(),
GlobalExitRoot: forcedBatch.GlobalExitRoot,
ForcedBatchNum: &forcedBatch.ForcedBatchNumber,
@@ -101,7 +101,7 @@ func (f *finalizer) processForcedBatch(ctx context.Context, forcedBatch state.Fo
ForcedBlockHashL1: fbL1Block.ParentHash,
OldStateRoot: stateRoot,
Transactions: forcedBatch.RawTxsData,
- Coinbase: f.sequencerAddress,
+ Coinbase: f.l2Coinbase,
TimestampLimit_V2: uint64(forcedBatch.ForcedAt.Unix()),
ForkID: f.stateIntf.GetForkIDByBatchNumber(lastBatchNumber),
SkipVerifyL1InfoRoot_V2: true,
diff --git a/sequencer/sequencer.go b/sequencer/sequencer.go
index 227229186c..d4b4ba6594 100644
--- a/sequencer/sequencer.go
+++ b/sequencer/sequencer.go
@@ -12,7 +12,6 @@ import (
"github.com/0xPolygonHermez/zkevm-node/pool"
"github.com/0xPolygonHermez/zkevm-node/state"
"github.com/0xPolygonHermez/zkevm-node/state/datastream"
- "github.com/ethereum/go-ethereum/common"
"google.golang.org/protobuf/proto"
)
@@ -38,18 +37,11 @@ type Sequencer struct {
streamServer *datastreamer.StreamServer
dataToStream chan interface{}
- address common.Address
-
numberOfStateInconsistencies uint64
}
// New init sequencer
func New(cfg Config, batchCfg state.BatchConfig, poolCfg pool.Config, txPool txPool, stateIntf stateInterface, etherman ethermanInterface, eventLog *event.EventLog) (*Sequencer, error) {
- addr, err := etherman.TrustedSequencer()
- if err != nil {
- return nil, fmt.Errorf("failed to get trusted sequencer address, error: %v", err)
- }
-
sequencer := &Sequencer{
cfg: cfg,
batchCfg: batchCfg,
@@ -57,7 +49,6 @@ func New(cfg Config, batchCfg state.BatchConfig, poolCfg pool.Config, txPool txP
pool: txPool,
stateIntf: stateIntf,
etherman: etherman,
- address: addr,
eventLog: eventLog,
}
@@ -101,7 +92,7 @@ func (s *Sequencer) Start(ctx context.Context) {
s.workerReadyTxsCond = newTimeoutCond(&sync.Mutex{})
s.worker = NewWorker(s.stateIntf, s.batchCfg.Constraints, s.workerReadyTxsCond)
- s.finalizer = newFinalizer(s.cfg.Finalizer, s.poolCfg, s.worker, s.pool, s.stateIntf, s.etherman, s.address, s.isSynced, s.batchCfg.Constraints, s.eventLog, s.streamServer, s.workerReadyTxsCond, s.dataToStream)
+ s.finalizer = newFinalizer(s.cfg.Finalizer, s.poolCfg, s.worker, s.pool, s.stateIntf, s.etherman, s.cfg.L2Coinbase, s.isSynced, s.batchCfg.Constraints, s.eventLog, s.streamServer, s.workerReadyTxsCond, s.dataToStream)
go s.finalizer.Start(ctx)
go s.loadFromPool(ctx)