-
Notifications
You must be signed in to change notification settings - Fork 732
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
Higher upper limit of GeneralKey
in XCMv3
#801
Comments
Could this be solved using hashing in some way? I don't fully understand the control flow but you could probably maintain some map from UTXO proof public-keys to blake32 hashes, either on-chain or off-chain (by whoever submits these extrinsics) |
@rphmeier sorry for lacking of context, here is the work flow (the UTXO is not very relevant here). Say a user of Acala want to privatize her So the steps would be like below:
You can see currently, the only bottleneck of this implementation is that we don't have a proper way to putting zkp payload into XCM. I don't think hashing is a very good solution here since this requires a off-band communication mechanism and the payload here is not in particular large. |
32 bytes is also not enough to hold the |
So, the annoying thing about this is that this will bloat the I haven't really got any good ideas to overcome this just yet, but I have to put this out here as a factor for consideration when it comes to introducing a |
It is simply impossible to limit the message size at compile time. How can you limit the size of |
You could perhaps introduce a new XCM instruction (and perhaps initially just a transaction) which allowed the possibility of defining a preimage within the execution context. You could then use the hash of the proof as an identifier and look it up in the backend. This would allow the proof to be communicated over XCM without the need to have an unbounded |
@KiChjang @gavofyork one work-around that we can think of is to slicing the proofs (192 bytes) to several 32 bytes chunks and encoded in XCM multi-location. It is a kind of hacky way of using XCM multi-location but this would not introduce storage bloat-up per se. |
Reposting what Gav said in a channel:
But in your case, you'd hash the concatenated proofs, rather than the concatenated pairs. |
Agreed that multi-location is not a very ideal place for putting ZKP for transactions. I guess the general gaol that we are trying to avoid out-of-band messaging here. This complicate the dApp implementations. Maybe the "right" way is to use transact directly. |
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.123 to 1.0.124. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.123...v1.0.124) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Hi guys,
Thank you for the great work on XCM infrastructure and the attention on this post.
At Manta we have a question regarding the
GeneralKey
junction of multi locations in XCM v3 PR https://github.com/paritytech/polkadot/blob/6810d06af95324b10a822e995c5f806caabf2e7a/xcm/src/v3/junction.rs#L231We would like use this junction to embed a zero knowledge proof, which is basically a public key of our ledger's private UTXOs. This seems to fit in the general use case of the junction.
More concretely we want to send this ZKP along with
ORML.xTokens
transfers and use it on our chain to dispatch an extrinsic that will directly privatize the transferred tokens into our MantaPay ledger. This will allow us to hide the complexity from front-ends so they can easily do the transfer and privatization in a single call, think of a "private checkbox" functionality. All of the required logic will be limited to our own chain and how we interpret incoming messages.However our problem is that the upper limit will only be 32 bytes, and our ZKP is 192 bytes.
Is it possible to bump this value or perhaps add another junction with higher capacity ?
There probably are other use cases that could take advantage of a larger
GeneralKey
for their own needs.For reference we also have an alternative approach for this kind of functionality here open-web3-stack/open-runtime-module-library#766. Feedback would be appreciated.
@KiChjang @gavofyork @shawntabrizi
The text was updated successfully, but these errors were encountered: