Skip to content

Conversation

@Bashmunta
Copy link
Contributor

This change addresses a UX issue in export-era where an invalid range could lead to a silent no-op. Previously,
ExportConfig::validate() did not check that first_block_number <= last_block_number, and after clamping the last block to the chain head in export(), the effective range could still become invalid, resulting in no files being produced while the command reported success. We now validate the range in two places: in ExportConfig::validate() to catch obvious misconfiguration early, and in export() immediately after clamping to ensure the effective range remains valid. If the first block exceeds the effective last block, we return a clear error suggesting to lower --first-block-number or sync further. This aligns the behavior with other CLI tools that enforce range correctness (e.g., dump-stage), prevents user confusion, retains support for single-block exports (first == last), and keeps defaults intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant