Skip to content

feat: add RIP-7560 related APIs#5

Merged
kangsorang merged 8 commits intoapply-rollupcostfrom
add-rip7560-api
Nov 7, 2024
Merged

feat: add RIP-7560 related APIs#5
kangsorang merged 8 commits intoapply-rollupcostfrom
add-rip7560-api

Conversation

@kangsorang
Copy link
Copy Markdown

Description

Add RIP-7560 related APIs

  • EstimateRip7560TransactionGas

  • CallRip7560Validation

@kangsorang kangsorang requested a review from sm-stack October 24, 2024 08:06
- EstimateRip7560TransactionGas
- CallRip7560Validation
@kangsorang kangsorang marked this pull request as draft October 24, 2024 08:58
@kangsorang kangsorang marked this pull request as ready for review October 30, 2024 06:15
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)
//}
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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?

Suggested change
gasLimit := totalGasLimit - st.PostOpGas
gasLimit := totalGasLimit - st.Gas - st.PostOpGas

header *types.Header,
tx *types.Transaction,
cfg vm.Config,
estimateFlag ...bool,
Copy link
Copy Markdown

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?

AuthorizationData: *args.AuthorizationData,
Paymaster: args.Paymaster,
PaymasterData: *args.PaymasterData,
PaymasterData: toByte(args.PaymasterData),
Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Author

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

@kangsorang kangsorang requested a review from sm-stack November 5, 2024 07:20
@kangsorang kangsorang merged commit 5f71849 into apply-rollupcost 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants