feat: add RIP-7560 related APIs#5
Merged
kangsorang merged 8 commits intoapply-rollupcostfrom Nov 7, 2024
Merged
Conversation
- EstimateRip7560TransactionGas - CallRip7560Validation
22fdb32 to
10942e9
Compare
sm-stack
reviewed
Oct 31, 2024
Comment on lines
+66
to
+74
| // 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.
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.
Maybe it won't affect the result, but shouldn't it be like this?
Suggested change
| gasLimit := totalGasLimit - st.PostOpGas | |
| gasLimit := totalGasLimit - st.Gas - st.PostOpGas |
core/state_processor_rip7560.go
Outdated
| header *types.Header, | ||
| tx *types.Transaction, | ||
| cfg vm.Config, | ||
| estimateFlag ...bool, |
There was a problem hiding this comment.
I'm not sure, but how do you think about making the name of this flag allowSigFail, as in at abiDecodeAcceptAccount?
| AuthorizationData: *args.AuthorizationData, | ||
| Paymaster: args.Paymaster, | ||
| PaymasterData: *args.PaymasterData, | ||
| PaymasterData: toByte(args.PaymasterData), |
There was a problem hiding this comment.
Just curious, what was the intention of this?
Author
There was a problem hiding this comment.
Code to prevent nil pointer reference from occurring
sm-stack
approved these changes
Nov 7, 2024
kangsorang
added a commit
that referenced
this pull request
Nov 7, 2024
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add RIP-7560 related APIs
EstimateRip7560TransactionGas
CallRip7560Validation