Go to file
GroovieGermanikus 32709aff8a
move mock code
2023-12-15 10:20:41 +01:00
.github/workflows move mock code 2023-12-15 10:20:41 +01:00
ci add missing rust-version.sh 2023-12-15 10:13:35 +01:00
examples move mock code 2023-12-15 10:20:41 +01:00
src move mock code 2023-12-15 10:20:41 +01:00
Cargo.lock add experimental perfectseq 2023-12-14 11:37:50 +01:00
Cargo.toml add missing dependency 2023-12-15 10:09:24 +01:00
README.md readme to describe the strategies 2023-12-15 09:41:02 +01:00

README.md

We recommend to use the grpcmultiplex_fastestwins implementation based on Futures. You can take the example code from stream_blocks_mainnet.rs.

Reconnects will handled transparently in inside the Futures. Multiple Futures are executed in parallel and the first result is returned.

No guarantees are made about if the messages are continuous or not.

Fastest Wins Strategy using task/channel (experimental)

(see grpcmultiplex_fastestwins_channels.rs)

This implementation is built with Tokio Tasks and Channels instead of futures. It is simpler and more predictable than the Futures implementation. It uses a push model rather than a pull model, i.e. the task pushes the result to the channel while the Futures implementation pulls the result from the chain of Futures.

Perfect Seq Strategy (experimental)

(see grpcmultiplex_perfectseq.rs)

This strategy guarantees that the messages are continuous and in the correct order. The continuous property is defined by linking a Block with previous Block using block.parent_slot and block.parent_hash. The disadvantage is that it will not produce messages if a Block is missing.

It is limited to the commitment levels confirmed and finalized. For processed level there is no sequence due to the potential presence of forks with form a tree.