Skip to content
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

Merged
merged 69 commits into from
Dec 19, 2024

Conversation

KlausKidman
Copy link
Collaborator

No description provided.

KlausKidman and others added 30 commits October 23, 2024 13:20
… add common method for getting sigma and range proofs with new balance as in the docs
@lukachi lukachi requested a review from dovgopoly December 9, 2024 13:19
): Promise<InputGenerateTransactionPayloadData> {
const veiledNormalization = await VeiledNormalization.create({
decryptionKey: args.decryptionKey,
unnormilizedEncryptedBalance: args.unnormilizedEncryptedBalance,
Copy link
Collaborator

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
Copy link
Collaborator

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;
Copy link
Collaborator

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?

* Address of the module for minting mocked fungible tokens on the testnet
*/
const MODULE_ADDRESS = "0xcbd21318a3fe6eb6c01f3c371d9aca238a6cd7201d3fc75627767b11b87dcbf5";
// TODO: decimals?
Copy link
Collaborator

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?

Copy link

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`;
Copy link
Collaborator

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?

Copy link
Collaborator

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"?

Copy link

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

Copy link
Collaborator

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?

@mstraka100
Copy link
Collaborator

Looks good - some minor comments and questions

@lukachi lukachi merged commit a1e53cd into feature/veild-balances Dec 19, 2024
0 of 5 checks passed
@lukachi lukachi deleted the feature/chunked-veiled-balance branch December 19, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants