Skip to content

fix: do not expose settled blocks in an invalid state#258

Merged
StephenButtolph merged 8 commits intomainfrom
JonathanOppenheimer/fix-get-reciepts
Mar 3, 2026
Merged

fix: do not expose settled blocks in an invalid state#258
StephenButtolph merged 8 commits intomainfrom
JonathanOppenheimer/fix-get-reciepts

Conversation

@JonathanOppenheimer
Copy link
Copy Markdown
Contributor

@JonathanOppenheimer JonathanOppenheimer commented Mar 3, 2026

We can avoid returning settled blocks in an invalid state by not returning a *blocks.Block at all. To do so, we replace getBlock (which returned a *blocks.Block in invalid state per its TODO) with getReceipts, which only returns what callers need: (types.Receipts, *types.Block, error). This means the intermediate *blocks.Block is constructed internally is never leaked, so our concern is gone.

Comment thread sae/rpc.go Outdated
@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review March 3, 2026 22:09
@JonathanOppenheimer JonathanOppenheimer changed the title fix: only return reciept, and types.Block fix: only return receipt, and types.Block Mar 3, 2026
Comment thread sae/rpc.go Outdated
@JonathanOppenheimer JonathanOppenheimer self-assigned this Mar 3, 2026
@JonathanOppenheimer JonathanOppenheimer changed the title fix: only return receipt, and types.Block fix: do not expose settled blocks in an invalid state Mar 3, 2026
@JonathanOppenheimer JonathanOppenheimer added the bug Something isn't working label Mar 3, 2026
Comment thread sae/rpc.go
@StephenButtolph StephenButtolph removed the bug Something isn't working label Mar 3, 2026
@StephenButtolph
Copy link
Copy Markdown
Contributor

I'm removing the "bug" label, as this really isn't a bug... It is a potential future bug... Which now doesn't exist.

@StephenButtolph StephenButtolph merged commit fc4c130 into main Mar 3, 2026
20 checks passed
@StephenButtolph StephenButtolph deleted the JonathanOppenheimer/fix-get-reciepts branch March 3, 2026 23:15
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.

2 participants