-
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
remove check performed in the mempool #1708
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 |
---|---|---|
|
@@ -499,10 +499,6 @@ func (e *enclaveImpl) SubmitTx(tx common.EncryptedTx) (*responses.RawTx, common. | |
if e.crossChainProcessors.Local.IsSyntheticTransaction(*decryptedTx) { | ||
return responses.AsPlaintextError(responses.ToInternalError(fmt.Errorf("synthetic transaction coming from external rpc"))), nil | ||
} | ||
if err = e.checkGas(decryptedTx); err != nil { | ||
e.logger.Info("gas check failed", log.ErrKey, err.Error()) | ||
return responses.AsEncryptedError(err, vkHandler), nil | ||
} | ||
|
||
if err = e.service.SubmitTransaction(decryptedTx); err != nil { | ||
e.logger.Debug("Could not submit transaction", log.TxKey, decryptedTx.Hash(), log.ErrKey, err) | ||
Comment on lines
503
to
504
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 error handling for the Confirm that the error encryption process is secure and that the error messages are generic enough to not reveal details that could be exploited by an attacker.
Comment on lines
499
to
504
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 removal of the gas check logic in the |
||
|
@@ -1436,18 +1432,6 @@ func (e *revertError) ErrorData() interface{} { | |
return e.reason | ||
} | ||
|
||
func (e *enclaveImpl) checkGas(tx *types.Transaction) error { | ||
txGasPrice := tx.GasPrice() | ||
if txGasPrice == nil { | ||
return fmt.Errorf("rejected transaction %s. No gas price was set", tx.Hash()) | ||
} | ||
minGasPrice := e.config.MinGasPrice | ||
if txGasPrice.Cmp(minGasPrice) == -1 { | ||
return fmt.Errorf("rejected transaction %s. Gas price was only %d, wanted at least %d", tx.Hash(), txGasPrice, minGasPrice) | ||
} | ||
return nil | ||
} | ||
|
||
// Returns the params extracted from an eth_getLogs request. | ||
func extractGetLogsParams(paramList []interface{}) (*filters.FilterCriteria, *gethcommon.Address, error) { | ||
// We extract the first param, the filter for the logs. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ func (s *sequencer) createGenesisBatch(block *common.L1Block) error { | |
|
||
// produce batch #2 which has the message bus and any other system contracts | ||
cb, err := s.produceBatch( | ||
batch.Header.SequencerOrderNo.Add(batch.Header.SequencerOrderNo, big.NewInt(1)), | ||
big.NewInt(0).Add(batch.Header.SequencerOrderNo, big.NewInt(1)), | ||
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. this was the major source of all flakyness. |
||
block.Hash(), | ||
batch.Hash(), | ||
common.L2Transactions{msgBusTx}, | ||
|
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.
this check is performed again in the geth mempool, and returns better errors