refactor: introduce p2p client in mempool module#606
Merged
shotonoff merged 6 commits intotd-115-fix-consensus-deadlockfrom Mar 17, 2023
Merged
refactor: introduce p2p client in mempool module#606shotonoff merged 6 commits intotd-115-fix-consensus-deadlockfrom
shotonoff merged 6 commits intotd-115-fix-consensus-deadlockfrom
Conversation
7191eca to
557b942
Compare
lklimek
reviewed
Mar 17, 2023
lklimek
reviewed
Mar 17, 2023
lklimek
reviewed
Mar 17, 2023
lklimek
approved these changes
Mar 17, 2023
shotonoff
added a commit
that referenced
this pull request
Mar 17, 2023
* refactor: add sendMessage method to consensus.State * refactor: modify sendMessage * refactor: decompose WAL interface on a few small * refactor: refactor an approach of message consuming for consensus state component * refactor: add graceful stop for chanMsgReader * refactor: consensus state priv-validator * refactor: huge refactoring of consensus state, separate each state change task as a separate command, similar to state machine implementation * refactor: add a stop function to a consensus to be able to stop receiveRoutine by a condition * fix: remove block validating in finalizeCommit * refactor: define Executor and VoteExtender interfaces, add executor mock, refactor return statement of Executor.ExtendVote * test: add TestChanQueue, TestChanMsgSender, TestChanMsgReader * test: generate PrivValidator mock * refactor: move sending stats data from message handler * refactor: add-vote operation (#558) * refactor: separate TryAddVote.addVote logic on small function with one responsibility, use 2 sets (prevote and precommit) to process adding of vote * refactor: replace peerID on proTxHash for peer catchup rounds in HeightVoteSet component * fix: remove unused errors and StateData.validateVote * refactor: EventSwitch implementation (#569) * refactor: package lib/events rename on eventemitter and EventSwitch rename on EventEmitter, change EventEmitter api * fix: add PeerManager.Unsubscribe method (#594) * refactor: set and decide proposal operations (#565) * refactor: set and decide proposal operations move to the separated component proposaler * refactor: consensus peer gossip mechanism (#551) * refactor: separate a gossip logic on implementation and a standard way of iterative handling a gossip condition * chore: remove unless commented line * refactor: remove custom "peerSyncErr" error * refactor: add Gossiper interface, generate Gossiper mock struct, add unit test to queryMaj23GossipHandler * refactor: peerGossipWorker implements service.Service * refactor: blocksync module is refactored on using worker-pool * test: replace custom assertError on tmrequire.Error * refactor: add Now function into flowrate package, to obtain the current time * fix: TestHandshakeErrorsIfAppReturnsWrongAppHash in replay_test.go * refactor: move the logic wait-for blockchain sync from reactor to BlockPool * fix: TestReactor_SyncTime * test: change timing for test TestBlockPoolBasic * chore: replace clock on clockwork * refactor: replace reactor's consuming on separate consumer function in Channel, rename SetPeerRange on AddPeer * test: add TestConsumeError * chore: remove unused mustHexToBytes * chore: add examples in promise/example_test.go and docs comments * chore: change a package for MockValidatorSet from types on factory * Update internal/blocksync/channel.go * feat: create p2p/client package (#602) * refactor: add internal/p2p/client implementation * refactor: change blocksync module to support p2p client * test: fix TestMakeHTTPDialerURL (#605) * refactor: rename RandomNode on AnyNode as more specific name * refactor: introduce p2p client in mempool module (#606)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
This PR is a another part of the migration on using p2p-client for the modules which are used p2p layer for communication
What was done?
mempoolmodule to use p2p-client to gossip and handle mempool messages.mempoolintop2ppackagep2ptestpackage to support newp2p-clientfunctionality. this slightly affected unit tests pfblocksyncandpexmodules.How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only