Skip to content

fix: export-state memory and gentx error handling#54

Merged
bdchatham merged 1 commit intomainfrom
fix/fork-export-review-fixes
Apr 2, 2026
Merged

fix: export-state memory and gentx error handling#54
bdchatham merged 1 commit intomainfrom
fix/fork-export-review-fixes

Conversation

@bdchatham
Copy link
Copy Markdown
Contributor

@bdchatham bdchatham commented Apr 2, 2026

Summary

  • export_state.go: Stream seid export stdout directly to a temp file instead of capturing multi-GB output in memory via cmd.Output(). The S3 upload now reads from disk. Prevents OOM on production chain exports.
  • assemble_genesis_fork.go: addMissingGenesisAccounts now returns errors for unreadable/unparseable gentx files instead of silently skipping them. Makes failures visible at the point of failure rather than surfacing as confusing errors in collectGentxs.

Test plan

  • All existing fork assembler tests pass
  • go build ./... clean

🤖 Generated with Claude Code


s3Objects := &mockS3GetObject{objects: map[string][]byte{
"pacific-1/exported-state.json": []byte(exportedGenesis),
"test-group/pacific-1/exported-state.json": []byte(exportedGenesis),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not positive why we need group in the S3 location

- Stream seid export stdout directly to temp file instead of holding
  multi-GB output in memory. Upload reads from the file on disk.
- Surface errors for unparseable gentx files in addMissingGenesisAccounts
  instead of silently skipping them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bdchatham bdchatham force-pushed the fix/fork-export-review-fixes branch from 9331743 to 8dab2c9 Compare April 2, 2026 16:27
@bdchatham bdchatham changed the title fix: export-state memory, S3 key isolation, gentx error handling fix: export-state memory and gentx error handling Apr 2, 2026
@bdchatham bdchatham merged commit 733328a into main Apr 2, 2026
2 checks passed
@bdchatham bdchatham deleted the fix/fork-export-review-fixes branch April 2, 2026 16:28
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