-
Notifications
You must be signed in to change notification settings - Fork 701
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
Move context lock into network.issueTx
#2525
Conversation
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.
just a question around locking in test. Other than that lgtm
8f51db4
to
0268321
Compare
8db7029
to
ab299db
Compare
578fc8e
to
be0321c
Compare
return fmt.Errorf("couldn't format address: %w", err) | ||
} | ||
|
||
return s.vm.issueTx(req.Context(), tx) |
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 was slightly concerned providing req.Context()
here in the X-chain because these contexts can be cancelled by the client invoking this API... We also document that if AppSender
returns an error it should be treated as FATAL... However for the rpcchainvm the gRPC server may return an error if the provided context is cancelled... We never expect the platformvm to run in to this situation... but wanted to note this so that we could talk about it
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.
We also document that if AppSender returns an error it should be treated as FATAL
I remember this being an invariant but I never understood why. Why can't a sender just log the error and move on? If we're letting the request context be cancelled by the client which is a legitimate use-case I feel like we shouldn't be expected to fatal.
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.
The comment was a prior invariant before we passed the context over the gRPC. Feel free to make a PR to remove that comment
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
26a49ec
to
8f49622
Compare
Why this should be merged
P-chain counterpart to #2524
How this works
Moves the context lock grab into
issueTx
to be held while verification is being doneHow this was tested
UTs