diff --git a/go/enclave/components/rollup_producer.go b/go/enclave/components/rollup_producer.go index a5b8746d6f..96b4d9d9e4 100644 --- a/go/enclave/components/rollup_producer.go +++ b/go/enclave/components/rollup_producer.go @@ -20,15 +20,15 @@ import ( ) type rollupProducerImpl struct { - sequencerID gethcommon.Address + enclaveID gethcommon.Address storage storage.Storage batchRegistry BatchRegistry logger gethlog.Logger } -func NewRollupProducer(sequencerID gethcommon.Address, storage storage.Storage, batchRegistry BatchRegistry, logger gethlog.Logger) RollupProducer { +func NewRollupProducer(enclaveID gethcommon.Address, storage storage.Storage, batchRegistry BatchRegistry, logger gethlog.Logger) RollupProducer { return &rollupProducerImpl{ - sequencerID: sequencerID, + enclaveID: enclaveID, logger: logger, batchRegistry: batchRegistry, storage: storage, @@ -54,7 +54,7 @@ func (re *rollupProducerImpl) CreateInternalRollup(fromBatchNo uint64, upToL1Hei rh := common.RollupHeader{} rh.CompressionL1Head = block.Hash() - rh.EnclaveID = re.sequencerID + rh.EnclaveID = re.enclaveID rh.CrossChainMessages = make([]MessageBus.StructsCrossChainMessage, 0) for _, b := range batches { diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 35328c9003..d401979cb2 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -171,7 +171,7 @@ func NewEnclave( batchExecutor := components.NewBatchExecutor(storage, gethEncodingService, crossChainProcessors, genesis, gasOracle, chainConfig, config.GasBatchExecutionLimit, logger) sigVerifier, err := components.NewSignatureValidator(config.SequencerID, storage) registry := components.NewBatchRegistry(storage, logger) - rProducer := components.NewRollupProducer(config.SequencerID, storage, registry, logger) + rProducer := components.NewRollupProducer(enclaveKey.EnclaveID(), storage, registry, logger) if err != nil { logger.Crit("Could not initialise the signature validator", log.ErrKey, err) }