Search in sources :

Example 1 with PacemakerState

use of com.radixdlt.hotstuff.liveness.PacemakerState in project radixdlt by radixdlt.

the class EpochsConsensusModule method pacemakerStateFactory.

@Provides
private PacemakerStateFactory pacemakerStateFactory(EventDispatcher<EpochViewUpdate> epochViewUpdateEventDispatcher) {
    return (initialView, epoch, proposerElection) -> new PacemakerState(initialView, proposerElection, viewUpdate -> {
        EpochViewUpdate epochViewUpdate = new EpochViewUpdate(epoch, viewUpdate);
        epochViewUpdateEventDispatcher.dispatch(epochViewUpdate);
    });
}
Also used : BFTHighQCUpdate(com.radixdlt.hotstuff.bft.BFTHighQCUpdate) VertexStoreFactory(com.radixdlt.hotstuff.epoch.VertexStoreFactory) PacemakerFactory(com.radixdlt.hotstuff.liveness.PacemakerFactory) Hasher(com.radixdlt.crypto.Hasher) Random(java.util.Random) EpochLocalTimeoutOccurrence(com.radixdlt.hotstuff.liveness.EpochLocalTimeoutOccurrence) EventProcessor(com.radixdlt.environment.EventProcessor) RemoteEventDispatcher(com.radixdlt.environment.RemoteEventDispatcher) LedgerHeader(com.radixdlt.hotstuff.LedgerHeader) Ledger(com.radixdlt.hotstuff.Ledger) GetVerticesErrorResponse(com.radixdlt.hotstuff.sync.GetVerticesErrorResponse) BFTRebuildUpdate(com.radixdlt.hotstuff.bft.BFTRebuildUpdate) BFTSyncPatienceMillis(com.radixdlt.hotstuff.sync.BFTSyncPatienceMillis) BFTInsertUpdate(com.radixdlt.hotstuff.bft.BFTInsertUpdate) SystemCounters(com.radixdlt.counters.SystemCounters) ProvidesIntoSet(com.google.inject.multibindings.ProvidesIntoSet) RemoteEventProcessorOnRunner(com.radixdlt.environment.RemoteEventProcessorOnRunner) Vote(com.radixdlt.hotstuff.Vote) NextTxnsGenerator(com.radixdlt.hotstuff.liveness.NextTxnsGenerator) ViewUpdate(com.radixdlt.hotstuff.bft.ViewUpdate) Multibinder(com.google.inject.multibindings.Multibinder) EpochChange(com.radixdlt.hotstuff.epoch.EpochChange) Runners(com.radixdlt.environment.Runners) GetVerticesRequestRateLimit(com.radixdlt.middleware2.network.GetVerticesRequestRateLimit) Epoched(com.radixdlt.hotstuff.epoch.Epoched) PacemakerState(com.radixdlt.hotstuff.liveness.PacemakerState) ProcessOnDispatch(com.radixdlt.environment.ProcessOnDispatch) TypeLiteral(com.google.inject.TypeLiteral) Proposal(com.radixdlt.hotstuff.Proposal) StartProcessorOnRunner(com.radixdlt.environment.StartProcessorOnRunner) BFTCommittedUpdate(com.radixdlt.hotstuff.bft.BFTCommittedUpdate) VertexStoreBFTSyncRequestProcessor(com.radixdlt.hotstuff.sync.VertexStoreBFTSyncRequestProcessor) ScheduledEventDispatcher(com.radixdlt.environment.ScheduledEventDispatcher) LedgerProof(com.radixdlt.hotstuff.LedgerProof) EventProcessorOnRunner(com.radixdlt.environment.EventProcessorOnRunner) GetVerticesResponse(com.radixdlt.hotstuff.sync.GetVerticesResponse) RateLimiter(com.google.common.util.concurrent.RateLimiter) LocalEvents(com.radixdlt.environment.LocalEvents) LocalSyncRequest(com.radixdlt.sync.messages.local.LocalSyncRequest) VertexStore(com.radixdlt.hotstuff.bft.VertexStore) LastEpochProof(com.radixdlt.store.LastEpochProof) BFTConfiguration(com.radixdlt.hotstuff.BFTConfiguration) Pacemaker(com.radixdlt.hotstuff.liveness.Pacemaker) BFTSync(com.radixdlt.hotstuff.sync.BFTSync) TimeSupplier(com.radixdlt.utils.TimeSupplier) EventDispatcher(com.radixdlt.environment.EventDispatcher) PacemakerStateFactory(com.radixdlt.hotstuff.liveness.PacemakerStateFactory) ScheduledLocalTimeout(com.radixdlt.hotstuff.liveness.ScheduledLocalTimeout) BFTSyncRequestProcessorFactory(com.radixdlt.hotstuff.epoch.BFTSyncRequestProcessorFactory) Scopes(com.google.inject.Scopes) BFTNode(com.radixdlt.hotstuff.bft.BFTNode) EpochViewUpdate(com.radixdlt.hotstuff.epoch.EpochViewUpdate) VertexRequestTimeout(com.radixdlt.hotstuff.sync.VertexRequestTimeout) LedgerUpdate(com.radixdlt.ledger.LedgerUpdate) BFTSyncFactory(com.radixdlt.hotstuff.epoch.BFTSyncFactory) Provides(com.google.inject.Provides) GetVerticesRequest(com.radixdlt.hotstuff.sync.GetVerticesRequest) EpochManager(com.radixdlt.hotstuff.epoch.EpochManager) LocalTimeoutOccurrence(com.radixdlt.hotstuff.liveness.LocalTimeoutOccurrence) Self(com.radixdlt.hotstuff.bft.Self) Comparator(java.util.Comparator) AbstractModule(com.google.inject.AbstractModule) EpochViewUpdate(com.radixdlt.hotstuff.epoch.EpochViewUpdate) PacemakerState(com.radixdlt.hotstuff.liveness.PacemakerState) Provides(com.google.inject.Provides)

Aggregations

RateLimiter (com.google.common.util.concurrent.RateLimiter)1 AbstractModule (com.google.inject.AbstractModule)1 Provides (com.google.inject.Provides)1 Scopes (com.google.inject.Scopes)1 TypeLiteral (com.google.inject.TypeLiteral)1 Multibinder (com.google.inject.multibindings.Multibinder)1 ProvidesIntoSet (com.google.inject.multibindings.ProvidesIntoSet)1 SystemCounters (com.radixdlt.counters.SystemCounters)1 Hasher (com.radixdlt.crypto.Hasher)1 EventDispatcher (com.radixdlt.environment.EventDispatcher)1 EventProcessor (com.radixdlt.environment.EventProcessor)1 EventProcessorOnRunner (com.radixdlt.environment.EventProcessorOnRunner)1 LocalEvents (com.radixdlt.environment.LocalEvents)1 ProcessOnDispatch (com.radixdlt.environment.ProcessOnDispatch)1 RemoteEventDispatcher (com.radixdlt.environment.RemoteEventDispatcher)1 RemoteEventProcessorOnRunner (com.radixdlt.environment.RemoteEventProcessorOnRunner)1 Runners (com.radixdlt.environment.Runners)1 ScheduledEventDispatcher (com.radixdlt.environment.ScheduledEventDispatcher)1 StartProcessorOnRunner (com.radixdlt.environment.StartProcessorOnRunner)1 BFTConfiguration (com.radixdlt.hotstuff.BFTConfiguration)1