Skip to content

e2e: add evidence generation and testing#6276

Merged
cmwaters merged 38 commits intomasterfrom
callum/e2e-evidence
Mar 29, 2021
Merged

e2e: add evidence generation and testing#6276
cmwaters merged 38 commits intomasterfrom
callum/e2e-evidence

Conversation

@cmwaters
Copy link
Contributor

@cmwaters cmwaters commented Mar 25, 2021

Closes: #5575

This PR adds evidence handling tests to the e2e framework.

It creates a command and a testnet parameter evidence which allows valid evidence of both LightClientAttackEvidence and DuplicateVoteEvidence to be generated and inserted through the RPC endpoint of a random node. It then tests that all evidence generated gets committed.

NOTE: I have based this of bez's revise queue PR because there are significant changes to the e2e framework that I didn't want to have to solve conflicts for :)

@cmwaters cmwaters requested review from tessr and tychoish as code owners March 25, 2021 19:46
@cmwaters cmwaters changed the base branch from master to bez/p2p-revise-queue-scheduler March 25, 2021 19:47
@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #6276 (52789b6) into master (32ee737) will increase coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #6276      +/-   ##
==========================================
+ Coverage   60.72%   60.79%   +0.07%     
==========================================
  Files         281      281              
  Lines       26648    26628      -20     
==========================================
+ Hits        16181    16188       +7     
+ Misses       8774     8753      -21     
+ Partials     1693     1687       -6     
Impacted Files Coverage Δ
test/e2e/generator/generate.go 0.00% <0.00%> (ø)
test/e2e/generator/random.go 54.16% <ø> (+14.77%) ⬆️
types/tx.go 82.97% <0.00%> (-4.26%) ⬇️
p2p/transport_memory.go 85.13% <0.00%> (-2.71%) ⬇️
mempool/reactor.go 69.50% <0.00%> (-2.13%) ⬇️
libs/clist/clist.go 67.25% <0.00%> (-1.76%) ⬇️
statesync/syncer.go 80.40% <0.00%> (-0.80%) ⬇️
blockchain/v0/pool.go 74.52% <0.00%> (-0.77%) ⬇️
mempool/clist_mempool.go 80.42% <0.00%> (-0.72%) ⬇️
consensus/reactor.go 69.43% <0.00%> (-0.32%) ⬇️
... and 7 more

Copy link
Contributor

@tychoish tychoish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a great improvement and removes a lot of complexity/fragility to the testing system, which I think is quite good

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @cmwaters, left a few minor questions & comments :)

Base automatically changed from bez/p2p-revise-queue-scheduler to master March 25, 2021 20:58
@cmwaters
Copy link
Contributor Author

Currently, we allow the generator to create testnets with nodes that have a retain height of 0. This means that they retain no blocks. This doesn't fly for an e2e test suite that has evidence because evidence requires keeping blocks and validator sets with which to verify evidence from. Therefore I will add a minimum retain height invariant here (= to the max evidence expiration duration of 3 to ensure that evidence propagates correctly

@alexanderbez
Copy link
Contributor

Sounds reasonable @cmwaters 👍


## KVStore - A First Example

`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Que?

// flow in each round. The flow can send at most quantum bytes at a time. Each
// flow has its own unique quantum, which gives the queue its weighted nature.
// A higher quantum corresponds to a higher weight/priority. The quantum is
// A highzer quantum corresponds to a higher weight/priority. The quantum is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

que?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I did that thing where I think I'm on one tab when I'm actually on some other one just typing away

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching me in any case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: simplify maverick implementation for easier maintenance

3 participants