Skip to content

replace MessageRunMode with a struct #373

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

Merged
merged 27 commits into from
Jun 27, 2025
Merged

replace MessageRunMode with a struct #373

merged 27 commits into from
Jun 27, 2025

Conversation

magicxyyz
Copy link
Contributor

@magicxyyz magicxyyz commented Nov 8, 2024

This PR:

  • replaces MessageRunMode enum with MessageRunContext struct, that apart from run mode now contains wasm cache tag and wasm targets list
  • Refactors passing of wasm targets and wasm cache tag, so they are no longer wired through cachingDB and ethdb.Database

Resolves NIT-2827

@cla-bot cla-bot bot added the s CLA signed label Nov 8, 2024
@magicxyyz magicxyyz marked this pull request as ready for review November 15, 2024 15:05
@magicxyyz magicxyyz requested a review from tsahee January 13, 2025 15:42
@eljobe
Copy link
Member

eljobe commented Apr 1, 2025

Assigning to @magicxyyz to clean up the conflicts and resolve review feedback.

@tsahee
Copy link
Collaborator

tsahee commented Apr 14, 2025

I want this to wait until after we cut the Arbos-40 WasmModuleRoot

}

func ApplyTransactionWithResultFilter(evm *vm.EVM, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, runMode MessageRunMode, resultFilter func(*ExecutionResult) error) (*types.Receipt, *ExecutionResult, error) {
msg, err := TransactionToMessage(tx, types.MakeSigner(evm.ChainConfig(), header.Number, header.Time, evm.Context.ArbOSVersion), header.BaseFee, runMode)
func ApplyTransactionWithResultFilter(evm *vm.EVM, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, runCtx *MessageRunContext, resultFilter func(*ExecutionResult) error) (*types.Receipt, *ExecutionResult, error) {
Copy link
Contributor Author

@magicxyyz magicxyyz Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put resultFilter into MessageRunContext? (not urgent)

tsahee
tsahee previously approved these changes Jun 26, 2025
Copy link
Collaborator

@tsahee tsahee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another small suggestion for later

Copy link
Collaborator

@tsahee tsahee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tsahee tsahee merged commit 329d12f into master Jun 27, 2025
14 checks passed
@tsahee tsahee deleted the run-mode-struct branch June 27, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants