Skip to content

Conversation

crystalin
Copy link
Collaborator

Fixes issue where offline-signed transactions expire too quickly by adding configurable era-period parameter. Default remains 2048 blocks for backward compatibility.

crystalin and others added 4 commits August 13, 2025 11:24
Addresses issue where offline-signed transactions expire too quickly.

Changes:
- Add --era-period CLI parameter to create and createAndSend commands
- Maintain safe default of 2048 blocks (~6.8 hours on Moonbeam)
- Add robust validation: must be power of 2 and >= 4
- Add warnings for periods > 4096 blocks about potential risks
- Improve error handling for JSON parsing and command execution
- Update documentation with clear guidance on mortality options
- Enhanced error messages for expired transactions with nonce hints

For offline batch signing scenarios, users can now:
1. Use --immortality for transactions that never expire
2. Use --era-period with larger values (e.g., 8192, 16384)
3. Continue using default for standard online scenarios

Security considerations documented in README to help users understand
trade-offs between longer validity periods and replay/upgrade risks.

Co-Authored-By: Claude <[email protected]>
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