-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: join context with proxy #955
base: master
Are you sure you want to change the base?
Conversation
let proxy_contract = self | ||
.get_proxy_contract(context_id) | ||
.await | ||
.unwrap_or_else(|_| "".to_owned()); |
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.
if there's an error, we should handle 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.
Error is that it does not exists.
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.
if it doesn't exist, then there's a deeper issue, the config contract didn't record the context, and if that's the case, we shouldn't be here at all (context creation should've failed).
Perhaps we need to tweak near tx submission to await cross contract calls, so we can appropriately determine if the whole chain succeeded.
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.
It exists on owner side but it does not exists for invited peer
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.
It exists on owner side but it does not exists for invited peer
get_proxy_contract
calls the contract, and it would only return that error if the context doesn't exist on the config contract
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.
It exists on owner side but it does not exists for invited peer
interesting that there's an invitation payload to begin with, add_member
should've failed as well if the context doesn't exist.
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.
Invited peer joined context but catchup failed.
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.
what's the error?
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.
in description
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.
doesn't explain why ignoring the error is the solution
the propose
method wasn't found because it was calling the wrong contract, which this PR fixes
but this line, you said was because the context didn't exist, in which case, we shouldn't be ignoring the error but figuring out why that's the case.
but if the error no longer happens, then we don't need this line, and any errors that occur here should be handled.
Joining context throws