-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Migrate puzzles away from load_clvm
to import from chia_puzzles_py
#19055
base: main
Are you sure you want to change the base?
Conversation
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
93870a9
to
e3a5f58
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
chia/_tests/generator/test_rom.py
Outdated
@@ -1,5 +1,6 @@ | |||
from __future__ import annotations | |||
|
|||
from chia_puzzles_py.programs import CHIALISP_DESERIALISATION, ROM_BOOTSRAP_GENERATOR |
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?
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.
from chia_puzzles_py.programs import CHIALISP_DESERIALISATION, ROM_BOOTSRAP_GENERATOR | |
from chia_puzzles_py.programs import CHIALISP_DESERIALISATION, ROM_BOOTSTRAP_GENERATOR |
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.
annoyingly this typo is in chia-puzzles - will fix there and then here - good spot
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.
This is resolved now
@@ -0,0 +1,293 @@ | |||
from __future__ import annotations |
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'm curious, what motivated the refactor into this new file?
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.
There was a circular import somewhere if the puzzles stayed in the same place as the utils
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 take it all of these functions were moved verbatim, right?
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.
Correct
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 don't see any obvious problems beyond the one typo. Must have been a huge amount of work!
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.
it seems to me that STANDARD_BRICK_PUZZLE
(in vc_drivers.py
) as well as ACS_TRANSFER_PROGRAM
probably should be part of the chia_puzzles
wheel.
ACS_TRANSFER_PROGRAM
is currently defined in pure python lists, not even hex, which is a bit unusual.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
e5ffe1e
to
edac3a4
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
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.
poetry.lock should be restored (apart from the new chia-puzzles
dependency)
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
…TRANSFER_PROGRAM initialization
…r in test_pool_puzzles_lifecycle.py
0e93e9b
to
8b1df6c
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Purpose:
This PR migrates the deployed puzzles from living in this repository to being imported from https://github.com/Chia-Network/chia_puzzles/tree/main
The puzzle files are removed and uses of
load_clvm()
are replaced withProgram.from_bytes()
where appropriate.We also remove duplicate redefinitions of the same Program where possible, opting to import the Program from another location instead.
This PR also renames
VIRAL_BACKDOOR
toREVOCATION_LAYER
.This PR does not remove
load_clvm()
as it is still useful for chialisp used in tests and for quick prototyping of future chialisp puzzles.Going forward I believe also that
chia\wallet\singleton.py
andchia\wallet\puzzles\singleton_top_layer_v1_1.py
can be merged into a single file -but this PR is already large enough.