Search in sources :

Example 1 with PacemakerState

use of com.radixdlt.consensus.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 : VertexStoreBFTSyncRequestProcessor(com.radixdlt.consensus.sync.VertexStoreBFTSyncRequestProcessor) ScheduledLocalTimeout(com.radixdlt.consensus.liveness.ScheduledLocalTimeout) GetVerticesRequest(com.radixdlt.consensus.sync.GetVerticesRequest) Hasher(com.radixdlt.crypto.Hasher) Random(java.util.Random) BFTCommittedUpdate(com.radixdlt.consensus.bft.BFTCommittedUpdate) EventProcessor(com.radixdlt.environment.EventProcessor) RemoteEventDispatcher(com.radixdlt.environment.RemoteEventDispatcher) VertexRequestTimeout(com.radixdlt.consensus.sync.VertexRequestTimeout) LedgerProof(com.radixdlt.consensus.LedgerProof) SystemCounters(com.radixdlt.counters.SystemCounters) ProvidesIntoSet(com.google.inject.multibindings.ProvidesIntoSet) BFTSyncFactory(com.radixdlt.consensus.epoch.BFTSyncFactory) RemoteEventProcessorOnRunner(com.radixdlt.environment.RemoteEventProcessorOnRunner) PacemakerState(com.radixdlt.consensus.liveness.PacemakerState) BFTSyncRequestProcessorFactory(com.radixdlt.consensus.epoch.BFTSyncRequestProcessorFactory) Multibinder(com.google.inject.multibindings.Multibinder) Runners(com.radixdlt.environment.Runners) GetVerticesRequestRateLimit(com.radixdlt.middleware2.network.GetVerticesRequestRateLimit) BFTRebuildUpdate(com.radixdlt.consensus.bft.BFTRebuildUpdate) VertexStoreFactory(com.radixdlt.consensus.epoch.VertexStoreFactory) LedgerHeader(com.radixdlt.consensus.LedgerHeader) BFTHighQCUpdate(com.radixdlt.consensus.bft.BFTHighQCUpdate) ProcessOnDispatch(com.radixdlt.environment.ProcessOnDispatch) TypeLiteral(com.google.inject.TypeLiteral) BFTSyncPatienceMillis(com.radixdlt.consensus.sync.BFTSyncPatienceMillis) StartProcessorOnRunner(com.radixdlt.environment.StartProcessorOnRunner) EpochManager(com.radixdlt.consensus.epoch.EpochManager) Epoched(com.radixdlt.consensus.epoch.Epoched) ScheduledEventDispatcher(com.radixdlt.environment.ScheduledEventDispatcher) EventProcessorOnRunner(com.radixdlt.environment.EventProcessorOnRunner) Proposal(com.radixdlt.consensus.Proposal) LocalTimeoutOccurrence(com.radixdlt.consensus.liveness.LocalTimeoutOccurrence) NextTxnsGenerator(com.radixdlt.consensus.liveness.NextTxnsGenerator) BFTSync(com.radixdlt.consensus.sync.BFTSync) RateLimiter(com.google.common.util.concurrent.RateLimiter) EpochViewUpdate(com.radixdlt.consensus.epoch.EpochViewUpdate) LocalEvents(com.radixdlt.environment.LocalEvents) VertexStore(com.radixdlt.consensus.bft.VertexStore) LocalSyncRequest(com.radixdlt.sync.messages.local.LocalSyncRequest) Vote(com.radixdlt.consensus.Vote) Pacemaker(com.radixdlt.consensus.liveness.Pacemaker) LastEpochProof(com.radixdlt.store.LastEpochProof) BFTConfiguration(com.radixdlt.consensus.BFTConfiguration) Ledger(com.radixdlt.consensus.Ledger) ViewUpdate(com.radixdlt.consensus.bft.ViewUpdate) PacemakerStateFactory(com.radixdlt.consensus.liveness.PacemakerStateFactory) TimeSupplier(com.radixdlt.utils.TimeSupplier) EventDispatcher(com.radixdlt.environment.EventDispatcher) BFTInsertUpdate(com.radixdlt.consensus.bft.BFTInsertUpdate) PacemakerFactory(com.radixdlt.consensus.liveness.PacemakerFactory) Scopes(com.google.inject.Scopes) EpochChange(com.radixdlt.consensus.epoch.EpochChange) LedgerUpdate(com.radixdlt.ledger.LedgerUpdate) Provides(com.google.inject.Provides) Self(com.radixdlt.consensus.bft.Self) BFTNode(com.radixdlt.consensus.bft.BFTNode) EpochLocalTimeoutOccurrence(com.radixdlt.consensus.liveness.EpochLocalTimeoutOccurrence) Comparator(java.util.Comparator) GetVerticesErrorResponse(com.radixdlt.consensus.sync.GetVerticesErrorResponse) GetVerticesResponse(com.radixdlt.consensus.sync.GetVerticesResponse) AbstractModule(com.google.inject.AbstractModule) EpochViewUpdate(com.radixdlt.consensus.epoch.EpochViewUpdate) PacemakerState(com.radixdlt.consensus.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 BFTConfiguration (com.radixdlt.consensus.BFTConfiguration)1 Ledger (com.radixdlt.consensus.Ledger)1 LedgerHeader (com.radixdlt.consensus.LedgerHeader)1 LedgerProof (com.radixdlt.consensus.LedgerProof)1 Proposal (com.radixdlt.consensus.Proposal)1 Vote (com.radixdlt.consensus.Vote)1 BFTCommittedUpdate (com.radixdlt.consensus.bft.BFTCommittedUpdate)1 BFTHighQCUpdate (com.radixdlt.consensus.bft.BFTHighQCUpdate)1 BFTInsertUpdate (com.radixdlt.consensus.bft.BFTInsertUpdate)1 BFTNode (com.radixdlt.consensus.bft.BFTNode)1 BFTRebuildUpdate (com.radixdlt.consensus.bft.BFTRebuildUpdate)1 Self (com.radixdlt.consensus.bft.Self)1 VertexStore (com.radixdlt.consensus.bft.VertexStore)1