Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: precompiles are considered COLD when using BESU frame method #1079

Merged

Conversation

letypequividelespoubelles
Copy link
Collaborator

No description provided.

Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
@letypequividelespoubelles letypequividelespoubelles added the bug Something isn't working label Sep 3, 2024
@letypequividelespoubelles letypequividelespoubelles linked an issue Sep 3, 2024 that may be closed by this pull request
@@ -88,16 +96,15 @@ private void stpCallForCalls(Hub hub) {
default -> throw new IllegalArgumentException(
"STP module triggered for a non CALL-type instruction");
};
this.warm = frame.isAddressWarm(to);
this.warm = frame.isAddressWarm(to) || isPrecompile(to);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the only non-formatting change

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is a potentially a bug. Did you notice this with the ToyExecutionEnvironmentV2 or with replay tests @letypequividelespoubelles ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

with replayTest, but the bug comes from a @FlorianHuc 's block with a BESU node

Copy link
Collaborator

@OlivierBBB OlivierBBB left a comment

Choose a reason for hiding this comment

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

The only thing I'm worried about now is in our tracing of account-rows: do we have to manually insert the warmth of precompiles @letypequividelespoubelles ? Given that Besu does not recognize precompiles as inherently warm.

@letypequividelespoubelles
Copy link
Collaborator Author

The only thing I'm worried about now is in our tracing of account-rows: do we have to manually insert the warmth of precompiles @letypequividelespoubelles ? Given that Besu does not recognize precompiles as inherently warm.

Yes, Besu manually add the warmth of precompile when itr deals with calls : see https://github.com/hyperledger/besu/blob/65240fdf4697a81824048d453a0d9818c37c2c3d/evm/src/main/java/org/hyperledger/besu/evm/gascalculator/BerlinGasCalculator.java#L169 (TY @ahamlat ).

I'll create a method and check that all usage of isAdressWarm are ok.

Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
@letypequividelespoubelles letypequividelespoubelles merged commit b49285c into arith-dev Sep 3, 2024
6 checks passed
@letypequividelespoubelles letypequividelespoubelles deleted the fix/issue-1067/some-more-CALL-issue branch September 3, 2024 13:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2019510-2019519
2 participants