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

CALL's to precompiles #869

Open
Tracked by #865
OlivierBBB opened this issue Jul 25, 2024 · 1 comment
Open
Tracked by #865

CALL's to precompiles #869

OlivierBBB opened this issue Jul 25, 2024 · 1 comment

Comments

@OlivierBBB
Copy link
Collaborator

OlivierBBB commented Jul 25, 2024

Question 1: If a CALL-type isntruction is carried out and the target is a precompile (i.e. its address is in the range $\lbrace1, 2, \dots, 9\rbrace$) does Besu create and enter a child frame ? In particular will it trigger TraceContextEnter/TraceContextExit/TraceContextReEntry ?

Our definition of carried out:

  • no exception
  • no abort (i.e. sufficient balance & creator call stack depth < 1024)
@lu-pinto
Copy link
Collaborator

lu-pinto commented Aug 9, 2024

Yes it will create a child frame and execute it just as another type of CALL (EOA, contract) - I don't see any distinction while executing a CALL operation at the parent level here.
It will call TraceContextEnter and TraceContextExit on the child frame, though on the precompile, the child would take a slightly different code path, instead of going through the EVM code executor. Precompiles seem to be implemented in Java or native code directly and so it will call a TracePrecompileCall event. After it has finished the proper ending state is set back CODE_SUCCESS, HALT and it follows the same code path as without precompile.

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

No branches or pull requests

2 participants