-
Notifications
You must be signed in to change notification settings - Fork 17
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
Not collect data for unconnected schains #1406
Comments
Need to retest by @sergiy-skalelabs |
Accroding to design of |
For now not so critical, because multicalls in IMA 2.0.0 will mostly resolve this issue. Moving back to backlog |
For IMA S2S transfers we collect data(endpoints, ports, etc) for all schains on the network. This operation take some time and we have huge amount of calls to mainnet.
Suggestion: To avoid overload validator geth ima and agent, collect data only from connected schain.(isConnected: true)
Instead of collect all data for all schains. You can get all schainHashes for the network then convert each schainHash to name and check is this chain connected and then collect data for current chain.
Steps:
SchainsInternal.getSchains()
will return all schainHashes for all schains in the networkschainName = SchainsInternal.getSchainName(schainHash)
will convert schainHash to schainNameMessageProxyForSchain.isConnectedChain(schainName)
will check is schain connected to current schainPseudocode:
Solidity Help:
With this code amount of calls would be
2 * N + 1
, whereN
is number of schains in the network, to get all schainHashes which connected to current schain.We can add a EnumerableSet of connected schainHashes to the MessageProxyForSchain and it would be necessary to call only one function, but it would require to finalize Upgrade procedure on Schains.
Or we can add events to connectSchain function and update collected data by checking events, but overall it requires upgrade procedure on Schains.
The text was updated successfully, but these errors were encountered: