-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
integration-tests/smoke: add manual exec test #15242
Conversation
Manually execute the message that failed to execute due to low callback gas. This is the first manual exec scenario, others will be covered in future PRs.
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
}) | ||
} | ||
|
||
func sleepAndReplay(t *testing.T, e ccipdeployment.DeployedEnv, sourceChain, destChain uint64) { | ||
func manuallyExecute( |
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.
is it possible to extract the manual execute logic as a generic function which can be moved to deployment package ?
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.
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.
Yeah, I want to make this more generic, but there are a few challenges:
- Similar to the exec plugin, you need to get the commit report corresponding to a particular message, and then fetch all the messages that made up that root
- Once you fetch all the messages, you need to hash them all and construct the tree leaves
- Once you get all the tree leaves, you can use
merklemulti.NewTree
to construct the tree and the proof
This function is overfit to the one message per root case which is why its surprisingly straightforward. The more general case would be more complex. Step (1) in particular is quite bad because the CommitReportAccepted
log has nothing that we can use to narrow down the log query, so you have to fetch all the logs and do an in-memory filter (with the absence of something more structured like Atlas databases).
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.
I think I'll do this in a follow-up where I'd want to test manual exec for a multi-message root. Will add a comment here to that effect.
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.
One related thing that I think we should be doing is that our log queries shouldn't just be passing in nil
for the FilterOpts
(I am doing this right now but it's wrong) and we also shouldn't be replaying from block 1. This makes these tests not really runnable on testnets. I think we'd have to do a sweep on all of these and make sure we catch all the stragglers.
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.
LGTM
seqNr uint64, | ||
msgID [32]byte, | ||
) (messageHash [32]byte) { | ||
iter, err := offRamp.FilterExecutionStateChanged(nil, |
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.
nil
? Shouldn't we pass the test context here?
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.
Yeah this is super ugly, lemme see what I can do. Also the block ranges are not specified meaning it'll search from genesis. Its OK for these simchains but it won't work on the real testnets
* integration-tests/smoke: add manual exec test Manually execute the message that failed to execute due to low callback gas. This is the first manual exec scenario, others will be covered in future PRs. * fix lint * updates after PR feedback * use ctx, fill out filteropts
Manually execute the message that failed to execute due to low callback gas. This is the first manual exec scenario, others will be covered in future PRs.