-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add RIP-7560 related APIs #5
Conversation
- EstimateRip7560TransactionGas - CallRip7560Validation
22fdb32
to
10942e9
Compare
// TODO(sm-stack): Configure RIP-7560 enabled devnet option | ||
//header, err := headerByNumberOrHash(ctx, s.b, *blockNrOrHash) | ||
//if err != nil { | ||
// return nil, err | ||
//} | ||
|
||
//if s.b.ChainConfig().IsRIP7560(header.Number) { | ||
// return nil, fmt.Errorf("cannot call RIP-7560 validation on pre-rip7560 block %v", header.Number) | ||
//} |
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.
Not for local devnets, but we can now uncomment this for Pioneer Alpha, right?
if err != nil { | ||
return 0, err | ||
} | ||
gasLimit := totalGasLimit - st.PostOpGas |
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.
Maybe it won't affect the result, but shouldn't it be like this?
gasLimit := totalGasLimit - st.PostOpGas | |
gasLimit := totalGasLimit - st.Gas - st.PostOpGas |
core/state_processor_rip7560.go
Outdated
@@ -352,7 +352,13 @@ func ApplyRip7560ValidationPhases( | |||
header *types.Header, | |||
tx *types.Transaction, | |||
cfg vm.Config, | |||
estimateFlag ...bool, |
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.
I'm not sure, but how do you think about making the name of this flag allowSigFail
, as in at abiDecodeAcceptAccount
?
@@ -537,9 +582,9 @@ func (args *TransactionArgs) ToTransaction() *types.Transaction { | |||
Sender: args.Sender, | |||
AuthorizationData: *args.AuthorizationData, | |||
Paymaster: args.Paymaster, | |||
PaymasterData: *args.PaymasterData, | |||
PaymasterData: toByte(args.PaymasterData), |
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.
Just curious, what was the intention of this?
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.
Code to prevent nil pointer reference from occurring
* feat: add RIP-7560 related API - EstimateRip7560TransactionGas - CallRip7560Validation * fix: nil case handling for RIP-7560 transaction field * feat: set allowSigFail operation based on estimation condition * feat: set 7560-related default fields in transaction_args * feat: modify response format of estimate 7560 transaction * feat: setting defaults for nil case in ValidationGas * feat: adjust PR review * chore: change Rip7560PullUrl
Description
Add RIP-7560 related APIs
EstimateRip7560TransactionGas
CallRip7560Validation