Closed therealyingtong closed 5 years ago
We spoke at the last meeting about stopping committing json or other automatically generated code as its makes the repo frow really big and means we need to download.
defined zero account as account generated by “0x0000…” public key
That makes sense.
made zero account an actual account in the balance tree, occupying the zero index.
Sounds good. We need to make sure the operator cannot deposit coins to this leaf. Perhaps a good idea to make the public key "0x00000...0001" to prevent this.
zero account balance and nonce never increase
I like this defense in depth. Tho lets require that the nonce == 0 as this will mean that even if someone generates the private key their transactions will fail.
zero account token type is 0, which is the only time it’s legal for token_to and token_from to be different
We need to make sure that token type 0 is impossible to withdraw and does not map to a "real" token. This needs to happen in the "create_token" logic.
outdated, closing
i made some design decisions which i’d like some feedback on:
defined zero account as account generated by “0x0000…” public key
made zero account an actual account in the balance tree, occupying the zero index.
zero account balance and nonce never increase
zero account token type is 0, which is the only time it’s legal for token_to and token_from to be different
begins Withdraw.sol (https://github.com/therealyingtong/RollupNC/blob/master/contracts/Withdraw.sol), currently not functional and needs work in MiMC hashing and EdDSA verification