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

Move mover_puzzle_hash and waiter_puzzle_hash to the front #74

Draft
wants to merge 17 commits into
base: active
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python ${{ matrix.python }}
- uses: actions/setup-python@v5
name: Install Python 3.9
with:
python-version: ${{ matrix.python }}
python-version: 3.9

- name: Update pip
run: |
python -m pip install --upgrade pip
- uses: chia-network/actions/create-venv@main
id: create-venv

- name: Set up rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -86,13 +85,24 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy

- uses: actions/setup-python@v5
name: Install Python 3.9
with:
python-version: 3.9

- uses: chia-network/actions/create-venv@main
id: create-venv

- name: cargo test
run: |
python -m pip install setuptools==75.0.0
python -m pip install chia-blockchain==2.3.0
# Try tests without sim-tests to ensure we're tracking build failures in that
# configuration. Also it's a lot shorter.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exec = "0.3.1"
[build-dependencies]
serde = "1.0.203"
toml = "0.8.14"
clvm_tools_rs = { git = "https://github.com/Chia-Network/clvm_tools_rs.git", rev = "f5f6ebd339b4782d9b3c65db8796af554d341bd8" }
clvm_tools_rs = { git = "https://github.com/Chia-Network/clvm_tools_rs.git", rev = "c3ecaa49cf16b56e3842f93b450ce8dce6bddb2d" }
clvmr = { version = "=0.12.0", features = ["pre-eval"] }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion clsp/calpoker_include_calpoker_factory.hex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clsp/calpoker_include_calpoker_factory_hash.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a0cd72bb00477a7cd8eb33f031a443e10ac163813bf4ebbb74e2bde7d288b23a51
a0732b10da9386e8851a4b10a5aebf7f07da4ed41886ef3a2b885bc70618c0bf39
2 changes: 1 addition & 1 deletion clsp/calpoker_include_calpoker_template.hex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clsp/calpoker_include_calpoker_template_hash.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a00d9ff33f217e4e0d4107e4cd19eddb84ec90153f80b46b583bb36100ae0e785b
a07587b44c8541581897abeadfe82371bd41ecc8e9b7968cb854e6bbae33a6b01e
5 changes: 2 additions & 3 deletions clsp/onchain/calpoker/a.clsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
; move is alice commit to a salted word
; evidence is empty
; ME below is the object whose hash is mod_hash
(export (mod_hash (move new_validation_hash mover_share previous_validation_hash
mover_puzzle_hash waiter_puzzle_hash amount timeout max_move_size referee_hash)
(export (mod_hash (mover_puzzle_hash waiter_puzzle_hash timeout amount previous_validation_hash nonce_unused move max_move_size new_validation_hash mover_share
referee_hash)
state me previous_validation_program mover_puzzle solution evidence)

(if_any_fail
Expand All @@ -22,4 +22,3 @@
(x)
)
)

2 changes: 1 addition & 1 deletion clsp/onchain/calpoker/a.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff02ffff03ffff02ffff03ffff09ff15ffff0bffff01a058adc514078f82ecf3819caa0309a59cc8815f47d3a64e096704599eec459d81ffff0bffff0101ff09808080ffff01ff02ffff01ff02ffff03ffff09ffff0dff0980ffff012080ffff01ff02ffff01ff09ff820bfdffff011080ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff01ff02ffff01ff0880ff0180ffff01ff02ffff01ff0180ff018080ff0180
ff02ffff03ffff02ffff03ffff09ff820bfdffff0bffff01a029b74c382f5bed24049b34749bd00a1f596ec70d5826dec9a750acdd8b6ee629ffff0bffff0101ff8202fd808080ffff01ff02ffff03ffff09ffff0dff8202fd80ffff012080ffff01ff09ff8205fdffff011080ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff0880ffff01ff018080ff0180
4 changes: 2 additions & 2 deletions clsp/onchain/calpoker/b.clsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
; state is alice's commit
; move is bob's seed
; evidence is empty
(export (mod_hash (move new_validation_hash mover_share previous_validation_hash
mover_puzzle_hash waiter_puzzle_hash amount timeout max_move_size referee_hash)
(export (mod_hash (mover_puzzle_hash waiter_puzzle_hash timeout amount previous_validation_hash nonce_unused move max_move_size new_validation_hash mover_share
referee_hash)
alice_commit me previous_validation_program mover_puzzle solution evidence)
(if_any_fail
(= new_validation_hash (sha256 chash (shatree (list alice_commit move))))
Expand Down
2 changes: 1 addition & 1 deletion clsp/onchain/calpoker/b.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff02ffff01ff02ffff03ffff02ffff03ffff09ff2bffff0bffff01a044cb615df45187c99eb1ace0903b97e85460bfd22f7852fb8ac95e486949e699ffff02ff02ffff04ff02ffff04ffff04ff17ffff04ff13ffff01808080ff808080808080ffff01ff02ffff01ff02ffff03ffff09ffff0dff1380ffff011080ffff01ff02ffff01ff09ff8217fbffff013080ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff01ff02ffff01ff0880ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff04ffff01ff02ffff03ffff07ff0580ffff01ff02ffff01ff0bffff0102ffff02ff02ffff04ff02ffff04ffff05ff0580ff80808080ffff02ff02ffff04ff02ffff04ffff06ff0580ff8080808080ff0180ffff01ff02ffff01ff0bffff0101ff0580ff018080ff0180ff018080
ff02ffff01ff02ffff03ffff02ffff03ffff09ff8217fbffff0bffff01a0414ada7d9cca862d4023441ab176024a48010942564964bb93f97ce0149159fbffff02ff02ffff04ff02ffff04ffff04ff17ffff04ff8205fbff808080ff808080808080ffff01ff02ffff03ffff09ffff0dff8205fb80ffff011080ffff01ff09ff820bfbffff013080ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff0880ffff01ff018080ff0180ffff04ffff01ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff02ffff04ff02ffff04ff09ff80808080ffff02ff02ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080
4 changes: 2 additions & 2 deletions clsp/onchain/calpoker/c.clsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
; state is alice's commit and bob's seed
; move is alice's reveal of her card generating seed and her commit to which cards she's picking
; evidence is empty
(export (@ all_args (mod_hash (move new_validation_hash mover_share previous_validation_hash
mover_puzzle_hash waiter_puzzle_hash amount timeout max_move_size referee_hash)
(export (@ all_args (mod_hash (mover_puzzle_hash waiter_puzzle_hash timeout amount previous_validation_hash nonce_unused move max_move_size new_validation_hash mover_share
referee_hash)
(alice_commit bob_seed) me previous_calidation_program mover_puzzle solution evidence))
(if_any_fail
(= (strlen move) 48)
Expand Down
2 changes: 1 addition & 1 deletion clsp/onchain/calpoker/c.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff02ffff01ff02ffff03ffff02ffff03ffff09ffff0dff1380ffff013080ffff01ff02ffff01ff02ffff03ffff09ffff0bffff0cff13ffff0180ffff01108080ff2780ffff01ff02ffff01ff02ffff03ffff09ff2bffff0bffff01a04952337315e54a0224523703762ea9da3d1c80b0bbb97486dc056f0efdb38612ffff02ff3effff04ff02ffff04ffff04ffff02ff3cffff04ff02ffff04ffff0bffff0cff13ffff0180ffff011080ff57ff8205fb80ff80808080ffff04ffff0cff13ffff0110ffff013080ffff01808080ff808080808080ffff01ff02ffff01ff09ff8217fbffff010180ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff01ff02ffff01ff0880ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff04ffff01ffffffff02ffff03ffff09ff0bffff010180ffff01ff02ffff01ff02ff28ffff04ff02ffff04ffff06ff0180ffff04ffff14ff17ff0580ff8080808080ff0180ffff01ff02ffff01ff02ff38ffff04ff02ffff04ffff06ff0180ffff04ffff17ff0bffff0181ff80ff8080808080ff018080ff0180ffff04ffff04ff1bff8080ffff04ff13ff808080ff02ff14ffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ff09ffff04ff0bffff04ff2dff808080808080ff8080808080ffff02ff2cffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff11ff11ff1580ffff04ffff11ff29ff1580ffff04ff2bff808080808080ff8080808080ffff04ffff02ff3affff04ff02ffff04ff25ffff04ff13ffff01ff808080808080ffff04ff2bff808080ff02ff12ffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff0134ffff04ffff0108ffff04ff05ff808080808080ff8080808080ffffff02ff2affff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff012cffff04ffff0108ffff04ff2bff808080808080ff8080808080ffff04ff25ffff04ffff02ff36ffff04ff02ffff04ff25ffff04ff13ffff01ff808080808080ff808080ff02ffff03ff0bffff01ff02ffff01ff02ff26ffff04ff02ffff04ffff06ff0180ffff04ffff10ffff05ff0b80ff1780ff8080808080ff0180ffff01ff02ffff0105ff018080ff0180ffffff02ffff03ff09ffff01ff02ffff01ff02ffff03ffff20ffff15ffff05ff0980ff0b8080ffff01ff02ffff01ff04ffff05ff0980ffff02ff3affff04ff02ffff04ffff06ff0980ffff04ff15ffff04ffff10ff2dffff010180ff80808080808080ff0180ffff01ff02ffff01ff04ff0bffff02ff3affff04ff02ffff04ff09ffff04ffff06ff1580ffff04ff2dff80808080808080ff018080ff0180ff0180ffff01ff02ffff01ff04ff0bffff02ff3affff04ff02ffff04ffff0180ffff04ffff06ff1580ffff04ff2dff80808080808080ff018080ff0180ff02ffff03ff0bffff01ff02ffff01ff02ff2effff04ff02ffff04ffff06ff0180ffff04ffff10ffff05ff0b80ff1780ff8080808080ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff02ffff03ff09ffff01ff02ffff01ff02ffff03ffff20ffff15ffff05ff0980ff0b8080ffff01ff02ffff01ff02ff36ffff04ff02ffff04ffff06ff0980ffff04ff15ffff04ffff10ff2dffff010180ff808080808080ff0180ffff01ff02ffff01ff04ff0bffff02ff36ffff04ff02ffff04ff09ffff04ffff06ff1580ffff04ff2dff80808080808080ff018080ff0180ff0180ffff01ff02ffff01ff04ff0bffff02ff36ffff04ff02ffff04ffff0180ffff04ffff06ff1580ffff04ff2dff80808080808080ff018080ff0180ff02ffff03ffff07ff0580ffff01ff02ffff01ff0bffff0102ffff02ff3effff04ff02ffff04ffff05ff0580ff80808080ffff02ff3effff04ff02ffff04ffff06ff0580ff8080808080ff0180ffff01ff02ffff01ff0bffff0101ff0580ff018080ff0180ff018080
ff02ffff01ff02ffff03ffff02ffff03ffff09ffff0dff8205fb80ffff013080ffff01ff02ffff03ffff09ffff0bffff0cff8205fbff80ffff01108080ff2780ffff01ff02ffff03ffff09ff8217fbffff0bffff01a06a64d316f5ccd862191797a2d1024e5ff0df431fc1e3a09a0599fd7ed885f00cffff02ff3effff04ff02ffff04ffff04ffff02ff3cffff04ff02ffff04ffff0bffff0cff8205fbff80ffff011080ff57ff8200bb80ff80808080ffff04ffff0cff8205fbffff0110ffff013080ff808080ff808080808080ffff01ff09ff820bfbffff010180ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff0880ffff01ff018080ff0180ffff04ffff01ffffffff02ffff03ffff09ff0bffff010180ffff01ff04ffff04ffff06ffff14ff17ff058080ff8080ffff04ffff05ffff14ff17ff058080ff808080ffff01ff02ff18ffff04ff02ffff04ff03ffff04ffff17ff0bffff0181ff80ff808080808080ff0180ff02ff14ffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ff09ffff04ff0bffff04ff2dff808080808080ff8080808080ffff02ff2cffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff11ff11ff1580ffff04ffff11ff29ff1580ffff04ff2bff808080808080ff8080808080ffff04ffff02ff16ffff04ff02ffff04ff25ffff04ff13ffff04ff80ff808080808080ffff04ff2bff808080ff02ff12ffff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff0134ffff04ffff0108ffff04ff05ff808080808080ff8080808080ffffff02ff1affff04ff02ffff04ff03ffff04ffff02ff10ffff04ff02ffff04ffff11ffff0134ffff010880ffff04ffff0108ffff04ff2bff808080808080ff8080808080ff04ff25ffff04ffff02ff2effff04ff02ffff04ff25ffff04ff13ffff04ff80ff808080808080ff808080ffff02ffff03ff0bffff01ff02ffff03ff05ffff01ff02ffff03ffff15ff09ffff10ff13ff178080ffff01ff04ffff10ff13ff1780ffff02ff16ffff04ff02ffff04ff05ffff04ff1bffff04ff17ff80808080808080ffff01ff04ff09ffff02ff16ffff04ff02ffff04ff0dffff04ff0bffff04ffff10ff17ffff010180ff8080808080808080ff0180ffff01ff04ffff10ff13ff1780ffff02ff16ffff04ff02ffff04ff80ffff04ff1bffff04ff17ff8080808080808080ff0180ffff010580ff0180ffff02ffff03ff0bffff01ff02ffff03ff05ffff01ff02ffff03ffff15ff09ffff10ff13ff178080ffff01ff04ffff10ff13ff1780ffff02ff2effff04ff02ffff04ff05ffff04ff1bffff04ff17ff80808080808080ffff01ff02ff2effff04ff02ffff04ff0dffff04ff0bffff04ffff10ff17ffff010180ff80808080808080ff0180ffff01ff04ffff10ff13ff1780ffff02ff2effff04ff02ffff04ff80ffff04ff1bffff04ff17ff8080808080808080ff0180ffff01ff018080ff0180ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff3effff04ff02ffff04ff09ff80808080ffff02ff3effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080
4 changes: 2 additions & 2 deletions clsp/onchain/calpoker/d.clsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
; state is the cards for both players and alice's card pick commitment
; move is Bob's picks
; evidence is empty
(export (mod_hash (bob_picks new_validation_hash mover_share previous_validation_hash
mover_puzzle_hash waiter_puzzle_hash amount timeout max_move_size referee_hash)
(export (mod_hash (mover_puzzle_hash waiter_puzzle_hash timeout amount previous_validation_hash nonce_unused bob_picks max_move_size new_validation_hash mover_share
referee_hash)
(cards alice_commit) me previous_validation_program mover_puzzle solution evidence)
(if_any_fail
(= (strlen bob_picks) 1)
Expand Down
2 changes: 1 addition & 1 deletion clsp/onchain/calpoker/d.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff02ffff01ff02ffff03ffff02ffff03ffff09ffff0dff1380ffff010180ffff01ff02ffff01ff02ffff03ffff09ffff02ff04ffff04ff02ffff04ff13ff80808080ffff010480ffff01ff02ffff01ff02ffff03ffff09ff2bffff0bffff01a0362cd1c497d0d1911458c4083eeb59791c847a172f6c4d1bc51f04e6283662bdffff02ff06ffff04ff02ffff04ffff04ff13ffff04ff27ffff04ff57ffff0180808080ff808080808080ffff01ff02ffff01ff09ff8217fbffff011280ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff01ff02ffff01ff0880ff0180ffff01ff02ffff01ff0180ff018080ff0180ffff04ffff01ffff02ffff03ff05ffff01ff02ffff01ff10ffff18ff05ffff010180ffff02ff04ffff04ff02ffff04ffff17ff05ffff0181ff80ff8080808080ff0180ffff01ff02ffff01ff0180ff018080ff0180ff02ffff03ffff07ff0580ffff01ff02ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ffff05ff0580ff80808080ffff02ff06ffff04ff02ffff04ffff06ff0580ff8080808080ff0180ffff01ff02ffff01ff0bffff0101ff0580ff018080ff0180ff018080
ff02ffff01ff02ffff03ffff02ffff03ffff09ffff0dff8205fb80ffff010180ffff01ff02ffff03ffff09ffff02ff04ffff04ff02ffff04ff8205fbff80808080ffff010480ffff01ff02ffff03ffff09ff8217fbffff0bffff01a04f7bfedfcb8518c59b7b99f47d184f045a438f4bb46376d84a9c3a03dcaf4a5cffff02ff06ffff04ff02ffff04ffff04ff8205fbffff04ff27ffff04ff57ff80808080ff808080808080ffff01ff09ff820bfbffff011280ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff018080ff0180ffff01ff0880ffff01ff018080ff0180ffff04ffff01ffff02ffff03ff05ffff01ff10ffff18ff05ffff010180ffff02ff04ffff04ff02ffff04ffff17ff05ffff0181ff80ff8080808080ffff01ff018080ff0180ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080
4 changes: 2 additions & 2 deletions clsp/onchain/calpoker/e.clsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
; state is (Bob's picks (alice_cards bob_cards) alice_commit)
; move is alice_salted_picks and alice's selections
; evidence is Bob's card selections
(export (mod_hash (move next_validation_hash bob_share previous_validation_hash
mover_puzzle_hash waiter_puzzle_hash amount timeout max_move_size referee_hash)
(export (mod_hash (mover_puzzle_hash waiter_puzzle_hash timeout amount previous_validation_hash nonce_unused move max_move_size next_validation_hash bob_share
referee_hash)
(bob_picks (alice_cards bob_cards) alice_commit) me previous_validation_program mover_puzzle solution bob_card_selections)
(if_any_fail
(= (strlen move) 18)
Expand Down
Loading
Loading