taproot-assets icon indicating copy to clipboard operation
taproot-assets copied to clipboard

[feature]: RPC endpoint `SyncUniverse` checks target universe server permissions before attempting sync

Open ffranr opened this issue 1 year ago • 0 comments

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.

ffranr avatar Jan 09 '24 18:01 ffranr