Mint::reissue() now returns a ReissueShare instead of a tuple
adds DbcBuilder to aggregate ReissueShare, validate, combine signatures, and gen output DBCs
AmountSecrets::to_bytes() takes self instead of &self. recommended by clippy.
updates tests, mint-repl, and reissue bench to use DbcBuilder and/or ReissueShare
Discussion for a possible followup PR:
One observation I made while implementing this is that we return PublicKeySet for every output DBC in every reissue(). Yet to combine signatures one must use a single PublicKeySet. This means the client should/must verify that all returned PublicKeySet are the same which is a bit convoluted with this structure. It would be a bit simpler to just return a single PublicKeySet from Mint::reissue() in the ReissueShare and omit it from MintNodeSignatures, which then becomes BTreeMap<DbcContentHash, NodeSignature> instead of BTreeMap<DbcContentHash, (PublicKeySet, NodeSignature)>.
Is there ever a situation where we would actually want distinct PublicKeySet per output Dbc per MintNode? If so, DbcBuilder::build() would fail miserably when it encounters that...
Changes:
Discussion for a possible followup PR:
One observation I made while implementing this is that we return PublicKeySet for every output DBC in every reissue(). Yet to combine signatures one must use a single PublicKeySet. This means the client should/must verify that all returned PublicKeySet are the same which is a bit convoluted with this structure. It would be a bit simpler to just return a single PublicKeySet from Mint::reissue() in the ReissueShare and omit it from MintNodeSignatures, which then becomes BTreeMap<DbcContentHash, NodeSignature> instead of BTreeMap<DbcContentHash, (PublicKeySet, NodeSignature)>.
Is there ever a situation where we would actually want distinct PublicKeySet per output Dbc per MintNode? If so, DbcBuilder::build() would fail miserably when it encounters that...