Skip to content

Commit

Permalink
feature/proof-of-stake (#964)
Browse files Browse the repository at this point in the history
* Introduce failing txn type so state syncer understand failing txns (#1070)

* Support uncommitted blocks in state syncer mempool flush (#1065)

* Fix Connect failing txn test (#1071)

* Add support for seed hex in block producer seed (#1072)

* Make GetCommittedTip public (#1073)

* Assorted small enhancements for node restart w/ pos (#1079)

* Fix txindex dependent transaction within uncommitted blocks (#1082)

* Add flag to control number of mempool txns to sync in state syncer routine (#1083)

* wip: atomic connection logic

* Wrapper verification and connection logic for atomic transactions.

* Add rule error check for nested atomic transactions.

* PoS NetworkManager Consolidation (#1078)

* NetworkManager consolidation

* Nits

* Updated plumbing architecture for atomic transactions.

* Review comment changes.

* Added support for CreateAtomicTxnsWrapper along with explainer comment.

* Atomic transaction testing scaffolding and helper functions.

* Verify wrapper and verify atomic chain tests.

* Add atomic transactions fee testing, simplify doubly linked list indexing.

* Fix CreateAtomicTxnsWrapper and add signature failure for inner transactions test.

* Atomicity test for atomic transactions.

* PoS Mempool Simplified AddTransaction Validation (#1090)

* Remove Spend and Signature verification

* review

* PoS MempoolTx Validated status (#1098)

* PoS MempoolTx Validated status

* Review

* Review comments and the introduction of AtomicTxnsWrapperTxindexMetadata.

* Update ComputeTransactionMetadata to properly handle atomic transactions.

* feature/pos-networking-and-syncing (#899)

* Add BLS Keystore

* PoS Validator Constants and Network Changes (#876)

* PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

* Constants and network changes

* Test MsgDeSoVerack encoding

* Fix snapshot hack

* Revert "Remove constants/network"

This reverts commit b467ddbcd034c2e8d2728a7e77f4b714b686a760.

* Fix compilation errors

* Address review comments

* PoS Validator Connect/Disconnect Flow  (#768)

* PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

* Another review round

* gofmt

* Comment change

* PoS RemoteNode and RemoteNodeId (#857)

* RemoteNode and RemoteNodeId

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

* Review round

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

* Final pass

* PoS Remote Node Indexer and Manager (#879)

* Add RemoteNodeIndexer

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

More RemoteNodeManager updates

Nits

* PoS HandshakeController (#860)

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

* Merge HandshakeStage with RemoteNodeStatus; small HandshakeController nits

* Nit

* HandshakeController updates

* Nits

* Quick nit

* Nits

* Comment nit

* Add HandshakeController (#861)

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

More RemoteNodeManager updates

Nits

* Add validator deduplication test (#942)

* Revert "Code split" (#943)

This reverts commit 831096ac1d3008233868ac8b8f0eca4cd2b9553e.

* Revert "Code split" (#944)

This reverts commit 0604b6d3fc155177a2bb295e6635ed21b20dd947.

* Nits

* PoS NetworkManager RemoteNode Cleanup (#945)

* Revert "Code split"

This reverts commit c0c32f3943ead0e06fdfb3343954a6b5273ea887.

* Review

* Sync trunk

* Rename

* PoS NetworkManager Address (#957)

* Revert "Another split"

This reverts commit eaeec5875a84621b4888fc2a6104e9904e7ef53d.

* Revert routine stops

* gofmt

* Add addrMgr to Server

* Review

* PoS NetworkManager Rename and Nits (#959)

* Renames

* nits

* More renames

* Review

* PoS NetworkManager Fix Integration Tests (#960)

* Some fixes

* Fixes

* Fix another integration test

* Fix integration tests

* Fix RegtestMiner

* Fix fmt (#973)

* PoS Networking and Syncing Documentation (#974)

* noop

* NetworkManager documentation

* gofmt

* Rewording (#981)

* Rename (#986)

* PoS NetworkManager Fix Deadlock and Test AddIps (#996)

* Fix Deadlock and Test AddIps

* Glog fix

* PoS NetworkManager Comment Nit (#997)

* Add ProtocolVersion To Regtest Params (#1035)

* Fix Constructor Name for NetworkManager

* Broadcast Votes, Timeouts, and Block Proposals To Validators (#1036)

* Broadcast Votes and Timeouts To Validators

* Broadcast Block Proposals To Network

* Fix failed unit tests

* Address Nina's comments

* Use RemoteNode To Fetch Missing PoS Blocks (#1045)

* Update Active Validator Connections In PoS Consensus (#1054)

* Remove Rollbacks To bestHeaderChain When bestChain is Mutated (#1055)

* PoW Miner Event Loop Cleanup (#1056)

* Log Peer Validator Vote Messages (#1057)

* Log Peer Validator Timeout Messages (#1058)

* Request Missing HighQC Block For Timeout Message (#1061)

* Request Missing HighQC Block For Timeout Message

* Address Nina's comments

* Remove Peer Disconnects in Server._handleBlock (#1062)

* Remove Peer Disconnects in Server._handleBlock

* Warning for unrequested blocks

* Catch case for spam prevention check

* Address Nina's comment

* Change log level for consensus events

* Update regtest block producer domain

* Prevent Commited Tip Reorgs in ProcessHeaderPoS (#1063)

* Prevent Commited Tip Reorgs in ProcessHeaderPoS

* Clean up error message

* Add Estimate fee rate to mempool interface (#1066)

* Add BLS Public Key PKID Pair Entry Snapshot to core state (#1068)

* Fix txindex for failing txns (#1069)

* Introduce failing txn type so state syncer understand failing txns (#1070)

* Support uncommitted blocks in state syncer mempool flush (#1065)

* Fix Connect failing txn test (#1071)

* Add support for seed hex in block producer seed (#1072)

* Make GetCommittedTip public (#1073)

* Assorted small enhancements for node restart w/ pos (#1079)

* Fix txindex dependent transaction within uncommitted blocks (#1082)

* Add flag to control number of mempool txns to sync in state syncer routine (#1083)

* PoS NetworkManager Consolidation (#1078)

* NetworkManager consolidation

* Nits

* Connect Uncommitted Blocks To Best Header Chain on Startup (#1087)

* Smarter Transition From Syncing To Steady State PoS Consensus (#1088)

* Fix FastHotStuffConsensus Transition Timer (#1091)

* Gossip New Block Hashes Via Inv Message to Non-Validators (#1092)

* Fix Edge Cases With Header Syncing, Block Syncing, and PoS Steady State (#1093)

* Safer Heuristic to Detemine When to Transition to FastHotStuffConsensus (#1094)

* Fix Mempool and Fee Estimator Past Blocks Refresh on Block Connect (#1095)

* Fix Mempool and Fee Estimator Past Blocks Refresh on Block Connect

* Cleanup

* Address Nina's comments

* Fix Race Conditions With Mempool Txn Relay (#1096)

* Add Peer nil Check in Block Gossiping (#1097)

* Beef up logging for FastHotStuffConsensus (#1107)

* Fix Validation For Zero Validator HighQC View Value In Timeout QCs (#1111)

* Fix Validation For Zero Validator HighQC View Value In Timeout QCs

* Fix typo

* Better comments

* Better validations

* Print Current Leader Check Debugging Info (#1112)

* Fix Block Hash Comparison In ProcessValidatorVote (#1117)

* Pass uncommitted utxo view through validation funcs to prevent rebuilds (#1109)

* Cache block views (#1110)

* VerifySignature syncing enhancements (#1115)

* Update flow crypto dependency (#1123)

* Reject Forking PoW Blocks Once Chain Reaches Final Height of PoW Protocol (#1129)

* PoS NetworkManager Review (#1119)

* PoS NetworkManager Review

* nit

* PoS NetworkManager Review Nits

* nits

* more nits

* PoS NetworkManager ConnectIps Fixes (#1120)

* PoS NetworkManager ConnectIps Updates

* nits

* nit

* PoS NetworManager ConnectIps Tests (#1121)

---------

Co-authored-by: Piotr Nojszewski <[email protected]>
Co-authored-by: Lazy Nina <[email protected]>

* Typos fixed, TransactionMetadata encoder/decoder patch.

* Remove Redundant StartMempoolSyncRoutine Starts Before Mempool Is Initialized (#1133)

* Support _executeAllTestRollbackAndFlush for atomic transactions.

* Use Safer Handshake Filter For Connected Validators (#1137)

* PoS UtxoView ConnectTransactions (#1099)

* PoS UtxoView ConnectTransactions

* Comments

* PoS Mempool Updated Refresh (#1100)

* PoS Mempool Updated Refresh

* Comments and fixes

* PoS Mempool Transaction Validation Routine (#1101)

* PoS Mempool Transaction Validation Routine

* Comments

* PoS Block Producer updates (#1102)

* PoS Block Producer updates

* Fixes

* PoS Mempool Exchange Updates (#1103)

* PoS Mempool Exchange Updates

* Nits

* Comment update

* nits

* PoS Hypersync Updates (#1085)

* Add BLS Keystore

* PoS Validator Constants and Network Changes (#876)

* PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

* Constants and network changes

* Test MsgDeSoVerack encoding

* Fix snapshot hack

* Revert "Remove constants/network"

This reverts commit b467ddbcd034c2e8d2728a7e77f4b714b686a760.

* Fix compilation errors

* Address review comments

* PoS Validator Connect/Disconnect Flow  (#768)

* PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

* Another review round

* gofmt

* Comment change

* PoS RemoteNode and RemoteNodeId (#857)

* RemoteNode and RemoteNodeId

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

* Review round

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

* Final pass

* PoS Remote Node Indexer and Manager (#879)

* Add RemoteNodeIndexer

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

More RemoteNodeManager updates

Nits

* PoS HandshakeController (#860)

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

* Add HandshakeController

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

* Merge HandshakeStage with RemoteNodeStatus; small HandshakeController nits

* Nit

* HandshakeController updates

* Nits

* Quick nit

* Nits

* Comment nit

* Add HandshakeController (#861)

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

Integration testing updates

PoS Block Producer: TxnConnectStatusByIndex (#672)

* TransactionConnectStatus and ConnectFailingTransaction

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to 960001ce00bbc1c99afb6ca6f697748bd6d944f6.

* Revert "Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions""

This reverts commit 10a147654c5147c28ec674d0650bb54c8d9cebce.

* Revert "Merge branch 'p/bmf-status-connected' into p/failing-transactions"

This reverts commit d3e543c4c3e6f03cc74087b05c268d4449ba1689, reversing
changes made to a9f782751b11e8aa3a0977fd2b2535b1ef4d7242.

* TransactionConnectStatus and ConnectFailingTransaction

* Initial _connectFailingTransaction

* ConnectFailingTransaction and GlobalParamsEntry updates

* Fix merge conflicts

* gofmt

* Fix merge conflicts

* Fix blockheight

* Fix merge conflicts

* gofmt

* Revert connect failing transaction

* Add TxnStatusConnectedIndex to block and header

* Fix naming

* Fix tests; remove asserts

* Update comment

RemoteNode and RemoteNodeId

Initial remote node manager tests

remote node tests

Better connection testing framework

Add validator integration test

Fix validator-validator connection test; Add nonValidator-validator test

Simplify indices

Simplify remote node indexer; fix compilation

Simplify RemoteNodeManager

More RemoteNodeManager updates

Nits

* Add validator deduplication test (#942)

* Revert "Code split" (#943)

This reverts commit 831096ac1d3008233868ac8b8f0eca4cd2b9553e.

* Revert "Code split" (#944)

This reverts commit 0604b6d3fc155177a2bb295e6635ed21b20dd947.

* Nits

* PoS NetworkManager RemoteNode Cleanup (#945)

* Revert "Code split"

This reverts commit c0c32f3943ead0e06fdfb3343954a6b5273ea887.

* Review

* Sync trunk

* Rename

* PoS NetworkManager Address (#957)

* Revert "Another split"

This reverts commit eaeec5875a84621b4888fc2a6104e9904e7ef53d.

* Revert routine stops

* gofmt

* Add addrMgr to Server

* Review

* PoS NetworkManager Rename and Nits (#959)

* Renames

* nits

* More renames

* Review

* PoS NetworkManager Fix Integration Tests (#960)

* Some fixes

* Fixes

* Fix another integration test

* Fix integration tests

* Fix RegtestMiner

* Fix fmt (#973)

* PoS Networking and Syncing Documentation (#974)

* noop

* NetworkManager documentation

* gofmt

* Rewording (#981)

* Rename (#986)

* PoS NetworkManager Fix Deadlock and Test AddIps (#996)

* Fix Deadlock and Test AddIps

* Glog fix

* PoS NetworkManager Comment Nit (#997)

* Add ProtocolVersion To Regtest Params (#1035)

* Fix Constructor Name for NetworkManager

* Broadcast Votes, Timeouts, and Block Proposals To Validators (#1036)

* Broadcast Votes and Timeouts To Validators

* Broadcast Block Proposals To Network

* Fix failed unit tests

* Address Nina's comments

* Use RemoteNode To Fetch Missing PoS Blocks (#1045)

* Update Active Validator Connections In PoS Consensus (#1054)

* Remove Rollbacks To bestHeaderChain When bestChain is Mutated (#1055)

* PoW Miner Event Loop Cleanup (#1056)

* Log Peer Validator Vote Messages (#1057)

* Log Peer Validator Timeout Messages (#1058)

* Request Missing HighQC Block For Timeout Message (#1061)

* Request Missing HighQC Block For Timeout Message

* Address Nina's comments

* Remove Peer Disconnects in Server._handleBlock (#1062)

* Remove Peer Disconnects in Server._handleBlock

* Warning for unrequested blocks

* Catch case for spam prevention check

* Address Nina's comment

* Change log level for consensus events

* Update regtest block producer domain

* Prevent Commited Tip Reorgs in ProcessHeaderPoS (#1063)

* Prevent Commited Tip Reorgs in ProcessHeaderPoS

* Clean up error message

* Add Estimate fee rate to mempool interface (#1066)

* Add BLS Public Key PKID Pair Entry Snapshot to core state (#1068)

* Fix txindex for failing txns (#1069)

* Introduce failing txn type so state syncer understand failing txns (#1070)

* Support uncommitted blocks in state syncer mempool flush (#1065)

* Fix Connect failing txn test (#1071)

* noop

* Add support for seed hex in block producer seed (#1072)

* Make GetCommittedTip public (#1073)

* Assorted small enhancements for node restart w/ pos (#1079)

* pos_blockchain updates (#1074)

* Fix txindex dependent transaction within uncommitted blocks (#1082)

* Add flag to control number of mempool txns to sync in state syncer routine (#1083)

* PoS update snapshot epoch duration (#1075)

* PoW -> PoS Snapshot epoch transition

* Simplify SnapshotBlockHeightPeriod logic

* PoS deprecate DisconnectBlocksToHeight (#1076)

* Deprecate DisconnectBlocksToHeight

* cleanup

* PoS batch BlockNode update in snapshot (#1077)

* Batch BlockNode update

* nit

* Review

* PoS NetworkManager Consolidation (#1078)

* NetworkManager consolidation

* Nits

* Connect Uncommitted Blocks To Best Header Chain on Startup (#1087)

* Smarter Transition From Syncing To Steady State PoS Consensus (#1088)

* Fix FastHotStuffConsensus Transition Timer (#1091)

* Gossip New Block Hashes Via Inv Message to Non-Validators (#1092)

* Fix Edge Cases With Header Syncing, Block Syncing, and PoS Steady State (#1093)

* Safer Heuristic to Detemine When to Transition to FastHotStuffConsensus (#1094)

* Fix Mempool and Fee Estimator Past Blocks Refresh on Block Connect (#1095)

* Fix Mempool and Fee Estimator Past Blocks Refresh on Block Connect

* Cleanup

* Address Nina's comments

* Fix Race Conditions With Mempool Txn Relay (#1096)

* Add Peer nil Check in Block Gossiping (#1097)

* Beef up logging for FastHotStuffConsensus (#1107)

* Fix Validation For Zero Validator HighQC View Value In Timeout QCs (#1111)

* Fix Validation For Zero Validator HighQC View Value In Timeout QCs

* Fix typo

* Better comments

* Better validations

* Print Current Leader Check Debugging Info (#1112)

* Fix Block Hash Comparison In ProcessValidatorVote (#1117)

* nit (#1124)

* PoS Hypersync Archival Mode (#1089)

* Fix

* Revert "nit"

This reverts commit bd106c96ff1ac6d0e231ebb50f657d7e97ff160c.

* Pass uncommitted utxo view through validation funcs to prevent rebuilds (#1109)

* Cache block views (#1110)

* VerifySignature syncing enhancements (#1115)

* Update flow crypto dependency (#1123)

* Reject Forking PoW Blocks Once Chain Reaches Final Height of PoW Protocol (#1129)

* PoS Hypersync Fixes (#1122)

Hypersync Archival Regtest

* PoS Hypersync Testing (#1130)

* PoS Hypersync Testing

Hypersync Archival Regtest

* Fixes

* comments

* Nit

* gofmt

* Nits

* Test nits

* Fix Regtest Block Proposer Domain (#1138)

---------

Co-authored-by: iamsofonias <[email protected]>
Co-authored-by: tholonious <[email protected]>
Co-authored-by: Lazy Nina <[email protected]>

* Fix syncing headers state while syncing blocks (#1132)

* SnapshotCache struct (#1116)

* Look up validator set only once in end of epoch (#1127)

* Read bytes directly into PKID struct instead of creating reader (#1134)

* Add keys only seek for badger (#1135)

* Set Prefix when seeking and set prefetch values to false where appropriate (#1136)

* nits

* Add refreshNoLock and fix tests

* Tests

* Add block height check to IsAtomicTxnsInnerTxn.

* Allow orphan blocks in block index (#1151)

* Delay FastHotStuffConsensus Transition If Sync Peer Is Not Connected (#1154)

* Address Nina's Comments For connectFailing Removal in StateChangeSyncer (#1155)

* Address Nina's Comments For connectFailing Removal in StateChangeSyncer

* Better comments

* Make MaxBlockSizeBytesPoS part of GlobalParams (#1139)

* Add soft max block size bytes (#1152)

* MaxTxnSizeBytesPoS in global params (#1153)

* Enforce a minimum fee bucket size when updating global params (#1140)

* Hook up Block Production interval millis in global params (#1141)

* Fix event loop test (#1159)

* Remove FailingTxn operation type (#1157)

* Support bulk block download from peer

In order to increase the number of blocks each node can process per
second, we are upgrading our legacy block processing from fetching a
single block at a time to fetching blocks in batches.

* Increase the number of headers we fetch from peers after the PoS upgrade

* Add version field to bulk block download message type

* FastHostStuff -> FastHotStuff (#1158)

* Increase Regtest PoS Fork Height to 100 (#1161)

* Adjust Regtest Default Params (#1162)

* cache utxo ops and blocks too to speed up syncing (#1144)

* Use block view cache to speed up state syncer mempool flushes (#1146)

* Bump badger version & improve header processing logging (#1149)

* Speed up blocksync by only writing to db when an entry has changed (#1150)

This change fully resolves a block syncing slowness issue encountered in the last phase of PoS testing.

    In order to optimize flushes for certain prefixes, we want to only write entries to the db that have changed.
    On top of that, we add a further optimization to only update related indexes if the stake amount or status has changed in the
    validator. Not doing this results in a lot of writes to badger
    every epoch that eventually slow block processing to a crawl. This is essentially a bug in
    badger when you repeatedly write to the same key, and we're papering over it here in response
    to encountering the issue. In an ideal world, badger would work as intended and this extra
    optimization wouldn't be necessary.
    
    Prefixes affected:
    * PrefixStakeByValidatorAndStaker
    * PrefixStakeByStakeAmount
    * PrefixValidatorByPKID
    * PrefixValidatorByStatusAndStakeAmount
    * PrefixSnapshotValidatorSetByPKID
    * PrefixSnapshotValidatorSetByStakeAmount

* Consolidate validateTransactions routine and refresh augmented view routine (#1166)

* Add recent blocks txn cache (#1167)

* Fix wait start group for pos mempool start (#1168)

* Move mp write lock to the top of AddTransaction (#1169)

* Create Helper Function To Compute the Number of Timeouts Before Epoch Transition (#1171)

* Apply Prev Epoch Timeouts To Leader Index Computation (#1172)

Apply Prev Epoch Timeouts To Leader Index Computation

Adjust processOrphanBlockPoS

* Address Nina's Naming And Nit Comments (#1173)

* Move deleting of expired nonces to end of epoch hook (#1170)

* BLS public key enhancements (#1174)

* Allow txn relay in need blocks state for PoS (#1160)

* || !running pos in txn relay check (#1175)

* Deprecate FailingTransactionBMFMultiplierBasisPointsKey (#1176)

* Update PoW Epoch Durations to 144 Blocks (#1178)

* Update PoW Epoch Durations to 144 Blocks

* Fix typo

* Use GetCurrentGlobalParams where applicable (#1179)

* Use specified MinimumFeeRateNanosPerKB when computing PoS fee estimator fees (#1180)

* Account for size of header in block producer (#1177)

* Pass inner txn hash in atomic txn processing (#1184)

* wip

* Pass inner txn hash when processing atomic txn

* Index NonValidators With PublicKeys On Handshake Complete (#1182)

* Index NonValidators With PublicKeys On Handshake Complete

* Address Nina's comments

* Improve Logging in NetworkManager and PosConsensus (#1186)

* Add GetAugmentedUniversalViewWithAdditionalTransactions for Backend APIs. (#1164)

* Create GetAugmentedUniversalViewWithAdditionalTransactions.

* Add GetMempoolTipBlockHeight to mempool interface

* Add support for atomic txns in the pos mempool (#1156)

* Recompute fees in CreateAtomicTxnWrapper (#1183)

This PR has kinda increased in scope but I'm adding a description below that addresses all of the changes in this PR from feature/proof-of-stake. I'm also going to change the comparison branch to feature/proof-of-stake to make it a full review.

* From @diamondhands:

  * Improve the error returned when we reject a txn from the mempool

    * This required adding a cache of the errors we produce when validating txns and using that to return the error upon request
  * Improve CreateAtomicTxnWrapper to add automatic fee computation

    * CreateAtomicTxnWrapper will now compute the exact fee required for each inner txn and update the fee on that txn if it's lower than what was computed
    * CreateAtomicTxnWrapper now computes the TOTAL fee required to submit the atomic txn, including the wrapper txn, and intelligently adds the extra required to the first inner txn in the list
  * Fix a bug in computeFeeRecursive to properly assess the nonce. Without this, we were over-estimating the fee significantly.
  * Fix a bug in computeFeeRecursive to properly assess signature sizes in atomic txns. Without this, we were significantly under-estimating txn size.
  * Introduce an UpdateTxnFee function that bundles in a special-case of updating the fee on a DAOCoinLimitOrder txn

    * Replaced all raw fee adjustments with a call to this function in core and backend
  * Mark DAOCoinLimitOrder.FeeNanos as deprecated. We don't need it after balance model, but if we don't set it to exactly the txn.TxnFeeNanos we get an error.
  * Add some error-checking in pos mempool that was missing
* From @lazynina:

  * Proper sanity-checking of atomic txns
  * Add nonce handling for atomic txns

    * Although note there is still a TODO to add a synthetic nonce for atomic txns so that you can replace them by fee. This isn't time-sensitive so we're punting on it. Added a TODO in addTransactionNoLock for it.

* Make sure global params doesn't overflow on MaximumVestedIntersectionsPerLockupTransaction (#1187)

* Remove Duplicate Group Key Check For Validators (#1191)

* Checkpoint syncing providers system (#1185)

* Checkpoint syncing providers system

* Apply suggestions from code review

Co-authored-by: diamondhands0 <[email protected]>

---------

Co-authored-by: diamondhands0 <[email protected]>

* Log Validator Indices and Active Validators (#1192)

* Log Validator Indices and Active Validators

* Add peer id

* Add nil Check For NetworkManager Validator Address Logging

* Add InitialLeaderIndexOffset to EpochEntry (#1199)

* Add InitialLeaderIndexOffset to EpochEntry

* Fix typo

* Add Uint64 to Uint64 Pseudo-Random Function (#1201)

* Add Uint64 to Uint64 Pseudo-Random Function

* Use EncodeUint64

* Pass Through PreviousView To EndOfEpochHook (#1200)

* Pass Through PreviousView To EndOfEpochHook

* Fix segfault

* Compute InitialLeaderIndexOffset On Epoch Transition (#1202)

* Deprecate Previous Epoch Timeouts Count from Leader Index Computation (#1203)

* Incorporate InitialLeaderIndexOffset in Leader Index Computation (#1205)

* Expose network manager for admin panel (#1204)

* Upgrade go to 1.22 (#1190)

* Upgrade all deps (#1163)

* Move NetworkManager GoRoutine Refresh Interval to Command Line Config (#1206)

* Remove Validator Index Logging in NetworkManager (#1208)

* Add validateTransactionsReadOnlyLatestBlockView (#1196)

* NewUtxoView never returns an error (#1197)

* CopyUtxoView doesn't return an error (#1198)

* Adjust bundle size based on pos vs pow (#1209)

* Simplify NetworkManager Routines (#1210)

* Fix IsInbound and IsOutbound Checks on RemoteNode (#1211)

* Fix IsInboud and IsOutbound Checks on RemoteNode

* Fix compilation errors

* add LatestView to checkpoint block info, refresh when starting fast hot stuff event loop, and use this value to override tip's view (#1213)

* Remove Mempool Refresh On Block Connect and Disconnect (#1214)

* Remove Mempool Refresh On Block Connect and Disconnect

* Add TODOs

* Add IsPoSCommitBlockEvent to block event (#1215)

* Check txn register for duplicate txn earlier in add transaction (#1216)

* Remove Gossipped Txn Error Logging (#1217)

* Remove Gosspped Txn Error Logging

* Change log level

* Use alpine:latest instead of edge (#1219)

* Create Helper ConnectTransactionIntoNewUtxoView Function For Fail Safe Txn Connects (#1221)

* Simplify Mempool Transaction Validation Routine (#1222)
…
  • Loading branch information
10 people authored Jun 17, 2024
1 parent 9ddc28d commit 471d000
Show file tree
Hide file tree
Showing 160 changed files with 59,213 additions and 4,706 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ quick_testing
dump_txns
compare_blocks.go
backend
core

.idea
.vscode

local_scripts/*
lib/mem.log

cover.out
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM alpine:latest AS core

RUN apk update && apk upgrade
RUN apk add --update go gcc g++ vips vips-dev
RUN apk add --update bash cmake g++ gcc git make vips vips-dev

COPY --from=golang:1.20-alpine /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"

WORKDIR /deso/src/core

Expand All @@ -10,18 +13,22 @@ COPY go.sum .

RUN go mod download

COPY desohash desohash
COPY cmd cmd
COPY lib lib
COPY migrate migrate
COPY test_data test_data
COPY main.go .
COPY bls bls
COPY cmd cmd
COPY collections collections
COPY consensus consensus
COPY desohash desohash
COPY lib lib
COPY migrate migrate
COPY scripts scripts
COPY test_data test_data
COPY main.go .

# build backend
RUN GOOS=linux go build -mod=mod -a -installsuffix cgo -o bin/core main.go

# create tiny image
FROM alpine:edge
FROM alpine:latest

RUN apk add --update vips-dev

Expand Down
Loading

1 comment on commit 471d000

@mvanhalen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats! What a change list🤯 . Looking forward at the next phase for DeSo!

Please sign in to comment.