@@ -398,13 +398,11 @@ func (i *Proof) VerifyRoot(expectedRoot mssmt.Node) bool {
398398 mssmt .IsEqualNode (reconstructedRoot , expectedRoot )
399399}
400400
401- // BaseBackend is the backend storage interface for a base universe. The
402- // backend can be used to store issuance profs, retrieve them, and also fetch
403- // the set of keys and leaves stored within the universe.
404- //
405- // TODO(roasbeef): gRPC service to match this, think about the REST mapping
406- type BaseBackend interface {
407- // RootNode returns the root node for a given base universe.
401+ // StorageBackend defines the storage interface for a universe. It supports
402+ // storing and retrieving proofs, as well as fetching the set of keys and leaves
403+ // contained in the universe.
404+ type StorageBackend interface {
405+ // RootNode returns the root node for a given universe.
408406 RootNode (context.Context ) (mssmt.Node , string , error )
409407
410408 // UpsertProofLeaf inserts or updates a proof leaf within the universe
@@ -430,7 +428,7 @@ type BaseBackend interface {
430428 // FetchLeaves retrieves all leaves from the universe tree.
431429 FetchLeaves (ctx context.Context ) ([]Leaf , error )
432430
433- // DeleteUniverse deletes all leaves, and the root, for a given base
431+ // DeleteUniverse deletes all leaves, and the root, for a given
434432 // universe.
435433 DeleteUniverse (ctx context.Context ) (string , error )
436434}
@@ -477,10 +475,9 @@ type MultiverseLeaf struct {
477475 * mssmt.LeafNode
478476}
479477
480- // MultiverseArchive is an interface used to keep track of the set of universe
481- // roots that we know of. The BaseBackend interface is used to interact with a
482- // particular base universe, while this is used to obtain aggregate information
483- // about the universes.
478+ // MultiverseArchive is an interface for tracking the set of known universe
479+ // roots. While the StorageBackend interface operates on a single universe, this
480+ // interface provides aggregate access across multiple universes.
484481type MultiverseArchive interface {
485482 // RootNodes returns the complete set of known root nodes for the set
486483 // of assets tracked in the base Universe.
@@ -779,15 +776,15 @@ type CommittedIssuanceProof struct {
779776type ChainCommitter interface {
780777 // CommitUniverse takes a Universe and returns a new commitment to that
781778 // Universe in the main chain.
782- CommitUniverse (universe BaseBackend ) (* Commitment , error )
779+ CommitUniverse (universe StorageBackend ) (* Commitment , error )
783780}
784781
785782// Canonical is an interface that allows a caller to query for the latest
786783// canonical Universe information related to an asset.
787784//
788785// TODO(roasbeef): sync methods too, divide into read/write?
789786type Canonical interface {
790- BaseBackend
787+ StorageBackend
791788
792789 // Query returns a fully proved response for the target base key.
793790 Query (context.Context , LeafKey ) (* CommittedIssuanceProof , error )
0 commit comments