Skip to content

e2e: add evidence tests - #9292

Merged
cmwaters merged 7 commits into
feature/abci++pppfrom
cal/e2e-evidence-2
Aug 22, 2022
Merged

cmwaters merged 7 commits into
feature/abci++pppfrom
cal/e2e-evidence-2

Conversation

@cmwaters

Copy link
Copy Markdown
Contributor

Closes: #9237

@cmwaters
cmwaters marked this pull request as ready for review August 19, 2022 12:48
@cmwaters
cmwaters requested a review from ebuchman as a code owner August 19, 2022 12:48
@cmwaters
cmwaters requested a review from a team August 19, 2022 12:48
Comment thread internal/test/tx.go
@@ -0,0 +1,11 @@
package test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now that you have brought back the internal directory, I think it'd make sense to delete test/factory/tx.go in favor of this file (they are duplicated AFAICT).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, they're duplicates. Have removed test/factory/tx.go

Comment thread types/evidence.go Outdated
idx, val := valSet.GetByAddress(vote1.ValidatorAddress)
if idx == -1 {
return nil
return nil, errors.New("validator not in validator set")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we put the name of the validator in the error message?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's a good idea. 1 sec

Comment thread internal/test/commit.go Outdated
"github.com/tendermint/tendermint/types"
)

func MakeCommit(ctx context.Context, blockID types.BlockID, height int64, round int32, voteSet *types.VoteSet, validators []types.PrivValidator, now time.Time) (*types.Commit, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one looks the same to me as function MakeCommit in types/test_util.go, can you double-check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there's a lot of deduplication in the testing suite that we can do. I'm not sure if we should do it all in this PR though

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, up to you. In different circumstances I'd insist, but we're in the critical path here.

Comment thread internal/test/vote.go
"github.com/tendermint/tendermint/types"
)

func MakeVote(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There seems to be some overlapping of this function with the ones defined in:

  • types/test_util.go
  • types/evidence_test.go
  • evidence/verify_test.go

It would be awesome if we took the opportunity to consolidate all three.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just as my comment above: up to you if you want to do it as part of this PR, or later

Comment thread test/e2e/networks/ci.toml

[node.seed01]
mode = "seed"
seeds = ["seed02"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we removing seed02? (not that I'm against, just trying to understand the rationale)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was moved in the original PR. I think the rationale was to reduce the size of ci.toml. Having a secondary seed doesn't seem to provide any additional value

Comment thread test/e2e/pkg/testnet.go Resolved
Comment thread test/e2e/pkg/testnet.go
Comment on lines -130 to -132
PrepareProposalDelay: manifest.PrepareProposalDelay,
ProcessProposalDelay: manifest.ProcessProposalDelay,
CheckTxDelay: manifest.CheckTxDelay,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment, please double-check this hunk

@@ -0,0 +1,320 @@
package main

@sergio-mena sergio-mena Aug 19, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not reviewing this file line-by-line as I assume it comes as-is from some cherry-pick.
Let me know if that's not the case, and I'll go through it more thoroughly.

Comment thread test/e2e/runner/setup.go
Comment on lines -333 to -335
"prepare_proposal_delay": node.Testnet.PrepareProposalDelay,
"process_proposal_delay": node.Testnet.ProcessProposalDelay,
"check_tx_delay": node.Testnet.CheckTxDelay,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please doublecheck these.

Comment thread test/e2e/runner/setup.go
"persist_interval": node.PersistInterval,
"snapshot_interval": node.SnapshotInterval,
"retain_blocks": node.RetainBlocks,
"key_type": node.PrivvalKey.Type(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to add some evidence-related entry here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No

@cmwaters
cmwaters requested a review from sergio-mena August 22, 2022 10:17

@sergio-mena sergio-mena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@cmwaters
cmwaters merged commit b37f062 into feature/abci++ppp Aug 22, 2022
@cmwaters
cmwaters deleted the cal/e2e-evidence-2 branch August 22, 2022 11:33
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.

3 participants