package block
- Alphabetic
- Public
- Protected
Package Members
- package bftordering
Type Members
- trait BlockOrderer extends AutoCloseable
The interface to the ordering functionality for a block sequencer.
The interface to the ordering functionality for a block sequencer.
It is not BFT-specific, but an implementation may be Byzantine Fault tolerant with respect to the ordering functionality.
BFT reads and writes require, however client cooperation: if
f
is the maximum number of tolerated faulty sequencer nodes, then a BFT read requires readingf+1
streams and BFT writes require either writing tof+1
sequencers or writing to a single sequencer and be prepared to retry on another sequencer if a BFT read for the corresponding event fails. - class BlockSequencer extends DatabaseSequencer with DatabaseSequencerIntegration with NamedLogging with FlagCloseableAsync
- class BlockSequencerCircuitBreaker extends NamedLogging
Circuit breaker used for stopping accepting requests when the sequencer is overloaded and falling behind on processing blocks.
Circuit breaker used for stopping accepting requests when the sequencer is overloaded and falling behind on processing blocks. It works by keeping track of the lastTs on each block process and computing a delay between that timestamp and current time. If the delay is larger than allowedBlockDelay, a failure is registered.
Following the circuit breaker logic described in https://doc.akka.io/libraries/akka-core/current/common/circuitbreaker.html, after maxFailures consecutive failures, requests will no longer be accepted (state goes from closed to open).
After a resetTimeout amount of time has passed in the open state, the circuit goes to half-open state, where requests are accepted, and if the next block delay registered is in the accepted interval, the circuit breaker closes again and requests are accepted, otherwise, it goes back to being open (and requests not accepted). In this case, the resetTimeout is multiplied by the exponentialBackoffFactor to compute the next timeout (up until at most maxResetTimeout).
It is possible to configure separate config breaker parameter per message type.
- abstract class BlockSequencerFactory extends DatabaseSequencerFactory with NamedLogging
- class DriverBlockOrderer extends BlockOrderer
- class DriverBlockSequencerFactory[C] extends BlockSequencerFactory
Value Members
- object BlockSequencerCircuitBreaker
- object BlockSequencerFactory
- object DriverBlockSequencerFactory extends LazyLogging