-
Notifications
You must be signed in to change notification settings - Fork 25
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
Murisi/namada integration #44
Conversation
…sier to use from Namada and decreases difference from librustzcash.
8b8e20c
to
6a7c0eb
Compare
What is the plan for |
8998017
to
3fee08a
Compare
Hi! Good points you bring up.
Indirectly, yes. The WASM modules depend on the
Removal of the |
…>. Txid now includes transparent addresses.
…nputs. Also allow builder to be used without spending key.
…ing Builder views stricter.
1ed99e8
to
cfea8c9
Compare
.map(|txin| TxIn { | ||
asset_type: txin.asset_type, | ||
address: txin.address, | ||
transparent_sig: f.map_script_sig(txin.transparent_sig), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This map_authorization
function is no longer required - I'll remove it.
Formerly it was used in order to achieve shielded transaction validation. To be precise calling signature_hash
on TransactionData
required that TransparentAuthorizingContext
be implemented for the authorization of its transparent bundle. Unfortunately since TransparentAuthorizingContext
was only implemented for Unauthorized
, I had ended up mapping authorized bundles to unauthorized bundles before calling signature_hash
. I no longer do this because the client now creates unauthorized bundles from asset type, address, and value triples by more direct means.
Made some changes to this MASP crate in order to facilitate integration with the Namada crate. More specifically, the changes are as follows:
js
feature from thegetrandom
dependency of themasp_proofs
crate as this disrupts the compilation ofwasm32-unknown-unknown
modules in the Namada crateBuilder
object serializable in order to use it to store/capture the auxiliary inputs that were used to construct aTransaction
. Having this may be useful for hardware wallets validating aTransaction
.Builder
interface in order to allow for the adding of convert descriptions to aTransaction
.TransparentAddress
to be a byte array (that can be used to store arbitrary hashes) because requiring asecp256k::PublicKey
was too constraining for the Namada crate which representsAddress
es withPublicKeyHash
es.TransparentAddress
es to the authorizedTxIn
s and include them in the TXID digest. This could be useful for enabling more stringent validation ofTx
sections in Namada or for combining shielded transactions with non-Transfer
s.secp256k
dependency as it would be redundant after the above changes.See the Namada crate using this branch here: anoma/namada#1280