WIP - Hierarchical Deterministic Note #48
Open
yoyoismee wants to merge 1 commit intotornadocash:masterfrom
Open
WIP - Hierarchical Deterministic Note #48yoyoismee wants to merge 1 commit intotornadocash:masterfrom
yoyoismee wants to merge 1 commit intotornadocash:masterfrom
Conversation
Contributor
Author
|
@yoyoismee This is somewhat great feature for Tornado.Cash and it is actually better approach to manage multiple deposits than the on-chain backup feature as well! Will be including this PR as well after some refactoring of cli. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is a WIP PR.
just wanna get some feedback before I spend more time on it.
motivation
to move a large sum through Torn would require multiple notes which might become messy.
(never experience that problem myself tho since I'm not that rich)
proposed ideas
the idea is to use a BIP39 style HD wallet to deterministically create multiple notes.
together with another function to deterministically create a deposit sequence.
we can use 1 note to control any amount of funds.
implementation
genCompactNote(currency, amount, netId)
create a note that contains currency, amount, netId and newly generated mnemonic.
note that unlike normal notes amount can be any number. e.g. 420 ETH is ok
createMultipleDeposit(mnemonic, amount )
deterministically generate deposits (the object with commitment, and others info) start from idx 0.
create deposit by using idx2 as secret and idx2 +1 as nullifier
recoverDepositFromMnemonic(mnemonic, idx)
create deposit based on mnemonic, idx.
taskSplit (amount, options )
greedy based task splitting.
e.g. 420.69 via ETH torn -> 4 * 100 + 2 * 10 + 6* 0.1
next step
if Torn commu/dev think we should go ahead with this feature.
the next step would be to complete the feature by implement