Skip to content
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

Transaction processor refactor #5799

Merged
merged 40 commits into from
Jun 19, 2023
Merged

Transaction processor refactor #5799

merged 40 commits into from
Jun 19, 2023

Conversation

jmederosalvarado
Copy link
Member

@jmederosalvarado jmederosalvarado commented Jun 12, 2023

Changes

  • Basically splits TransactionProcessor.Execute logic into multiple virtual methods to improve on both readability and extensibility.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Pre-Merge Posdao Tests passed
Post-Merge Posdao Tests passed

@jmederosalvarado jmederosalvarado marked this pull request as ready for review June 12, 2023 12:39
Copy link
Contributor

@marcindsobczak marcindsobczak left a comment

Choose a reason for hiding this comment

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

Looks correct

if (!noValidation) _worldState.SubtractFromBalance(caller, senderReservedGasPayment, spec);
if (commit)
if (validate)
_worldState.SubtractFromBalance(tx.SenderAddress, senderReservedGasPayment, spec);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can move it inside if, as senderReservedGasPayment for system txs is zero

@jmederosalvarado jmederosalvarado merged commit bed6a37 into master Jun 19, 2023
61 checks passed
@jmederosalvarado jmederosalvarado deleted the refactor/tx-processor branch June 19, 2023 09:47
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.

None yet

8 participants