abci++: add proto fields for enabling vote extensions (#8587)

This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced.

This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well.

closes: #8453
This commit is contained in:
William Banfield
2022-05-23 18:23:23 +00:00
committed by GitHub
parent 6ff77eece3
commit 43313e9b85
14 changed files with 553 additions and 129 deletions
+7
View File
@@ -66,6 +66,9 @@ var (
txSize = uniformChoice{1024, 4096} // either 1kb or 4kb
ipv6 = uniformChoice{false, true}
keyType = uniformChoice{types.ABCIPubKeyTypeEd25519, types.ABCIPubKeyTypeSecp256k1}
voteExtensionEnableHeightOffset = uniformChoice{int64(0), int64(10), int64(100)}
voteExtensionEnabled = uniformChoice{true, false}
)
// Generate generates random testnets using the given RNG.
@@ -116,6 +119,10 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
TxSize: txSize.Choose(r).(int),
}
if voteExtensionEnabled.Choose(r).(bool) {
manifest.VoteExtensionsEnableHeight = manifest.InitialHeight + voteExtensionEnableHeightOffset.Choose(r).(int64)
}
var numSeeds, numValidators, numFulls, numLightClients int
switch opt["topology"].(string) {
case "single":