## Summary
This pull request adds a default set of values to the new Synchrony parameters. These values were chosen by after observation of three live networks: Emoney, Osmosis, and the Cosmos Hub.
For the default Precision value, `505ms` was selected. The reasoning for this is summarized in https://github.com/tendermint/tendermint/issues/7724
For each observed chain, an experimental Message Delay was collected over a 24 hour period and an average over this period was calculated using this data. Values over 10s were considered outliers and treated separately for the average since the majority of observations were far below 10s. The message delay was calculated both for the quorum and the 'full' prevote. Description of the technique for collecting the experimental values can found in #7202. This value is calculated only using timestamps given by processes on the network, so large variation in values is almost certainly due to clock skew among the validator set.
`12s` is proposed for the default MessageDelay value. This value would easily accomodates all non-outlier values, allowing even E-money's 4.25s value to be valid. This would also allow some validators with skewed clocks to still participate without allowing for huge variation in the timestamps produced by the network. Additionally, for the currently listed use-cases of PBTS, such as unbonding period, and light client trust period, the current bounds for these are in weeks. Adding a few seconds of tolerance by default is therefore unlikely to have serious side-effects.
## Data
### Cosmos Hub
Observation Period: 2022-02-03 20:22-2022-02-04 20:22
Avg Full Prevote Message Delay: 1.27s
Outliers: 11s,13s,50s,106s,144s
Total Outlier Heights: 86
Avg Quorum Prevote Message Delay: .77s
Outliers: 10s,14s,107s,144s
Total Outlier Heights: 617
Total heights: 11528
### Osmosis
Observation Period: 2022-01-29 20:26-2022-01-28 20:26
Avg Quorum Prevote Message Delay: .46s
Outliers: 21s,50s
Total Outlier Heights: 26
NOTE: During the observation period, a 'full' prevote was not observed.
Total heights: 13983
### E-Money
Observation Period: 2022-02-07 04:29-2022-02-08 04:29
Avg Full Prevote Message Delay: 4.25s
Outliers: 12s,15s,39s
Total Outlier Heights: 128
Avg Quorum Prevote Message Delay: .20s
Outliers: 28s
Total Outlier Heights: 15
Total heights: 3791
When testing rollback feature in the Cosmos SDK, we found that the app hash
in Tendermint after rollback was the value after the latest block, rather than
before it.
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
While I'd hoped to be able to make the socket client less weird, I
think that this is a nice middle ground in terms of improving
readability and removing the vestigal components without breaking
anything or radically changing the underlying assumptions.
In the future we'd want to have requests be identified by a request
ID, and then we could drop the request tracking logic in the client
entirely, and this is protocol breaking. The alternatives aren't
substantively different than the current implementation.
This change changes the ABCI socket client to allow goroutines to block writing to the internal queue. This has the effect ensuring that callers of the ABCI methods do not error on a full internal queue at the expense of allowing the number of goroutines waiting on this internal queue to grow in an unbounded fashion. This tradeoff seems preferable since it allows callers of the ABCI methods to be certain that a request that was made will reach the application if it is available.
Closes: #7827
This change was initially implemented here: e13b4386ff and never landed on v0.34, only v0.35+
This follows along in the spirit of #7845 but is orthogonal to
removing `CheckTxAsync` (which will come after the previous commit
lands,) so I thought I'd get it out there earlier.
The main function defers some things that do not run in the "normal" exit case
because we call os.Exit(0) explicitly. Since falling off the end of main does
the same thing, and also permits defers to run, let's do that.
After poking around #7828, I saw the oppertunity for this cleanup,
which I think is both reasonable on its own, and quite low impact, and
removes the math around process start time.
Now that shutdown is handled by contexts in most cases, I think it's
fair to cleanup the way this reactor shuts down. Additionaly there
were a few cases where the `blockSyncOutBridgeCh` was misshandled and
could have lead to a deadlock which I observed in some tests
The original Tendermint implementation provided a fixed, built-in event
indexer, but users would like to plug in different indexing backends. Although
ADR-065 was a good first step toward customization of indexing, its
implementation model does not satisfy all the user requirements. Moreover,
this approach leaves some existing technical issues with indexing unsolved.
This RFC documents these concerns, and discusses some potential approaches to
solving them. It does _not_ propose a specific technical decision. It is meant
to unify and focus some of the disparate discussions of the topic.
While the name including an apostrophe is perfectly legal, it turns out to
confuse some tools that don't escape things properly. Rename to remove the
apostrophe rather than fight the world.
Fixes#7836.
* Rebased and git-squashed the commits in PR #6546
migrate abci to finalizeBlock
work on abci, proxy and mempool
abciresponse, blok events, indexer, some tests
fix some tests
fix errors
fix errors in abci
fix tests amd errors
* Fixes after rebasing PR#6546
* Restored height to RequestFinalizeBlock & other
* Fixed more UTs
* Fixed kvstore
* More UT fixes
* last TC fixed
* make format
* Update internal/consensus/mempool_test.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Addressed @williambanfield's comments
* Fixed UTs
* Addressed last comments from @williambanfield
* make format
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Our test cases spew a lot of files and directories around $TMPDIR. Make more
thorough use of the testing package's TempDir methods to ensure these are
cleaned up.
In a few cases, this required plumbing test contexts through existing helper
code. In a couple places an explicit path was required, to work around cases
where we do global setup during a TestMain function. Those cases probably
deserve more thorough cleansing (preferably with fire), but for now I have just
worked around it to keep focused on the cleanup.
To simplify local testing, do not report failures for tests that require Docker
when Docker is not avaliable. Instead, log a warning and skip the tests.
This has no effect in CI, where Docker is installed.
Based on the discussion in #7723, make the CheckTx benchmark exercise
GetEvictableTxs which is one of the critical paths in CheckTx.
After profiling the test, the sorting will occupy 90% of the CPU time in CheckTx.
In the test it doesn't count the influence of the preCheck, postCheck, and
CheckTxAsync when the mempool is full.
There was a nolint directive on this deprecated import, which golangci-lint
complains about being unnecessary. However, removing it angers staticcheck,
which enforces deprecation warnings.
Use the right syntax to make both equally unhappy.
We have this one solitary metric from the go-metrics package. In principle
this statistic could be useful, but the way we have it hooked up, nothing can
observe the value: We don't export it, we don't log it, and it does not auto
publish anywhere.
Given that this state of affairs has not changed since the metric was first
added in 2017 (c08618f), I think we can safely discard it. No one is now or has
ever gotten any data out of this metric.
This RFC attempts to explore the requirements for deleting the notion of Gas from Tendermint while allowing applications that need such functionality to build it.