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

CHIP-0011: BLS/SECP CLVM Operators and SOFTFORK Condition #46

Merged
merged 33 commits into from
Aug 25, 2023

Conversation

danieljperry
Copy link
Contributor

Opening PR for consideration of the BLS Additions CHIP.

Signed-off-by: danieljperry <d.perry@chia.net>
Signed-off-by: danieljperry <d.perry@chia.net>
hoffmang9
hoffmang9 previously approved these changes Dec 20, 2022
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

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

lgtm

freddiecoleman
freddiecoleman previously approved these changes Dec 20, 2022
Copy link
Contributor

@freddiecoleman freddiecoleman left a comment

Choose a reason for hiding this comment

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

lgtm

hoffmang9
hoffmang9 previously approved these changes Dec 20, 2022
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

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

lgtm. Shall I merge?

@danieljperry
Copy link
Contributor Author

No, let's keep it open while the CHIP is active. People can post their reviews as comments here.

@freddiecoleman freddiecoleman changed the title Bls additions CHIP-0011: Bls additions Dec 21, 2022
@danieljperry
Copy link
Contributor Author

This video explains the details of this CHIP, including why we would like to add these operators and the technical details of how it would work:
https://www.youtube.com/watch?v=c4tKmjJEJCI
Reviews welcome!

@danieljperry danieljperry dismissed stale reviews from hoffmang9 and freddiecoleman via 9de8b7d May 4, 2023 05:24
@danieljperry
Copy link
Contributor Author

This CHIP has been updated to include a tentative soft fork block height. It will be moved to Review after the operators are confirmed included.

@danieljperry
Copy link
Contributor Author

This CHIP is now in Review. Note that a few of the operators have been added, removed, and modified since the CHIP was created. Significant changes are unlikely going forward. Please take another look at the CHIP's contents and leave your reviews here.

@danieljperry danieljperry changed the title CHIP-0011: Bls additions CHIP-0011: BLS/SECP CLVM Operators and SOFTFORK Condition May 31, 2023
@danieljperry
Copy link
Contributor Author

The ability to verify secp256k1 and secp256r1 are now included with this CHIP. Please take a moment to review these additions and leave your thoughts here.

@danieljperry
Copy link
Contributor Author

danieljperry commented Jun 19, 2023

Two new operators have been added, along with associated test cases:

  • modpow: computes (base ^ exponent) % modulus, (Opcode: 60)
  • %: aka modulo, (Opcode: 61)

Please review these additions at your convenience.

@SlowestTimelord
Copy link

%: aka modulo, (Opcode: 60)
modpow: computes (base ^ exponent) % modulus, (Opcode: 61)

The CHIP seems to indicates % as 61 and modpow as 60

@danieljperry
Copy link
Contributor Author

Sorry about that. I transposed them in the comment, which I have now fixed. The CHIP itself is correct.

CHIPs/chip-0011.md Outdated Show resolved Hide resolved

#### %

Opcode: 61

Choose a reason for hiding this comment

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

Is this just meant to be a simpler (and cheaper) version of what divmod already handles?

Choose a reason for hiding this comment

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

Any restrictions on negative numbers with %?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this just meant to be a simpler (and cheaper) version of what divmod already handles?

Correct, this operator only gives the remainder, and the cost is slightly less than that of divmod.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any restrictions on negative numbers with %?

Negative numbers are allowed. I have added a clarifying note to the CHIP.

@danieljperry
Copy link
Contributor Author

This CHIP now includes the ability to add new CLVM conditions with cost. This functionality will become available after next year's hard fork. Currently, new conditions must have zero cost.
This CHIP also includes new AGG_SIG conditions, which only contain one or two of parent coin, puzzle hash, and amount in their signed messages (the current signature conditions contain all three). They will also include unique domain strings to prevent replay attacks.

Please review at your convenience.

@danieljperry
Copy link
Contributor Author

This CHIP is now in Last Call. If no further changes are required in the next two weeks (roughly), it will be moved to Final.

@danieljperry
Copy link
Contributor Author

The activation height for the fork described in this CHIP is now set to 4,474,000. Nothing else has been changed. This CHIP will remain in Last Call and the roughly two week window will be reset.

@danieljperry
Copy link
Contributor Author

We have to adjust the activation height for this CHIP once again, so I'm pulling it out of Last Call until we can determine a new height. Nothing else has changed with this CHIP.

@danieljperry
Copy link
Contributor Author

The soft fork activation height for this CHIP has been updated to 4,510,000 and the CHIP has been moved back into Last Call. If it does not need to be further modified for the next two weeks (roughly), then it will be moved to Final.

@danieljperry
Copy link
Contributor Author

This CHIP is now Final. No further changes are allowed.

@Rigidity Rigidity self-requested a review August 25, 2023 01:04
@danieljperry danieljperry merged commit 157d136 into main Aug 25, 2023
@danieljperry danieljperry deleted the bls_additions branch August 25, 2023 01:05
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.

5 participants