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

Add TestSmokeRPCCompatibilities for RPC compatibility smoke test #298

Merged
merged 7 commits into from
Dec 17, 2024

Conversation

Kourin1996
Copy link

@Kourin1996 Kourin1996 commented Dec 13, 2024

Addresses https://github.com/celo-org/celo-blockchain-planning/issues/522

This PR adds smoke test for RPC compatibilities (Block, Transaction, Block Receipt, and Transaction Receipt).

Test retrieves these kinds of data at height 0, the last height of the L1 chain, and heights iterated every 1M blocks.

How to test

Make sure you have WebSocket RPC URLs of L1 and L2 full node.
Please note that TxLookUp must be enabled for all transactions in the nodes.

go test -v ./compat_test -tags compat_test -run TestSmokeRPCCompatibilities -celo-url ws://localhost:8546 -op-geth-url ws://localhost:9994

Optionally --block-interval and --random-block can be given:

# Test data at random heights every 10,000 block
go test -v ./compat_test -tags compat_test -run TestSmokeRPCCompatibilities -celo-url ws://localhost:8546 -op-geth-url ws://localhost:9994 --block-interval 10000 --random-block true
  • block-interval: Number of blocks to skip between each test iteration. For instance, if set to 1,000,000, the test will be executed every 1 million blocks.
  • random-block: Enables a random block height within a specified range to be selected for each test iteration

@Kourin1996 Kourin1996 self-assigned this Dec 13, 2024
@Kourin1996 Kourin1996 marked this pull request as ready for review December 16, 2024 09:40
@Kourin1996 Kourin1996 requested a review from piersy December 16, 2024 12:10
Copy link

@piersy piersy left a comment

Choose a reason for hiding this comment

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

One suggestion, apart from that it's looking good!

@Kourin1996 Kourin1996 changed the base branch from celo10 to celo11 December 17, 2024 13:47
@Kourin1996 Kourin1996 changed the base branch from celo11 to celo10 December 17, 2024 13:47
@Kourin1996 Kourin1996 force-pushed the Kourin1996/rpc-compatibility-smoke-test branch from b2a968c to abdc8ec Compare December 17, 2024 14:29
@Kourin1996 Kourin1996 changed the base branch from celo10 to celo11 December 17, 2024 14:30
@Kourin1996 Kourin1996 merged commit e81d62e into celo11 Dec 17, 2024
4 checks passed
@Kourin1996 Kourin1996 deleted the Kourin1996/rpc-compatibility-smoke-test branch December 17, 2024 14:50
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.

2 participants