-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: support RPC consistency mechanism #3741
base: ns/chore/fuel-core-0.42.0
Are you sure you want to change the base?
chore: support RPC consistency mechanism #3741
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the Provider
static instance isn't the same between the one available in the tests that's initialized in launchTestNode
and the one that's used in our runCommand
test utility; perhaps it has something to do with comandeer
. I verified this by assigning a static id = getRandomB256()
to the Provider
and logging it in the constructor. A different string gets logged after calling runCommand
.
The problem is that both of them live simultaneously across all tests in this file and what would happen is the first test would finish successfully, kill the node and clear the currentBlockHeight
cache of its static instance... but it wouldn't clear the other Provider
's currentBlockHeight
which would remain high (e.g. 15
). In the next test, runDeploy
would try to deploy to a new fuel-core
node initialized for that test, but that node would have a block height of 0
and it would stall as the required_fuel_block_height
isn't reached. Our custom awaiting mechanism isn't working here because we're running the node with --poa-instant true
so we're only creating blocks when submitting transactions - but we can't submit a transaction because the block height is too low.
In the end, I opted to rewrite the tests to not use the same 4000
port across all tests, which resolves us of the problem. We might only have flakiness in the very rare case that the OS assigns the same port to launchTestNode
in two tests in this file, which would reproduce the same problem. Because runCommand
is our test utility, it won't affect the users. For users who want to run all their launchTestNode
tests on the same port as was done in this test, this change will suffice.
Note
Merges into
fuel-core
to0.42.0
#3749Release notes
In this release, we:
required_fuel_block_height
to fix RPC consistency issuesSummary
Checklist