Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export a public testutil function for use in celestia-node swamp tests #770

Closed
Tracked by #663
rootulp opened this issue Sep 22, 2022 · 0 comments · Fixed by #824
Closed
Tracked by #663

Export a public testutil function for use in celestia-node swamp tests #770

rootulp opened this issue Sep 22, 2022 · 0 comments · Fixed by #824
Assignees
Labels
testing items that are strictly related to adding or extending test coverage

Comments

@rootulp
Copy link
Collaborator

rootulp commented Sep 22, 2022

Problem

celestia-node currently uses a kvstore application in swamp tests. The kvstore doesn't adhere to assumptions of celestia-app (i.e. squareSize is block data is a power of two). It would be preferable if celestia-node swamp tests used a celestia-app application but it is cumbersome for them to use SetupTestAppWithGenesisValSet because the test Tendermint node will hit

Did you reset Tendermint without resetting your application's data? [recovered]
	panic: state.AppHash does not match AppHash after replay. Got
0A98F8A6D292AD8D517FD57F77617DC27ECC7637BD82973795A7A473917F00A9, expected .

Proposal

Export a public testutil function from celestia-app that can be used in celestia-node swamp tests. The implementation of the testutil function will involve spinning up a Tendermint node with a genesis state that celestia-app and the Tendermint node agree upon.

@rootulp rootulp added the testing items that are strictly related to adding or extending test coverage label Sep 22, 2022
evan-forbes added a commit that referenced this issue Oct 3, 2022
…stom state (#824)

This PR is based of the
[network](https://github.com/cosmos/cosmos-sdk/tree/main/testutil/network)
tests in the cosmos-sdk. Those tests are focused on running multiple
nodes, while this test only runs a single node validator. This node also
has the full access to change the consensus parameters and the full
tendermint config. This is needed to to have block times shorter than 1
second. There is also discussion to modify the sdk code to only be a
mock, where we need to run a full in process node to include any changes
to tendermint and to not have to apply those same changes to the new
upcoming mock node in the sdk.

While this does have extra features and a built in API, it does have a
lot of duplicate features to our own wrapper around the linked above
network tests. Eventually we should replace the usage of that code in
the integrations tests with this code.

closes #770

Co-authored-by: Rootul P <rootulp@gmail.com>
rach-id pushed a commit to rach-id/celestia-app that referenced this issue Nov 16, 2022
…stom state (celestiaorg#824)

This PR is based of the
[network](https://github.com/cosmos/cosmos-sdk/tree/main/testutil/network)
tests in the cosmos-sdk. Those tests are focused on running multiple
nodes, while this test only runs a single node validator. This node also
has the full access to change the consensus parameters and the full
tendermint config. This is needed to to have block times shorter than 1
second. There is also discussion to modify the sdk code to only be a
mock, where we need to run a full in process node to include any changes
to tendermint and to not have to apply those same changes to the new
upcoming mock node in the sdk.

While this does have extra features and a built in API, it does have a
lot of duplicate features to our own wrapper around the linked above
network tests. Eventually we should replace the usage of that code in
the integrations tests with this code.

closes celestiaorg#770

Co-authored-by: Rootul P <rootulp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing items that are strictly related to adding or extending test coverage
Projects
None yet
2 participants