taproot-assets
taproot-assets copied to clipboard
[feature]: RPC endpoint `SyncUniverse` checks target universe server permissions before attempting sync
The SyncUniverse
RPC endpoint is designed for syncing a specified universe ID(s) with a target universe server. A significant issue arises because SyncUniverse
does not verify read permissions on the target server prior to syncing. This oversight leads to non-transparent errors for users lacking the necessary permissions.
Proposed Changes
To address this, the CheckFederationServer
function should be implemented to confirm connectivity with the target universe server before initiating the sync process. An example of this function's usage can be found in our repository:
https://github.com/lightninglabs/taproot-assets/blob/5a25a469e30ac43ccf77be94282bc9c8da2ab5d4/rpcserver.go#L4044-L4044
It may be necessary to expand the capabilities of CheckFederationServer
to include read permission checks, in addition to its current role in validating server connections.