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

Add support for data encoding with unit tests and update Solidity interfaces #1

Merged
merged 55 commits into from
Jan 27, 2025

Conversation

najienka
Copy link
Contributor

No description provided.

@najienka najienka requested a review from CluEleSsUK January 20, 2025 16:02
@najienka najienka changed the title Add support for data encoding with unit tests Add support for data encoding with unit tests and update Solidity interfaces Jan 20, 2025
@najienka najienka requested a review from azixus January 22, 2025 16:19
Copy link
Contributor

@azixus azixus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few details, but nothing blocking

```js
import { ethers, getBytes } from "ethers";
import { Blocklock, SolidityEncoder, encodeCiphertextToSolidity } from "blocklockjs";
import { MockBlocklockReceiver__factory } from "../types"; // Generated by Typechain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mockblocklock - sounds funny ;p

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking for consistency with our website and blogs, we might need to stop using the name blocklock and use timelock throughout in all our code bases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think this makes sense - the time vs chainheight differentiation for drand vs decrypt won’t matter for most users

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I've added to the list of items for the next release.

@@ -7,5 +7,5 @@ export default {
useESM: true,
}],
},
testTimeout: 50000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jesus that's a long test :p

Copy link
Contributor Author

@najienka najienka Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. The local ganache integration takes some time to start and stop. Worth revisiting and seeing if it can be switched to using Anvil programmatically.

out.setZ(z)
return out
}

public deserialiseFp2([x, y]: [bigint, bigint]): Fp2 {
const xx = new mcl.Fp()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as elsewhere, we should consider nuking mcl if possible

najienka and others added 12 commits January 24, 2025 18:40
Co-authored-by: Robin Müller <33422394+azixus@users.noreply.github.com>
Co-authored-by: Robin Müller <33422394+azixus@users.noreply.github.com>
Co-authored-by: PM <3749956+CluEleSsUK@users.noreply.github.com>
Co-authored-by: PM <3749956+CluEleSsUK@users.noreply.github.com>
Co-authored-by: PM <3749956+CluEleSsUK@users.noreply.github.com>
Co-authored-by: PM <3749956+CluEleSsUK@users.noreply.github.com>
@najienka najienka merged commit a1a820b into master Jan 27, 2025
1 check passed
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