Skip to content

feat: post tx hooks #54

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: post tx hooks #54

wants to merge 4 commits into from

Conversation

vladjdk
Copy link
Member

@vladjdk vladjdk commented Apr 4, 2025

Reopening the PR #2 from @Reecepbcups

Closes #18

@vladjdk vladjdk requested a review from a team as a code owner April 4, 2025 16:12
@vladjdk vladjdk changed the title Reece/post tx hooks feat: post tx hooks Apr 4, 2025
@vladjdk vladjdk requested review from Copilot and removed request for a team April 11, 2025 22:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

x/vm/keeper/state_transition.go:212

  • The variable 'txConfig' is referenced but not defined in the provided context. Ensure that 'txConfig' is properly declared or passed in.
TxHash:            txConfig.TxHash,

x/vm/keeper/state_transition.go:231

  • The variable 'commit' is used without being defined in the diff. Please ensure that 'commit' is correctly declared or initialized.
else if commit != nil {

Copy link
Contributor

@Eric-Warehime Eric-Warehime left a comment

Choose a reason for hiding this comment

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

Looks good, but I think we should add tests around some of the success and failure conditions here, especially since this is modifying the state transition function.

Comment on lines +200 to +203
cumulativeGasUsed += ctx.BlockGasMeter().GasConsumed()
if cumulativeGasUsed > limit {
cumulativeGasUsed = limit
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not too familiar with this code path at this point, but is this the expected behavior? Possibly we should be stopping execution if we've gone over the gas limit and returning a out of gas error?

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.

[Feature]: add hooks after an EVM Tx is processed but before it is commited
3 participants