-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changed ZKP for working with chunked veiled balance #7
Changed ZKP for working with chunked veiled balance #7
Conversation
…n-builders-veiled-balance-operations
…rs-veiled-balance-operations
… add common method for getting sigma and range proofs with new balance as in the docs
Refactoring veiled coin feature
src/api/veiledCoin.ts
Outdated
): Promise<InputGenerateTransactionPayloadData> { | ||
const veiledNormalization = await VeiledNormalization.create({ | ||
decryptionKey: args.decryptionKey, | ||
unnormilizedEncryptedBalance: args.unnormilizedEncryptedBalance, |
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.
typo
RistrettoPoint.ZERO, | ||
) | ||
.multiply(alpha2LE); | ||
const pBlaOld = opts.unnormilizedEncryptedBalance |
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.
pBalOld?
TwistedElGamal.encryptWithPK(chunk, this.senderDecryptionKey.publicKey(), this.randomness[i]), | ||
); | ||
|
||
const i = 4; |
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.
Comment explaining what i and j represent?
tests/e2e/api/veiledCoin.test.ts
Outdated
* Address of the module for minting mocked fungible tokens on the testnet | ||
*/ | ||
const MODULE_ADDRESS = "0xcbd21318a3fe6eb6c01f3c371d9aca238a6cd7201d3fc75627767b11b87dcbf5"; | ||
// TODO: decimals? |
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 this TODO for?
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.
just renamed it. I was gonna add tests with token with 10^18 precision
export const addNewContentLineToFile = (filename: string, data: string) => { | ||
const filePath = path.resolve(rootDir, filename); | ||
|
||
const content = `\n#TESTNET_DK=${data}\n`; |
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 does TESTNET_DK mean here?
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.
I assume it means "testnet decryption key" but why is it hardcoded in a function called "addNewContentLineToFile"?
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.
I used it to test key rotation, and in order to not to forget or lose new dk, i write it to .env.development file, just for testing purposes
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.
Can you add a comment describing this?
Looks good - some minor comments and questions |
… typo for normalization
…-balance # Conflicts: # src/api/veiledCoin.ts # tests/unit/veiled/api/normalize.test.ts
BSGS & Bernstein Lange amount decryption algorithms
Fix range proof approach & normalization
No description provided.