refactor(starknet): change BlockIdentifier from string to typed uint64#3775
refactor(starknet): change BlockIdentifier from string to typed uint64#37750xsamalt wants to merge 1 commit into
Conversation
0xsamalt
commented
Jun 30, 2026
- Introduces starknet.BlockIdentifier as a named uint64 type with custom UnmarshalJSON that handles both hex string (ex: "0x...") and bare integers.
- Changes PreConfirmedDeltaUpdate.BlockIdentifier and PreConfirmedBlock.BlockIdentifier from string to the new BlockIdentifier type.
- Changes pending.PreConfirmed.BlockIdentifier from string to uint64 (raw, to avoid a circular import from core/pending → starknet).
- Updates all mocks, adapters, and tests to match the new types.
|
Heads up — this doesn't compile yet. A few
Changing the |
Fixed, tests passing locally on rpc/v9 and rpc/v10 |
|
Perfect, thanks for the quick fix — builds clean now. 👍 |
|
Hey @0xsamalt, thanks for the PR! Could you resolve the conflicts first? And could you help me understand the goal here? It looks cosmetic to me, and it touches a very delicate spot. Is it tied to any issue? Do you think it improves performance? If so, a benchmark would help. |
|
Thanks @RafaelGranza!
|
cf725f5 to
5cb2899
Compare
|
Rebased onto the latest main (455b0dd) to resolve conflicts from the multi-block pre-confirmed chain work, the subscription-cache to deduper refactor, and the pending-endpoint removal that landed since this branch was opened. Squashed down to a single commit the follow-up fix commit's changes were already folded in while resolving conflicts, so git dropped it as redundant. Besides mechanical conflict resolution, this also:
Full build, go vet, and test suite pass locally. |