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

chore: a simple e2e test with knuu #3795

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mojtaba-esk
Copy link
Member

@mojtaba-esk mojtaba-esk commented Oct 2, 2024

This PR proposes to have a simple e2e test for celestia-node with knuu.
The main purpose of this PR is to show how to use knuu for e2e tests.

The e2e tests are passing locally:

$ make test-e2e
--> Running end to end tests
go run ./test/e2e 
INFO[2024-11-14T14:17:28+01:00] No particular test specified. Running all tests. 
INFO[2024-11-14T14:17:28+01:00] make test-e2e <test_name> to run a specific test 
INFO[2024-11-14T14:17:28+01:00] Valid tests are: E2ESimple
                  
INFO[2024-11-14T14:17:28+01:00] === RUN E2ESimple                            
INFO[2024-11-14T14:17:28+01:00] Running test                                  app_version=v3.0.0-rc0 node_version=v0.17.2 test_name=E2ESimple validators_count=4
INFO[2024-11-14T14:17:53+01:00]log/logger.go:41 Current log level                             env_log_level=LOG_LEVEL log_level=info
INFO[2024-11-14T14:18:09+01:00] Knuu initialized                              scope=e2esimple-20241114-141728
INFO[2024-11-14T14:18:12+01:00] Creating testnet validators                  
INFO[2024-11-14T14:18:12+01:00] Creating txsim                               
{"level":"info","name":"txsim","image":"ghcr.io/celestiaorg/txsim:8e573bb","time":"2024-11-14T14:18:17+01:00","message":"setting image for tx client"}
{"level":"info","name":"txsim","image":"ghcr.io/celestiaorg/txsim:8e573bb","args":"--key-path /tmp/txsim --grpc-endpoint 10.43.218.249:9090 --poll-time 1s --seed 42 --blob 1 --blob-amounts 100 --blob-sizes 100-2000 --blob-share-version 0","time":"2024-11-14T14:18:17+01:00","message":"created tx client"}
INFO[2024-11-14T14:18:17+01:00] Setting up testnets                          
{"level":"info","name":"val0","directory":"/tmp/val0","time":"2024-11-14T14:18:17+01:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val1","directory":"/tmp/val1","time":"2024-11-14T14:18:17+01:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val2","directory":"/tmp/val2","time":"2024-11-14T14:18:17+01:00","message":"Creating validator's config and data directories"}
{"level":"info","name":"val3","directory":"/tmp/val3","time":"2024-11-14T14:18:17+01:00","message":"Creating validator's config and data directories"}
INFO[2024-11-14T14:18:17+01:00] Starting testnets                            
{"level":"info","time":"2024-11-14T14:18:18+01:00","message":"create endpoint proxies for genesis nodes"}
{"level":"info","name":"val0","version":"v3.0.0-rc0","time":"2024-11-14T14:18:36+01:00","message":"started and ports forwarded"}
{"level":"info","name":"val1","version":"v3.0.0-rc0","time":"2024-11-14T14:18:38+01:00","message":"started and ports forwarded"}
{"level":"info","name":"val2","version":"v3.0.0-rc0","time":"2024-11-14T14:18:38+01:00","message":"started and ports forwarded"}
{"level":"info","name":"val3","version":"v3.0.0-rc0","time":"2024-11-14T14:18:38+01:00","message":"started and ports forwarded"}
{"level":"info","time":"2024-11-14T14:18:38+01:00","message":"waiting for genesis nodes to sync"}
{"level":"info","name":"val0","time":"2024-11-14T14:18:38+01:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.13.66:80/val0-26657","time":"2024-11-14T14:18:38+01:00","message":"Creating HTTP client for node"}
{"level":"info","name":"val0","attempt":0,"time":"2024-11-14T14:18:38+01:00","message":"node is not synced yet, waiting..."}
{"level":"info","name":"val0","attempt":1,"time":"2024-11-14T14:18:38+01:00","message":"node is not synced yet, waiting..."}
{"level":"info","name":"val0","attempt":2,"time":"2024-11-14T14:18:39+01:00","message":"node is not synced yet, waiting..."}
{"level":"info","name":"val0","attempt":3,"time":"2024-11-14T14:18:41+01:00","message":"node is not synced yet, waiting..."}
{"level":"info","name":"val0","attempt":4,"time":"2024-11-14T14:18:44+01:00","message":"node is not synced yet, waiting..."}
{"level":"info","attempts":5,"name":"val0","time":"2024-11-14T14:18:48+01:00","message":"node has synced"}
{"level":"info","name":"val1","time":"2024-11-14T14:18:48+01:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.13.66:80/val1-26657","time":"2024-11-14T14:18:48+01:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val1","time":"2024-11-14T14:18:48+01:00","message":"node has synced"}
{"level":"info","name":"val2","time":"2024-11-14T14:18:48+01:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.13.66:80/val2-26657","time":"2024-11-14T14:18:48+01:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val2","time":"2024-11-14T14:18:49+01:00","message":"node has synced"}
{"level":"info","name":"val3","time":"2024-11-14T14:18:49+01:00","message":"waiting for node to sync"}
{"level":"debug","RPC Address":"http://151.115.13.66:80/val3-26657","time":"2024-11-14T14:18:49+01:00","message":"Creating HTTP client for node"}
{"level":"info","attempts":0,"name":"val3","time":"2024-11-14T14:18:49+01:00","message":"node has synced"}
{"level":"info","name":"txsim","time":"2024-11-14T14:18:49+01:00","message":"txsim started"}
INFO[2024-11-14T14:19:07+01:00] Waiting for at least 10 transactions         
INFO[2024-11-14T14:20:59+01:00] Found 10 transactions                        
INFO[2024-11-14T14:22:36+01:00] Waiting for prometheus metrics to be scraped from the DA nodes 
INFO[2024-11-14T14:22:46+01:00] node: bridge-0, metric value: 1.73159056675e+09 
INFO[2024-11-14T14:22:52+01:00] node: full-0, metric value: 1.731590572338e+09 
INFO[2024-11-14T14:22:57+01:00] node: light-0, metric value: 1.731590577869e+09 
INFO[2024-11-14T14:22:57+01:00] --- ✅ PASS: E2ESimple 

