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

Add System Transactions to mainnet #6206

Closed
wants to merge 116 commits into from
Closed

Conversation

Demuirgos
Copy link
Contributor

Fixes Closes Resolves #

Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.

Changes

  • implement systemTx into mainnet

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

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

@rjnrohit rjnrohit mentioned this pull request Jun 28, 2024
16 tasks
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

I think splitting Transaction processors is a bad idea that will bring more harm than good.
I already see updates in main TransactionProcessor that weren't ported to the System one.

I also think that relying on parameters instead of decorators of IWolrdState/ICodeInfoRepository is also not great.

I can rework it, but first wanted to discuss my reservations and questions.

@@ -132,6 +128,8 @@ public bool IsEip158IgnoredAccount(Address address)
public bool IsEip2935Enabled => _spec.IsEip2935Enabled;
public bool IsEip7709Enabled => _spec.IsEip7709Enabled;
public Address Eip2935ContractAddress => _spec.Eip2935ContractAddress;

public bool AuRaSystemCalls => false;
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be _spec.AuRaSystemCalls?

{
throw new InvalidOperationException("Updating balance of a non-existing account");
}
stateProvider.SubtractFromBalance(address, balanceChange, releaseSpec);
Copy link
Member

Choose a reason for hiding this comment

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

This could still underflow?

@@ -256,10 +258,7 @@ private void ValidateProcessedBlock(Block suggestedBlock, ProcessingOptions opti
ReceiptsTracer.SetOtherTracer(blockTracer);
ReceiptsTracer.StartNewBlockTrace(block);

_beaconBlockRootHandler.ApplyContractStateChanges(block, spec, _stateProvider);
_blockhashStore.ApplyBlockhashStateChanges(block.Header);
Copy link
Member

Choose a reason for hiding this comment

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

Is blockhash store also migrated to system calls?

@LukaszRozmej
Copy link
Member

LukaszRozmej commented Jul 9, 2024

closing in favor of #7252

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.

6 participants