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

Investigate cancun SELFDESTRUCT anomalies #936

Open
david-bakin-sl opened this issue Sep 11, 2024 · 2 comments
Open

Investigate cancun SELFDESTRUCT anomalies #936

david-bakin-sl opened this issue Sep 11, 2024 · 2 comments
Assignees

Comments

@david-bakin-sl
Copy link
Member

david-bakin-sl commented Sep 11, 2024

Reported questions about SELFDESTRUCT and BLOBBASEFEE (from test/examples in this repo).

Update: BLOBBASEFEE found to be an bug - issue #237

@david-bakin-sl
Copy link
Member Author

david-bakin-sl commented Oct 22, 2024

See #16091 for BLOBBASEFEE issue. SELFDESTRUCT issue still being investigated.

@david-bakin-sl
Copy link
Member Author

Issue reported for SELFDESTRUCT is that EIP-6780 clearly states that the target address for the sweep aka the beneficiary aka the obtainer (in our code for contract delete) can be the contract address itself and there are two cases:

  • SELFDESTRUCT different transaction than contract created - this is the case where (post-cancun) the contract is not self destructed - contract keeps its balance
    • our behavior: return error SELF_DESTRUCT_TO_SELF - this is a bug as the contract/account is not deleted so it should work; in fact SELFDESTRUCT should work even if the account holds native (non-HBAR) tokens
  • SELFDESTRUCT same transaction from contract created - this is the case where the contract is self destructed - "the Ether will be burnt"
    • our behavior: return SELF_DESTRUCT_TO_SELF - is this correct or not? do we have a way to burn HBAR? what happens if the contract account holds native tokens? Investigating this to see what the desired behavior is.

(The case of a HAPI ContractDelete call is that it always fails if there's a balance and the beneficiary is the contract account.)

@david-bakin-sl david-bakin-sl changed the title Investigate cancun anomalies Investigate cancun SELFDESTRUCT anomalies Oct 28, 2024
@Nana-EC Nana-EC moved this from Tasks In Progress to Sprint Backlog in Smart Contract Sprint Board Nov 11, 2024
@david-bakin-sl david-bakin-sl moved this from Sprint Backlog to Tasks In Progress in Smart Contract Sprint Board Dec 6, 2024
@Nana-EC Nana-EC moved this from Tasks In Progress to Sprint Backlog in Smart Contract Sprint Board Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Sprint Backlog
Development

No branches or pull requests

1 participant