@github-actions github-actions bot added the external Issues created by non node team members label Oct 2, 2024
@mojtaba-esk mojtaba-esk added the e2e e2e testing related label Oct 2, 2024
@mojtaba-esk
Copy link
Member Author

mojtaba-esk commented Oct 2, 2024

currently the following error is thrown and the progress is blocked due to that:

$ make test-e2e 
--> Running end to end tests
go run ./test/e2e 
2024/10/02 18:16:03 proto: duplicate proto type registered: celestia.core.v1.da.DataAvailabilityHeader
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.proof.ShareProof
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.proof.RowProof
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.proof.NMTProof
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.proof.Proof
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.tx.TxStatusRequest
2024/10/02 18:16:04 proto: duplicate proto type registered: celestia.core.v1.tx.TxStatusResponse
panic: error with code 1 is already registered: "invalid signal version because signal version can not be less than the current version"

goroutine 1 [running]:
cosmossdk.io/errors.RegisterWithGRPCCode({0x314d082, 0x6}, 0x1, 0x2, {0x325ebed, 0x56})
	/home/moji/go/pkg/mod/cosmossdk.io/[email protected]/errors.go:43 +0x265
cosmossdk.io/errors.Register(...)
	/home/moji/go/pkg/mod/cosmossdk.io/[email protected]/errors.go:35
github.com/celestiaorg/celestia-app/v3/x/signal/types.init()
	/home/moji/go/pkg/mod/github.com/celestiaorg/celestia-app/[email protected]/x/signal/types/errors.go:8 +0x45
exit status 2
make: *** [Makefile:158: test-e2e] Error 1

update: This one is fixed and no longer an issue

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 852 lines in your changes missing coverage. Please review.

Project coverage is 43.74%. Comparing base (2469e7a) to head (60cae30).
Report is 385 commits behind head on main.

Files with missing lines Patch % Lines
test/e2e/simple.go 0.00% 151 Missing ⚠️
test/e2e/testnet/node.go 0.00% 145 Missing ⚠️
test/e2e/testnet/instance_options.go 0.00% 138 Missing ⚠️
test/e2e/testnet/status.go 0.00% 110 Missing ⚠️
test/e2e/prometheus/prometheus.go 0.00% 106 Missing ⚠️
test/e2e/testnet/testnet.go 0.00% 84 Missing ⚠️
test/e2e/testnet/helper.go 0.00% 55 Missing ⚠️
test/e2e/main.go 0.00% 39 Missing ⚠️
test/e2e/testnet/executor.go 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3795      +/-   ##
==========================================
- Coverage   44.83%   43.74%   -1.10%     
==========================================
  Files         265      317      +52     
  Lines       14620    22710    +8090     
==========================================
+ Hits         6555     9934    +3379     
- Misses       7313    11708    +4395     
- Partials      752     1068     +316     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mojtaba-esk mojtaba-esk force-pushed the mojtaba/simple-e2e-test-with-knuu branch from 5992d50 to 2134cd6 Compare October 8, 2024 08:01
@mojtaba-esk mojtaba-esk changed the base branch from main to feature_branch_app_v3 October 8, 2024 08:12
@mojtaba-esk
Copy link
Member Author

Update: by pointing to the feature_branch_app_v3 the issue of app version conflict is resolved.

@mojtaba-esk
Copy link
Member Author

Update: since we need to activate Minio and probably some other options for the node tests, we need to wait for this PR in the celestia-app repo to be reviewed.

test/e2e/testnet/defaults.go Outdated Show resolved Hide resolved
test/e2e/testnet/defaults.go Outdated Show resolved Hide resolved
test/e2e/testnet/defaults.go Outdated Show resolved Hide resolved
@mojtaba-esk mojtaba-esk changed the base branch from feature_branch_app_v3 to main November 14, 2024 15:04
@mojtaba-esk mojtaba-esk marked this pull request as ready for review November 14, 2024 15:05
@mojtaba-esk mojtaba-esk requested review from a team and tty47 November 14, 2024 15:05
@mojtaba-esk mojtaba-esk enabled auto-merge (squash) November 14, 2024 15:24
@mojtaba-esk mojtaba-esk force-pushed the mojtaba/simple-e2e-test-with-knuu branch from 1ae74cc to a2b3b2b Compare November 14, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e e2e testing related external Issues created by non node team members kind:chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants