docs: Add submit_participant_info details#1062
Conversation
| This command can’t be called unless the key was added to the account, otherwise the call will fail due to lack of funds associated with the key. | ||
| ### Automatic Submission by the MPC Node | ||
|
|
||
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. |
There was a problem hiding this comment.
I'm not sure how accurate it is that the node will check if the account key is linked to the near account of the operator.
I believe the node will try to submit the transaction regardless, but of course this transaction will be rejected if the key generated inside the node is not associated with any near account.
There was a problem hiding this comment.
correct. we talked about this, but didn't create the issue.
here is now #1069
There was a problem hiding this comment.
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. | |
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. | |
| Will be implemented in https://github.com/near/mpc/issues/1069 |
There was a problem hiding this comment.
Maybe just:
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. | |
| Once the MPC node is fully synced and the operator has has added the node’s account keys to the operator's NEAR account, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. |
?
There was a problem hiding this comment.
section will be re-writed as we discussed
|
|
||
| (TBD [#903](https://github.com/near/mpc/issues/903) – confirm exact cost) | ||
|
|
||
| ### Manual Submission by the Operator |
There was a problem hiding this comment.
Why do we want the node operator to submit attestations manually instead of the node? To get the attestation it already requires that the node is started which will automatically submit the attestation to the contract.
There was a problem hiding this comment.
this is a fallback mechanism. Only in case the nodes submission failed for some reason.
If #1069 is implemented we probably will never need it.
There was a problem hiding this comment.
I don't think we can assume that the node's submission of the attestation can faik.
If the node is incapable of submitting transactions, then probably no other transaction will succeed when it tries to join the network. The node's indexer must work for a key resharing to work, as the nodes use the contract for coordinating the key resharing, which it submits messages to with transactions.
There was a problem hiding this comment.
If we instead add a retry mechanism such that the node retries submitting the attestation submission transaction indefinitely until it succeeds as proposed in #1069 (comment)
Can we then remove the need for manual submissions?
There was a problem hiding this comment.
Given what I wrote above, I wonder if we need any documentation on the implementation detail of TEE attestation submissions in this external guide.
Node operators should only be concerned with fetching the public key from the node and use NEAR CLI to give delegate it as a permissioned access key.
There was a problem hiding this comment.
I'll update according to our discussion
kevindeforth
left a comment
There was a problem hiding this comment.
Nice, just a few nits / suggestions. Thank you!
| During the [transition phase](#transition-phase), this step is optional. If no attestation is submitted, the contract will use a mock attestation instead. | ||
|
|
||
| After the MPC node is fully synced, the node will check if the operator has added the node’s account keys to the operator's near contract. If so, the MPC node will send to the contract its attestation information via the submit\_participant\_info contract method. | ||
| The MPC node submits this information by default. If it does not, the operator can perform the action on its behalf by retrieving the required data from the node. |
There was a problem hiding this comment.
nit
| The MPC node submits this information by default. If it does not, the operator can perform the action on its behalf by retrieving the required data from the node. | |
| The MPC node submits this information by default. But the operator can also perform the action on its behalf by retrieving the required data from the node. |
As a reader, I am questioning why the doc tells me that the node does something, but ten also tells me that it might not do that thing. Just gives me the impression that we don't really know the behavior of our own node.
There was a problem hiding this comment.
I'll remove this section altogether.
operator will not need to do anything manually.
| This command can’t be called unless the key was added to the account, otherwise the call will fail due to lack of funds associated with the key. | ||
| ### Automatic Submission by the MPC Node | ||
|
|
||
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. |
There was a problem hiding this comment.
Maybe just:
| Once the MPC node is fully synced, it will check if the operator has added the node’s account keys to the operator's NEAR account. If so, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. | |
| Once the MPC node is fully synced and the operator has has added the node’s account keys to the operator's NEAR account, the MPC node will send its attestation information to the contract using the `submit_participant_info` method. |
?
Co-authored-by: kevindeforth <32777623+kevindeforth@users.noreply.github.com>
DSharifi
left a comment
There was a problem hiding this comment.
Thanks for the changes! @barakeinav1
Co-authored-by: Daniel Sharifi <40335219+DSharifi@users.noreply.github.com>
Co-authored-by: Daniel Sharifi <40335219+DSharifi@users.noreply.github.com>
fixes #904