Commit Graph

359 Commits

Author SHA1 Message Date
William Banfield
4763b0ee99 resurrect tx.Proof method 2022-03-15 11:12:15 -04:00
William Banfield
cff2d43d1e move TxsToTxRecords as helper function for state tests 2022-03-15 10:21:56 -04:00
William Banfield
e87cef8dd3 Merge branch 'master' into wb/abci-prepare-proposal-synchronize 2022-03-15 09:54:05 -04:00
Sam Kleinman
b08dd93d88 libs/log: remove Must constructor (#8120)
* libs/log: remove Must constructor

* Update test/e2e/node/main.go

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* use stdlog

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2022-03-15 13:02:31 +00:00
William Banfield
6da708049f Merge branch 'master' into wb/abci-prepare-proposal-synchronize 2022-03-15 01:05:52 -04:00
William Banfield
747eb86de8 remove Get prefix 2022-03-14 17:51:54 -04:00
William Banfield
a843d8bf28 createProposalBlock explicit returns 2022-03-14 17:41:29 -04:00
William Banfield
889488f92c log if part set errors 2022-03-14 17:35:59 -04:00
William Banfield
51cf3fe7db rename to MarshalTxResults 2022-03-14 17:32:56 -04:00
William Banfield
9082915626 implement TxRecordSet for dealing with TxRecord validation 2022-03-14 14:52:19 -04:00
William Banfield
ce9b5982bc fix all cases of CreateProposalBlock votes 2022-03-11 17:39:15 -05:00
William Banfield
64b0b0a646 mempool_test does not make new list of Tx 2022-03-11 17:31:26 -05:00
William Banfield
5849b16dff fix joined lines 2022-03-11 16:41:55 -05:00
William Banfield
232b38100b use block.Txs 2022-03-11 16:41:54 -05:00
William Banfield
dd98161894 thread vote information through for future use by vote extensions 2022-03-11 16:41:49 -05:00
M. J. Fromberger
e9bc33d807 consensus: ensure the node terminates on consensus failure (#8111)
Updates #8077. The panic handler for consensus currently attempts to effect a
clean shutdown, but this can leave a failed node running in an unknown state
for an arbitrary amount of time after the failure.

Since a panic at this point means consensus is already irrecoverably broken, we
should not allow the node to continue executing. After making a best effort to
shut down the writeahead log, re-panic to ensure the node will terminate before
any further state transitions are processed.

Even with this change, it is possible some transitions may occur while the
cleanup is happening. It might be preferable to abort unconditionally without
any attempt at cleanup.

Related changes:

- Clean up the creation of WAL directories.
- Filter WAL close errors at rethrow.
2022-03-11 13:30:15 -08:00
William Banfield
26c4f9088f add error log for failure to create proposal block 2022-03-11 12:57:05 -05:00
M. J. Fromberger
658a7661c5 p2p: remove unnecessary panic handling in PEX reactor (#8110)
The message handling in this reactor is all under control of the reactor
itself, and does not call out to callbacks or other externally-supplied code.
It doesn't need to check for panics.

- Remove an irrelevant channel ID check.
- Remove an unnecessary panic recovery wrapper.
2022-03-11 08:23:03 -08:00
M. J. Fromberger
89b4321af2 p2p: update polling interval calculation for PEX requests (#8106)
The PEX reactor has a simple feedback control mechanism to decide how often to
poll peers for peer address updates. The idea is to poll more frequently when
knowledge of the network is less, and decrease frequency as knowledge grows.

This change solves two problems:

1. It is possible in some cases we may poll a peer "too often" and get dropped
   by that peer for spamming.

2. The first successful peer update with any content resets the polling timer
   to a very long time (10m), meaning if we are unlucky in getting an
   incomplete reply while the network is small, we may not try again for a very
   long time. This may contribute to difficulties bootstrapping sync.

The main change here is to only update the interval when new information is
added to the system, and not (as before) whenever a request is sent out to a
peer. The rate computation is essentially the same as before, although the code
has been a bit simplified, and I consolidated some of the error handling so
that we don't have to check in multiple places for the same conditions.

Related changes:

- Improve error diagnostics for too-soon and overflow conditions.
- Clean up state handling in the poll interval computation.
- Pin the minimum interval avert a chance of PEX spamming a peer.
2022-03-11 07:49:33 -08:00
William Banfield
62665fe2c5 Merge branch 'master' into wb/abci-prepare-proposal-synchronize 2022-03-10 10:47:29 -05:00
JayT106
d9c9675e2a p2p+flowrate: rate control refactor (#7828)
Adding `CurrentTransferRate ` in the flowrate package because only the status of the transfer rate has been used.
2022-03-10 13:48:23 +00:00
William Banfield
c25f7769a6 remove Must* proof and hash functions 2022-03-09 16:30:08 -05:00
William Banfield
75fb1ce421 MakeBlock no longer returns error 2022-03-08 18:46:00 -05:00
William Banfield
531150819d remove unused method from state.go 2022-03-08 18:25:49 -05:00
William Banfield
245687f6cb cleanup eventbus changes from merge 2022-03-08 17:46:19 -05:00
William Banfield
4f597b4ab6 do not rebuild block if not modified 2022-03-08 17:37:24 -05:00
William Banfield
333b25cfbe remove TODO for prepare proposal 2022-03-08 17:37:23 -05:00
William Banfield
6a085d6077 reorder tx test also removes txs 2022-03-08 17:37:22 -05:00
William Banfield
d102b4881e maxDataBytes remove comment 2022-03-08 17:37:21 -05:00
William Banfield
428efab53f update test comment 2022-03-08 17:37:20 -05:00
William Banfield
378bc12c71 update checktx log statement 2022-03-08 17:37:19 -05:00
William Banfield
8f474fbbdb add logic for ignoring Tx changes if modifiedTx is false 2022-03-08 17:37:18 -05:00
William Banfield
7e75f88780 initial suite of tests 2022-03-08 17:37:17 -05:00
William Banfield
041361da04 add logic to check tx to the mempool if marked added 2022-03-08 17:37:16 -05:00
William Banfield
3ae7382ed0 remove unused 'votes' parameter from CreateProposalBlock 2022-03-08 17:37:16 -05:00
William Banfield
d796d3f103 mempool yakshave: replace old mock entirely 2022-03-08 17:37:13 -05:00
William Banfield
0379e07c72 mempool yakshave: generate new mocks 2022-03-08 17:28:02 -05:00
William Banfield
a3d8c7ed18 initial test for prepare proposal 2022-03-08 17:28:01 -05:00
William Banfield
914c555ff5 initial logic to remove txs from the mempool 2022-03-08 17:28:00 -05:00
William Banfield
9fbbdecb65 implement ResponsePrepareProposal validation rules 2022-03-08 17:27:58 -05:00
William Banfield
f52a2858c8 annotate methods with notes from spec 2022-03-08 17:26:57 -05:00
William Banfield
778e2e8908 add tx conversions to get consensus tests to pass 2022-03-08 17:26:56 -05:00
William Banfield
7f617af927 consensus mempool tests compile 2022-03-08 17:26:55 -05:00
William Banfield
7eb766144e add todo for naked return 2022-03-08 17:26:53 -05:00
William Banfield
4f890ecff5 MakeBlock no longer returns part set 2022-03-08 17:26:50 -05:00
William Banfield
1d336ea221 limit use of ABCIResponses 2022-03-08 17:25:30 -05:00
William Banfield
b0aa4b0ba8 unimplemented method stubs. compiles 2022-03-08 17:25:26 -05:00
Sam Kleinman
c35d6d6e2c node: pass eventbus at construction time (#8084)
* node: pass eventbus at construction time

* remove cruft
2022-03-08 13:04:59 +00:00
Sam Kleinman
691cb52528 statesync: avoid leaking a thread during tests (#8085)
* statesync: avoid leaking a thread during tests

* fix
2022-03-07 22:12:39 +00:00
Sam Kleinman
01266881b8 evidence: manage and initialize state objects more clearly in the pool (#8080) 2022-03-07 14:26:58 -05:00