feat(sequencer, indexer): Use zone-sdk instead of bedrock client #389
feat(sequencer, indexer): Use zone-sdk instead of bedrock client #389
Conversation
4446ea5 to
b541451
Compare
073cd31 to
ffae6d8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
3baa249 to
5191370
Compare
| logos-blockchain-common-http-client = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } | ||
| logos-blockchain-key-management-system-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } | ||
| logos-blockchain-core = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } | ||
| logos-blockchain-chain-broadcast-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } | ||
| logos-blockchain-chain-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } | ||
| logos-blockchain-zone-sdk = { git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "ee281a447d95a951752461ee0a6e88eb4a0f17cf" } |
There was a problem hiding this comment.
These libraries don't have some stable readable tag yet? E.g. on stage we use 0.1.2 release, can't we use 0.1.2 tag here?
There was a problem hiding this comment.
There was some stable tag, but there were also some improvements after it and zone-sdk and release did not really match so I wanted to use the most recent one.
I wanted to re-export crates through sdk so we can unify everything into a single dep as well. I would like to open a separate PR for this and then let's try to pin some sensible release. I think I can do that in the next week or two.
Does that makes sense?
|
|
||
| logos-blockchain-node-0: | ||
| image: ghcr.io/logos-blockchain/logos-blockchain@sha256:c5243681b353278cabb562a176f0a5cfbefc2056f18cebc47fe0e3720c29fb12 | ||
| image: ghcr.io/logos-blockchain/logos-blockchain@sha256:9f1829dea335c56f6ff68ae37ea872ed5313b96b69e8ffe143c02b7217de85fc |
There was a problem hiding this comment.
Can we also pin 0.1.2 here?
There was a problem hiding this comment.
Same as the above, I will need to make the docker setup with work with the tag as well.
| "backoff": { | ||
| "start_delay": "100ms", | ||
| "max_retries": 5 | ||
| } |
There was a problem hiding this comment.
Hmm, interesting, why? Shouldn't client be able to configure retry strategy?
There was a problem hiding this comment.
Good point, I will add configurable params to zone-sdk and then later open a specific PR for this as well.
| // Kept as a thin client lib for callers that want to query the indexer | ||
| // directly (e.g. integration tests). The sequencer no longer depends on the | ||
| // indexer at runtime — finalization comes from zone-sdk events. | ||
| pub mod indexer_client; |
There was a problem hiding this comment.
I think you can safely remove it
There was a problem hiding this comment.
Still used in integration tests. I have simplified it and left it only in tests.
|
|
||
| /// Mark every pending block with `block_id <= last_finalized` as finalized. | ||
| /// Idempotent — already-finalized blocks are skipped. | ||
| pub fn clean_pending_blocks_up_to(&self, last_finalized: u64) -> DbResult<()> { |
There was a problem hiding this comment.
| pub fn clean_pending_blocks_up_to(&self, last_finalized: u64) -> DbResult<()> { | |
| pub fn clean_pending_blocks_up_to(&self, last_finalized: BlockId) -> DbResult<()> { |
There was a problem hiding this comment.
Rest of the storage module uses u64 directly so I used it for consistency. I think I would need to add the dep to nssa_core in order to use it. Maybe it is better to do it in a separate PR for all calls then?
🎯 Purpose
This PR introduces logos-blockchain zone-sdk to hide some complexity from LEZ node in implementing sequencer and indexer. Mainly the part of working with logos blockchain node and submission and lifecycle of transactions.
⚙️ Approach
Zone-sdk has taken over the role of submission/resubmitting strategy, along with the back-fill and support for checkpoints.
🧪 How to Test
Integration tests and regular tests should pass as before the change.
🔗 Dependencies
No dependencies for now.
🔜 Future Work
TO COMPLETE IF APPLICABLE
📋 PR Completion Checklist
Mark only completed items. A complete PR should have all boxes ticked.