mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-03 22:06:18 +00:00
modify evidence hashes
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
evidence = 5
|
||||
|
||||
[node.validator01]
|
||||
[node.validator02]
|
||||
[node.validator03]
|
||||
|
||||
@@ -20,10 +20,7 @@ import (
|
||||
)
|
||||
|
||||
// 1 in 11 evidence is light client evidence, the rest is duplicate vote
|
||||
// FIXME: Setting to 11 disables light client attack evidence since nodes
|
||||
// don't follow a minimum retention height invariant. When we fix this we
|
||||
// should use a ratio of 4.
|
||||
const lightClientEvidenceRatio = 11
|
||||
const lightClientEvidenceRatio = 4
|
||||
|
||||
// InjectEvidence takes a running testnet and generates an amount of valid
|
||||
// evidence and broadcasts it to a random node through the rpc endpoint `/broadcast_evidence`.
|
||||
@@ -74,7 +71,7 @@ func InjectEvidence(testnet *e2e.Testnet, amount int) error {
|
||||
duplicateVoteTime := status.SyncInfo.LatestBlockTime
|
||||
|
||||
var ev types.Evidence
|
||||
for i := 0; i < amount; i++ {
|
||||
for i := 1; i <= amount; i++ {
|
||||
if i%lightClientEvidenceRatio == 0 {
|
||||
ev, err = generateLightClientAttackEvidence(
|
||||
privVals, lightEvidenceCommonHeight, valSet, testnet.Name, blockRes.Block.Time,
|
||||
|
||||
@@ -38,7 +38,10 @@ func TestBlock_Header(t *testing.T) {
|
||||
resp, err := client.Block(ctx, &block.Header.Height)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, block, resp.Block,
|
||||
"block mismatch for height %v", block.Header.Height)
|
||||
"block mismatch for height %d", block.Header.Height)
|
||||
|
||||
require.NoError(t, resp.Block.ValidateBasic(),
|
||||
"block at height %d is invalid", block.Header.Height)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user