-
Notifications
You must be signed in to change notification settings - Fork 6
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
[R4R]-[fee]feat: fee collection with tokenRatio #6
Conversation
core/vm/runtime/runtime.go
Outdated
@@ -74,7 +74,9 @@ func setDefaults(cfg *Config) { | |||
cfg.Difficulty = new(big.Int) | |||
} | |||
if cfg.GasLimit == 0 { | |||
cfg.GasLimit = math.MaxUint64 | |||
// todo: leo | |||
// cfg.GasLimit = math.MaxUint64 |
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.
Please resolve todo
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.
resolved, delete the todo
directly.
type RunMode uint8 | ||
|
||
const ( | ||
CommitMode RunMode = iota |
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.
Please assign CommitMode
to RunMode
in function TransactionToMessage
. Not a bug. It is strange that CommitMode
is never used.
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.
fixed, set default RunMode
as CommitMode
@@ -499,7 +531,7 @@ func (rs Receipts) DeriveFields(config *params.ChainConfig, hash common.Hash, nu | |||
// Deriving the signer is expensive, only do if it's actually needed | |||
from, _ := Sender(signer, txs[i]) | |||
nonce := txs[i].Nonce() | |||
if rs[i].DepositNonce != nil { | |||
if txs[i].IsDepositTx() && rs[i].DepositNonce != nil { |
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.
txs[i].IsDepositTx()
seems to be not necessary.
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.
We changes the way to store DepositNonce
, so the DepositNonce
will not be nil and the default value will be 0 for non-depositTxs, so add txs[i].IsDepositTx()
to determine the tx type.
No other comment |
Core changes:
tokenRatio
from GasPriceOracleL1 Rollup Fee
&L2 Execution Fee
Releated PR: