Commit Graph

11 Commits

Author SHA1 Message Date
yyforyongyu
b0aa4ae2de chainio: use package logger instead of instance logger
There's no guarantee that the `b.beat` is initialized when the
dispatcher shuts down, especially with the case in the remote signer
where no chainbackend is created.
2025-06-18 19:43:27 +08:00
Olaoluwa Osuntokun
66077b1722 chainio: demote per-block logging to Debugf 2025-03-24 15:49:21 -07:00
yyforyongyu
89c4a8dfd7 chainio: add method CurrentHeight
Add a new method `CurrentHeight` to query the current best height of the
dispatcher.
2025-02-12 09:48:02 +08:00
chloefeal
852a8d8746 chore: fix typo 2025-01-05 20:45:35 +08:00
yyforyongyu
4806b2fda7 multi: optimize loggings around changes from blockbeat 2024-12-20 17:54:08 +08:00
yyforyongyu
0bab6b3419 chainio: use errgroup to limit num of goroutines 2024-12-20 17:54:03 +08:00
yyforyongyu
b5a3a27c77 chainio: add partial implementation of Consumer interface 2024-12-20 17:54:01 +08:00
yyforyongyu
4b83d87baa chainio: add BlockbeatDispatcher to dispatch blockbeats
This commit adds a blockbeat dispatcher which handles sending new blocks
to all subscribed consumers.
2024-12-20 17:54:01 +08:00
yyforyongyu
a1eb87e280 chainio: add helper methods to dispatch beats
This commit adds two methods to handle dispatching beats. These are
exported methods so other systems can send beats to their managed
subinstances.
2024-12-20 17:54:01 +08:00
yyforyongyu
01ac713aec chainio: implement Blockbeat
In this commit, a minimal implementation of `Blockbeat` is added to
synchronize block heights, which will be used in `ChainArb`, `Sweeper`,
and `TxPublisher` so blocks are processed sequentially among them.
2024-12-20 17:54:00 +08:00
yyforyongyu
060ff013c1 chainio: introduce chainio to handle block synchronization
This commit inits the package `chainio` and defines the interface
`Blockbeat` and `Consumer`. The `Consumer` must be implemented by other
subsystems if it requires block epoch subscription.
2024-12-20 17:54:00 +08:00