Commit Graph

343 Commits

Author SHA1 Message Date
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
William Banfield 26c4f9088f add error log for failure to create proposal block 2022-03-11 12:57:05 -05: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
M. J. Fromberger 2df5c85a8d Fix govet errors for %w use in test errors. (#8083)
The %w syntax is a fmt.Errorf thing, not supported by the testing package.
2022-03-07 18:17:37 +00:00
Sam Kleinman 8df7b6103f proxy: collapse triforcated abci.Client (#8067) 2022-03-06 18:25:50 -05:00
Sam Kleinman f1659ce329 consensus: fix TestInvalidState race and reporting (#8071) 2022-03-06 12:29:05 -05:00
William Banfield 0b8a62c87b abci: Synchronize FinalizeBlock with the updated specification (#7983)
This change set implements the most recent version of `FinalizeBlock`. 

# What does this change actually contain?

* This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name.
* The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock`
* The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous.
* Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across.
* Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created.

# Questions for reviewers
* We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable?
* Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? 


closes: #7658
2022-03-04 22:32:37 +00:00
Sam Kleinman 0167f0d527 node: nodes should fetch state on startup (#8062) 2022-03-04 12:23:57 -05:00
Sam Kleinman 9d98484845 node: excise node handle within rpc env (#8063) 2022-03-03 15:17:45 -05:00
M. J. Fromberger 63ff2f052d Remove now-unused and deprecated Subscribe methods. (#8064)
Both pubsub and eventbus are internal packages now, and all the existing use
has been updated to use the SubscribeWithArgs methods instead.
2022-03-03 10:03:38 -08:00
Sam Kleinman a3881f0fb1 consensus: improve wal test cleanup (#8059)
I believe that this gets rid of our temp-file related test errors.
2022-03-02 18:35:39 +00:00
M. J. Fromberger af96ef2fe4 rpc: set a minimum long-polling interval for Events (#8050)
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.
2022-03-02 08:12:18 -08:00
M. J. Fromberger a22942504c p2p: re-enable tests previously disabled (#8049) 2022-03-01 12:25:11 -08:00
Sam Kleinman 21087563eb consensus: validator set changes test cleanup (#8035)
This is mostly an extremely small change where I double a somewhat
arbitrarly set timeout from 1m to 2m for an entire test. When I put
these timeouts in the test, they were arbitrary based on my local
performance (which is quite fact,) and I expected that they'd need to
be tweaked in the future.

A big chunk of this PR is reworking a collection of helper functions
that produce somewhat intractable messages when a test fails, so that
the error messages take up less vertical space, hopefully without
losing any debugability.
2022-03-01 13:42:00 +00:00
Sam Kleinman a965f03c15 statesync: avoid compounding retry logic for fetching consensus parameters (#8032)
We're waiting between trying witnesses (which shouldn't be neccessary
because the witnesses shouldn't depend on each other,) and also
between *attempts*, and really the outer sleep should be enough.
2022-03-01 13:01:57 +00:00
Sam Kleinman 58dc172611 p2p: plumb rudamentary service discovery to rectors and update statesync (#8030)
This is a little coarse, but the idea is that we'll send information
about the channels a peer has upon the peer-up event that we send to
reactors that we can then use to reject peers (if neeeded) from reactors.

This solves the problem where statesync would hang in test networks
(and presumably real) where we would attempt to statesync from seed
nodes, thereby hanging silently forever.
2022-02-28 20:02:54 +00:00
Sam Kleinman f25b7ceeb2 consensus: make orchestration more reliable for invalid precommit test (#8013)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-26 00:21:59 +00:00
Sam Kleinman a153f82433 p2p: ignore transport close error during cleanup (#8011)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-25 14:48:41 -05:00
William Banfield c80734e5af state: synchronize the ProcessProposal implementation with the latest version of the spec (#7961)
This change implements the spec for `ProcessProposal`. It first calls the Tendermint block validation logic to check that all of the proposed block fields are well formed and do not violate any of the rules for Tendermint to consider the block valid and then passes the validated block the `ProcessProposal`.

This change also adds additional fixtures to test the change. It adds the `baseMock` types that holds a mock as well as a reference to `BaseApplication`. If the function was not setup by the test on the contained mock Application, the type delegates to the `BaseApplication` and returns what `BaseApplication` returns. 

The change also switches the `makeState` helper to take an arg struct so that an ABCI application can be plumbed through when needed.

closes: #7656
2022-02-25 18:56:34 +00:00