near / docs

NEAR Protocol Documentation
https://docs.near.org
Apache License 2.0
142 stars 351 forks source link

🔹[EPIC] Improvements to Multichain Gas Relayer Docs for Mainnet Launch #1967

Open ravigautham opened 1 month ago

ravigautham commented 1 month ago

Is your feature request related to a problem? Please describe. We are working towards a Mainnet launch for the Multichain Gas Relayer in June (along with Chain Signatures), and there are some enhancements we can make to the documentation.

Describe the solution you'd like

On the Multichain Relayer Server page we should make the following changes:

On the Multichain Gas Station Contract page we should make the following changes:

Additional context Add any other context or screenshots about the feature request here.

### Tasks
- [ ] https://github.com/near/docs/issues/2012
- [x] Create improved technical system design diagram (Multichain relayer)
- [ ] https://github.com/near/docs/issues/2013
- [ ] https://github.com/near/docs/issues/2014
ravigautham commented 1 month ago

@encody Hey Jacob, I just drafted this issue to improve the MC Gas Relayer docs for the upcoming mainnet launch in June. Let me know what you think about these improvements.

cc @bucanero @gagdiez

encody commented 1 month ago

It is difficult to make recommendations about multiple paymaster accounts. Actually, if the relayer/transaction forwarder is fast enough, only one might be enough. Until we have actual performance/usage data, it is difficult to say.

For independent deployments of gas station contracts, generally, nonce synchronicity should be addressed using these three measures, in this order of preference:

  1. Users/clients of the smart contract submit signed payloads independently.
    • This is the least reliable option; it is not wise to leave this up to the users, but it is potentially the lowest-latency option. Therefore, while this should be the first option in order of precedence, it must not be the only option.
  2. The relayer service picks up signed payloads and submits them to the remote chain.
    • This relayer service provides the guarantee to the smart contract that signed payloads will make it to the remote chain and update the nonce.
  3. Using multiple paymaster accounts.
    • This is a stopgap measure that essentially only serves as a small buffer in case the relayer service falls behind, or some of the paymaster nonces (temporarily) get out-of-sync. Adding more paymasters will not eliminate nonce synchronicity issues if they exist; it will only reduce latency for users while the system is working and experiencing high traffic.
ravigautham commented 1 month ago

Thanks adding your thoughts @encody!

@thisisjoshford I think we can slot this issue for execution in the coming weeks.

charleslavon commented 1 week ago

@bucanero is there still work to be done here or can this be closed?

ravigautham commented 1 week ago

@charleslavon @bucanero There's actually some additional updates we want to make to these docs leading to launch at the end of July. I'll be following up next week with more info. So we can keep this open for now.

ravigautham commented 6 days ago

@thisisjoshford I'll be sharing a doc sometime next week. Also added Anthony to this issue, he'll be adding context

ravigautham commented 6 days ago

cc @anthony-near