-
Notifications
You must be signed in to change notification settings - Fork 38
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
Revert "Gaslimit + gascap flags" #1717
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,10 @@ type enclaveImpl struct { | |
service nodetype.NodeType | ||
registry components.BatchRegistry | ||
|
||
// todo (#627) - use the ethconfig.Config instead | ||
GlobalGasCap uint64 // 5_000_000_000, // todo (#627) - make config | ||
BaseFee *big.Int // gethcommon.Big0, | ||
|
||
mgmtContractLib mgmtcontractlib.MgmtContractLib | ||
attestationProvider components.AttestationProvider // interface for producing attestation reports and verifying them | ||
|
||
|
@@ -180,7 +184,7 @@ func NewEnclave( | |
|
||
gasOracle := gas.NewGasOracle() | ||
blockProcessor := components.NewBlockProcessor(storage, crossChainProcessors, gasOracle, logger) | ||
batchExecutor := components.NewBatchExecutor(storage, crossChainProcessors, genesis, gasOracle, chainConfig, config.GasBatchExecutionLimit, logger) | ||
batchExecutor := components.NewBatchExecutor(storage, crossChainProcessors, genesis, gasOracle, chainConfig, logger) | ||
sigVerifier, err := components.NewSignatureValidator(config.SequencerID, storage) | ||
registry := components.NewBatchRegistry(storage, logger) | ||
rProducer := components.NewRollupProducer(config.SequencerID, storage, registry, logger) | ||
|
@@ -218,7 +222,7 @@ func NewEnclave( | |
MaxBatchSize: config.MaxBatchSize, | ||
MaxRollupSize: config.MaxRollupSize, | ||
GasPaymentAddress: config.GasPaymentAddress, | ||
BatchGasLimit: config.GasBatchExecutionLimit, | ||
BatchGasLimit: config.GasLimit, | ||
BaseFee: config.BaseFee, | ||
}, | ||
blockchain, | ||
|
@@ -233,7 +237,6 @@ func NewEnclave( | |
genesis, | ||
logger, | ||
registry, | ||
config.GasLocalExecutionCapFlag, | ||
) | ||
|
||
// ensure cached chain state data is up-to-date using the persisted batch data | ||
|
@@ -272,6 +275,9 @@ func NewEnclave( | |
registry: registry, | ||
service: service, | ||
|
||
GlobalGasCap: 5_000_000_000, // todo (#627) - make config | ||
BaseFee: gethcommon.Big0, | ||
Comment on lines
+278
to
+279
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
mainMutex: sync.Mutex{}, | ||
} | ||
} | ||
|
@@ -1022,7 +1028,7 @@ func (e *enclaveImpl) EstimateGas(encryptedParams common.EncryptedParamsEstimate | |
return responses.AsEncryptedError(err, vkHandler), nil | ||
} | ||
|
||
executionGasEstimate, err := e.DoEstimateGas(callMsg, blockNumber, e.config.GasLocalExecutionCapFlag) | ||
executionGasEstimate, err := e.DoEstimateGas(callMsg, blockNumber, e.GlobalGasCap) | ||
if err != nil { | ||
err = fmt.Errorf("unable to estimate transaction - %w", err) | ||
|
||
|
@@ -1149,7 +1155,7 @@ func (e *enclaveImpl) DoEstimateGas(args *gethapi.TransactionArgs, blkNumber *ge | |
} | ||
hi = block.GasLimit() | ||
*/ | ||
hi = e.config.GasLocalExecutionCapFlag | ||
hi = e.GlobalGasCap | ||
} | ||
// Normalize the max fee per gas the call is willing to spend. | ||
var feeCap *big.Int | ||
Comment on lines
+1158
to
1161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ type SequencerSettings struct { | |
MaxBatchSize uint64 | ||
MaxRollupSize uint64 | ||
GasPaymentAddress gethcommon.Address | ||
BatchGasLimit uint64 | ||
BatchGasLimit *big.Int | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
BaseFee *big.Int | ||
} | ||
|
||
|
@@ -138,6 +138,7 @@ func (s *sequencer) createGenesisBatch(block *common.L1Block) error { | |
uint64(time.Now().Unix()), | ||
s.settings.GasPaymentAddress, | ||
s.settings.BaseFee, | ||
s.settings.BatchGasLimit, | ||
) | ||
if err != nil { | ||
return err | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The consolidation of
GasBatchExecutionLimit
andGasLocalExecutionCapFlag
into a singleGasLimit
field simplifies the configuration. Ensure that all usages of the old fields are updated to useGasLimit
.