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

fix(SELFDESTRUCT): deloyment number #1336

Merged
merged 10 commits into from
Oct 1, 2024

Conversation

OlivierBBB
Copy link
Collaborator

@OlivierBBB OlivierBBB commented Sep 30, 2024

There were several problems:

  • we were updating the deployment number to a fresh new deployment number twice per SELFDESTRUCT
  • the ROM_LEX module had no idea about these fresh new deployments this isn't an issue and was removed
  • we were assuming that DEPLOYMENT_NUMBER_NEW = 1 for any deployment transaction, but this can be at fault in the EVM test suite

There were several problems:
- we were updating the deployment number to a fresh new deployment
number twice per SELFDESTRUCT
- the ROM_LEX module had no idea about these fresh new deployments
- we were assuming that DEPLOYMENT_NUMBER_NEW = 1 for any deployment
transaction, but this can be at fault in the EVM test suite
@OlivierBBB OlivierBBB linked an issue Sep 30, 2024 that may be closed by this pull request
@OlivierBBB OlivierBBB self-assigned this Sep 30, 2024
@letypequividelespoubelles letypequividelespoubelles added bug Something isn't working reference test labels Oct 1, 2024
Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

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

Made some clean up + Idu two things, see comments

}

// @françois what replaces this for message calls to smart contracts ?
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand your question. Why do you want to store the CFI of the smart contract recipient of the tx ? We compute it in the recipient AccountFragment. For the moment, the only place where we read the CFI of a deployment transaction is in TXN_DATA, this is strange ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why do you want to store the CFI of the smart contract recipient of the tx ?

Because the traces require it. The question is when/where does it get computed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

we do it at traceStartTx in the RomLex so this is ok, already done. We can delete the comment, as this method just set the CFI of the initCode in the TransactionProcessingMetadata. It is read only by TXN_DATA for the moment.

Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

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

LGTM

}

// @françois what replaces this for message calls to smart contracts ?
Copy link
Collaborator

Choose a reason for hiding this comment

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

we do it at traceStartTx in the RomLex so this is ok, already done. We can delete the comment, as this method just set the CFI of the initCode in the TransactionProcessingMetadata. It is read only by TXN_DATA for the moment.

@OlivierBBB OlivierBBB enabled auto-merge (squash) October 1, 2024 11:40
@OlivierBBB OlivierBBB merged commit d0fd22c into arith-dev Oct 1, 2024
5 checks passed
@OlivierBBB OlivierBBB deleted the 1335-blockchain-reference-test-612 branch October 1, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reference test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SELFDESTRUCT : Blockchain reference text 612
2 participants