Skip to content

Fix undo of a clearing authorization - #30

Merged
sbillig merged 1 commit into
feat/block-changesfrom
fix/clearing-authorization-undo
Nov 16, 2026
Merged

sbillig merged 1 commit into
feat/block-changesfrom
fix/clearing-authorization-undo

Conversation

@sbillig

@sbillig sbillig commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

simulate of a set-code transaction aborted when it carried a clearing authorization (address 0) signed by an account that does not exist.

delegate_code journaled Delegation { existed: false } for the clear, but clearing no code makes no account. The nonce increment that follows made it, so undo removed the account twice and remove_empty_account asserted. A host failure after the authorizations, or a failed Amsterdam message preparation, undoes the same journal.

delegate_code now returns without journaling when it clears no code, as deploy_code does for empty code. Every other journaling site holds to the rule that existed: false means the entry's own write made the account.

A clearing authorization (address 0) from a signer without an account
journaled `Delegation { existed: false }`, but clearing no code makes no
account. The nonce increment then made it, so undo removed the account
twice and `remove_empty_account` aborted. `simulate` of such a set-code
transaction crashed, as would a host failure after the authorizations or
a failed Amsterdam message preparation.

Return from `delegate_code` without journaling when it clears no code.
@sbillig
sbillig added this pull request to stack #29 November 14, 2026 06:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T06:32:51.497026Z 14aa7f5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sbillig
sbillig merged commit 3df19a3 into main Nov 16, 2026
2 checks passed
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.

1 participant