Environment
• Binary: superbank v0.5.0
• Source: grpc (Dragon's Mouth)
Steps to reproduce
1. Fresh ClickHouse instance, DDL applied (ddl/local/.sql), zero rows in blocks_metadata
2. Run the ingestor:
SUPERBANK_SOURCE=grpc
DRAGONSMOUTH_ENDPOINT=
DRAGONSMOUTH_X_TOKEN=
DRAGONSMOUTH_FROM_SLOT=""
CLICKHOUSE_URL=
CLICKHOUSE_DATABASE=default
superbank
Expected behavior (per crates/superbank/README.md):
dragonsmouth-from-slot: "*" uses the highest slot in blocks_metadata before subscribing; if rejected, superbank falls back to the gRPC-reported available slot.
Actual behavior:
Error: dragonsmouth-from-slot '*' requires at least one row in default.blocks_metadata
The process exits immediately with a hard error - no fallback is attempted.
Analysis: the documented fallback does work correctly when "" resolves to a specific slot that later turns out to be unavailable (confirmed separately: in that case Superbank logs dragonsmouth-from-slot='' slot not available; falling back to gRPC available slot and recovers cleanly). The bug is specifically that on a genuinely empty table, there's no slot to resolve in the first place, so the code never reaches that fallback path at all, it errors out before it can even try.
Workaround used: on first boot with an empty table, fetch the current slot via a plain getSlot RPC call and pass that explicit number as DRAGONSMOUTH_FROM_SLOT instead of "". Once at least one row exists, "" works as documented on every subsequent run.
Suggested fix: when blocks_metadata is empty, "*" should fall through to the same "fetch the gRPC-reported available slot" path used for the stale-slot case, rather than hard-erroring.
Environment
• Binary: superbank v0.5.0
• Source: grpc (Dragon's Mouth)
Steps to reproduce
1. Fresh ClickHouse instance, DDL applied (ddl/local/.sql), zero rows in blocks_metadata
2. Run the ingestor:
SUPERBANK_SOURCE=grpc
DRAGONSMOUTH_ENDPOINT=
DRAGONSMOUTH_X_TOKEN=
DRAGONSMOUTH_FROM_SLOT=""
CLICKHOUSE_URL=
CLICKHOUSE_DATABASE=default
superbank
Expected behavior (per crates/superbank/README.md):
dragonsmouth-from-slot: "*" uses the highest slot in blocks_metadata before subscribing; if rejected, superbank falls back to the gRPC-reported available slot.
Actual behavior:
Error: dragonsmouth-from-slot '*' requires at least one row in default.blocks_metadata
The process exits immediately with a hard error - no fallback is attempted.
Analysis: the documented fallback does work correctly when "" resolves to a specific slot that later turns out to be unavailable (confirmed separately: in that case Superbank logs dragonsmouth-from-slot='' slot not available; falling back to gRPC available slot and recovers cleanly). The bug is specifically that on a genuinely empty table, there's no slot to resolve in the first place, so the code never reaches that fallback path at all, it errors out before it can even try.
Workaround used: on first boot with an empty table, fetch the current slot via a plain getSlot RPC call and pass that explicit number as DRAGONSMOUTH_FROM_SLOT instead of "". Once at least one row exists, "" works as documented on every subsequent run.
Suggested fix: when blocks_metadata is empty, "*" should fall through to the same "fetch the gRPC-reported available slot" path used for the stale-slot case, rather than hard-erroring.