Skip to content

Commit 8bd8677

Browse files
committed
Document how to run the validator.
1 parent 5ee36dc commit 8bd8677

File tree

4 files changed

+165
-132
lines changed

4 files changed

+165
-132
lines changed

resources/debug_game_handler.clsp

+55-30
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,78 @@
1515
(import std.curry)
1616
(import std.map)
1717
(import std.shatree)
18+
(import std.condition_codes)
19+
20+
(defmac CURRIED ()
21+
(q . (@ CURRIED
22+
(MOD_HASH
23+
PUZZLE
24+
TIMEOUT
25+
AMOUNT
26+
MY_TURN
27+
SLASH_INFO
28+
MOVER_PUZZLE_HASH
29+
)
30+
)
31+
)
32+
)
33+
34+
(defun-inline curried_mod_hash ((CURRIED)) MOD_HASH)
35+
(defun-inline curried_puzzle ((CURRIED)) PUZZLE)
36+
(defun-inline curried_timeout ((CURRIED)) TIMEOUT)
37+
(defun-inline curried_amount ((CURRIED)) AMOUNT)
38+
(defun-inline curried_my_turn ((CURRIED)) MY_TURN)
39+
(defun-inline curried_slash_info ((CURRIED)) SLASH_INFO)
40+
(defun-inline curried_mover_puzzle_hash ((CURRIED)) MOVER_PUZZLE_HASH)
1841

19-
(defun-inline curried_mod_hash (CURRIED) (f CURRIED))
20-
(defun-inline curried_puzzle (CURRIED) (f (r CURRIED)))
21-
(defun-inline curried_amount (CURRIED) (f (r (r CURRIED))))
22-
(defun-inline curried_my_turn (CURRIED) (f (r (r (r CURRIED)))))
23-
(defun-inline curried_slash_info (CURRIED) (f (r (r (r (r CURRIED))))))
24-
(defun-inline curried_other_turn (CURRIED)
42+
(defun-inline curried_other_turn ((CURRIED))
2543
(list
26-
(curried_mod_hash CURRIED)
27-
(curried_puzzle CURRIED)
28-
(curried_amount CURRIED)
29-
(not (curried_my_turn CURRIED))
30-
(curried_slash_info CURRIED)
31-
)
44+
MOD_HASH
45+
PUZZLE
46+
TIMEOUT
47+
AMOUNT
48+
(not MY_TURN)
49+
SLASH_INFO
50+
MOVER_PUZZLE_HASH
51+
)
3252
)
3353

34-
(defun get-validation-move
35-
(MOVER_PUZZLE_HASH
36-
WAITER_PUZZLE_HASH
37-
TIMEOUT
38-
AMOUNT
39-
MOD_HASH
40-
NONCE
41-
MOVE
42-
MAX_MOVE_SIZE
43-
VALIDATION_INFO_HASH
44-
MOVER_SHARE
45-
PREVIOUS_VALIDATION_INFO_HASH
54+
(defmac move-validation-info ()
55+
(q . (@ move-validation-info
56+
(new_move
57+
new_validation_info_hash
58+
new_mover_share
59+
new_max_move_size
60+
mover_puzzle
61+
solution)
62+
)
4663
)
47-
MOVE
64+
)
65+
66+
(defun get-validation-move ((move-validation-info)) new_move)
67+
(defun get-validation-mover-puzzle ((move-validation-info)) mover_puzzle)
68+
(defun get-validation-solution ((move-validation-info)) solution)
69+
(defun get-validation-game-move ((move-validation-info))
70+
(list new_move new_validation_info_hash new_mover_share new_max_move_size)
4871
)
4972

5073
(defun get-move-share (new-move)
5174
(ash new-move -1)
5275
)
5376

54-
(defun validation_program (CURRIED validation-data)
77+
(defun validation_program ((CURRIED) . validation-data)
5578
(assign
79+
5680
cheated (logand (get-validation-move validation-data) 1)
81+
5782
(if cheated
5883
(x "validation program cheating" validation-data)
5984
()
6085
)
6186
)
6287
)
6388

64-
(defun do_my_turn (CURRIED readable_new_move amount state entropy)
89+
(defun do_my_turn ((CURRIED) readable_new_move amount state entropy)
6590
(assign
6691

6792
;; Readable move is a clvm structure that describes the move
@@ -88,7 +113,7 @@
88113

89114
(list
90115
new_state
91-
validation_program
116+
(curry validation_program CURRIED)
92117
new_validation_program_hash
93118
(c set_share set_cheated)
94119
100
@@ -99,7 +124,7 @@
99124
)
100125
)
101126

102-
(defun do_their_turn (CURRIED amount last_state new_move new_validation_info_hash new_max_move_size new_mover_share)
127+
(defun do_their_turn ((CURRIED) amount last_state new_move new_validation_info_hash new_max_move_size new_mover_share)
103128
(assign
104129
set_cheated (logand new_move 1)
105130
other_turn (curried_other_turn CURRIED)
@@ -117,7 +142,7 @@
117142
)
118143

119144
(export
120-
(CURRIED . args)
145+
((CURRIED) . args)
121146
(if
122147
;; Validation personality
123148
(if (not (l (f args))) (= 1337 (f args)) ())

resources/debug_game_handler.hex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ff02ffff01ff02ffff03ffff02ffff03ffff07ff0b80ffff01ff0180ffff01ff09ffff01820539ff0b8080ff0180ffff01ff02ff3effff04ff02ffff04ff05ff0f808080ffff01ff02ffff03ff5dffff01ff02ff10ffff04ff02ffff04ff05ff07808080ffff01ff02ff14ffff04ff02ffff04ff05ff0780808080ff018080ff0180ffff04ffff01ffffffff02ff28ffff04ff02ffff04ff03ffff04ff0bffff04ff0bffff04ffff02ff2effff04ff02ffff04ff2fff80808080ffff04ffff04ff09ffff04ff15ffff04ff2dffff04ffff20ff5d80ffff04ff8200bdff808080808080ff8080808080808080ffff02ff38ffff04ff02ffff04ff03ffff04ffff02ff26ffff04ff02ffff04ff82009fffff04ffff02ff2effff04ff02ffff04ff5fff80808080ff8080808080ffff04ffff19ffff18ffff0101ff1b80ffff16ff13ffff01018080ff808080808080ff04ff17ffff04ffff04ffff0102ffff04ffff04ffff0101ff3e80ffff04ffff04ffff0104ffff04ffff04ffff0101ff0280ffff04ffff0101ff80808080ff80808080ffff04ffff0bff0bffff02ff2effff04ff02ffff04ff17ff8080808080ffff04ffff04ff25ff3580ffff04ffff0164ffff04ff25ffff04ffff02ff3affff04ff02ffff04ff51ffff04ff8200bdff8080808080ffff04ff80ff808080808080808080ffff02ffff03ffff18ff2fffff010180ffff01ff04ffff0102ff8200bd80ffff01ff04ff80ffff04ffff04ffff18ff2fffff010180ffff02ff2cffff04ff02ffff04ff2fff8080808080ffff04ffff02ff3affff04ff02ffff04ff15ffff04ffff04ff09ffff04ff15ffff04ff2dffff04ffff20ff5d80ffff04ff8200bdff808080808080ff8080808080ffff04ffff018c6d6573736167652064617461ff808080808080ff0180ffff16ff05ffff0181ff8082017fffffff02ffff03ff05ffff01ff04ffff0104ffff04ffff04ffff0101ff0980ffff04ffff02ff12ffff04ff02ffff04ff0dff80808080ff80808080ffff01ff010180ff0180ffff02ffff03ff05ffff01ff0bffff06ffff06ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ffff02ff36ffff04ff02ffff04ff09ffff04ffff02ff2affff04ff02ffff04ff0dff80808080ff808080808080ffff01ff06ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c5808080ff0180ff04ffff0102ffff04ffff04ffff0101ff0580ffff04ffff02ff12ffff04ff02ffff04ff07ff80808080ff80808080ffffff0bffff05ffff06ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ffff02ff36ffff04ff02ffff04ff05ffff04ffff02ff2affff04ff02ffff04ff07ff80808080ff808080808080ff0bffff0102ffff0bffff0102ffff06ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ff0580ffff0bffff0102ff0bffff05ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c580808080ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff2effff04ff02ffff04ff09ff80808080ffff02ff2effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff02ffff03ffff18ffff02ff3cffff04ff02ffff04ff0bff80808080ffff010180ffff01ff08ffff019b76616c69646174696f6e2070726f6772616d206368656174696e67ff0b80ffff01ff018080ff0180ff018080
1+
ff02ffff01ff02ffff03ffff02ffff03ffff07ff0b80ffff01ff0180ffff01ff09ffff01820539ff0b8080ff0180ffff01ff02ff3effff04ff02ffff04ff05ff0f808080ffff01ff02ffff03ff8200bdffff01ff02ff10ffff04ff02ffff04ff05ff07808080ffff01ff02ff14ffff04ff02ffff04ff05ff0780808080ff018080ff0180ffff04ffff01ffffffff02ff28ffff04ff02ffff04ff03ffff04ff0bffff04ff0bffff04ffff02ff2effff04ff02ffff04ff2fff80808080ffff04ffff04ff09ffff04ff15ffff04ff2dffff04ff5dffff04ffff20ff8200bd80ffff04ff82017dffff04ff8202fdff8080808080808080ff8080808080808080ffff02ff38ffff04ff02ffff04ff03ffff04ffff02ff26ffff04ff02ffff04ff82009fffff04ffff02ff2effff04ff02ffff04ff5fff80808080ff8080808080ffff04ffff19ffff18ffff0101ff1b80ffff16ff13ffff01018080ff808080808080ff04ff17ffff04ffff02ff3affff04ff02ffff04ffff04ffff0102ffff04ffff04ffff0101ff3e80ffff04ffff04ffff0104ffff04ffff04ffff0101ff0280ffff04ffff0101ff80808080ff80808080ffff04ff11ff8080808080ffff04ffff0bff0bffff02ff2effff04ff02ffff04ff17ff8080808080ffff04ffff04ff25ff3580ffff04ffff0164ffff04ff25ffff04ffff02ff3affff04ff02ffff04ff51ffff04ff8200bdff8080808080ffff04ff80ff808080808080808080ffff02ffff03ffff18ff2fffff010180ffff01ff04ffff0102ff82017d80ffff01ff04ff80ffff04ffff04ffff18ff2fffff010180ffff02ff2cffff04ff02ffff04ff2fff8080808080ffff04ffff02ff3affff04ff02ffff04ff15ffff04ffff04ff09ffff04ff15ffff04ff2dffff04ff5dffff04ffff20ff8200bd80ffff04ff82017dffff04ff8202fdff8080808080808080ff8080808080ffff04ffff018c6d6573736167652064617461ff808080808080ff0180ffff16ff05ffff0181ff8009ffffff02ffff03ff05ffff01ff04ffff0104ffff04ffff04ffff0101ff0980ffff04ffff02ff12ffff04ff02ffff04ff0dff80808080ff80808080ffff01ff010180ff0180ffff02ffff03ff05ffff01ff0bffff06ffff06ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ffff02ff36ffff04ff02ffff04ff09ffff04ffff02ff2affff04ff02ffff04ff0dff80808080ff808080808080ffff01ff06ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c5808080ff0180ff04ffff0102ffff04ffff04ffff0101ff0580ffff04ffff02ff12ffff04ff02ffff04ff07ff80808080ff80808080ffffff0bffff05ffff06ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ffff02ff36ffff04ff02ffff04ff05ffff04ffff02ff2affff04ff02ffff04ff07ff80808080ff808080808080ff0bffff0102ffff0bffff0102ffff06ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c58080ff0580ffff0bffff0102ff0bffff05ffff05ffff01ffffa04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459aa09dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2ffa102a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222a102a8d5dd63fba471ebcb1f3e8f7c1e1879b7152a6e7298a91ce119a63400ade7c580808080ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff2effff04ff02ffff04ff09ff80808080ffff02ff2effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff02ffff03ffff18ffff02ff3cffff04ff02ffff04ff07ff80808080ffff010180ffff01ff08ffff019b76616c69646174696f6e2070726f6772616d206368656174696e67ff0780ffff01ff018080ff0180ff018080

src/referee.rs

+73-77
Original file line numberDiff line numberDiff line change
@@ -182,25 +182,22 @@ fn curry_referee_puzzle_hash(
182182
/// Mover puzzle is a wallet puzzle for an ordinary value coin and the solution
183183
/// is next to it.
184184
///
185-
pub struct ValidatorMoveArgs<'a> {
186-
pub new_move: &'a [u8],
187-
pub new_validation_info_hash: Hash,
188-
pub new_mover_share: Amount,
189-
pub new_max_move_size: usize,
185+
pub struct ValidatorMoveArgs {
186+
pub game_move: GameMoveDetails,
190187
pub mover_puzzle: Program,
191188
pub solution: NodePtr
192189
}
193190

194-
impl<'a> ValidatorMoveArgs<'a> {
191+
impl ValidatorMoveArgs {
195192
pub fn to_nodeptr(
196193
&self,
197194
allocator: &mut AllocEncoder
198195
) -> Result<NodePtr, Error> {
199196
let args: &[NodePtr] = &[
200-
allocator.encode_atom(self.new_move).into_gen()?,
201-
self.new_validation_info_hash.to_clvm(allocator).into_gen()?,
202-
self.new_mover_share.to_clvm(allocator).into_gen()?,
203-
self.new_max_move_size.to_clvm(allocator).into_gen()?,
197+
allocator.encode_atom(&self.game_move.move_made).into_gen()?,
198+
self.game_move.validation_info_hash.to_clvm(allocator).into_gen()?,
199+
self.game_move.mover_share.to_clvm(allocator).into_gen()?,
200+
self.game_move.max_move_size.to_clvm(allocator).into_gen()?,
204201
self.mover_puzzle.to_clvm(allocator).into_gen()?,
205202
self.solution
206203
];
@@ -216,10 +213,12 @@ struct RefereeMakerGameState {
216213
pub state: NodePtr,
217214
pub validation_program: NodePtr,
218215
pub game_handler: GameHandler,
219-
pub previous_state: NodePtr,
216+
220217
// Details of the move that triggered this state change
221218
pub game_move: GameMoveDetails,
222219

220+
pub previous_state: NodePtr,
221+
223222
// Ensure we copy this when we update RefereeMaker::current_state
224223
pub previous_validation_program_hash: Hash,
225224
}
@@ -479,19 +478,15 @@ impl RefereeMaker {
479478
// Agg sig me on the solution of the referee_coin_puzzle.
480479
// When it invokes the validation program, it passes through args as the full
481480
// argument set.
482-
pub fn curry_referee_puzzle(
481+
fn curry_referee_puzzle(
483482
&self,
484483
allocator: &mut AllocEncoder,
485-
coin_string: &CoinString,
486484
curried_args: &RefereePuzzleArgs,
487485
// args from referee.clsp
488486
args: Option<NodePtr>,
489-
agg_sig_additional_data: &Hash,
490-
) -> Result<TransactionBundle, Error> {
491-
let public_key = private_to_public_key(&self.my_identity.private_key);
492-
let my_referee_puzzle = puzzle_for_pk(allocator, &public_key)?;
493-
let puzzle = CurriedProgram {
494-
program: my_referee_puzzle.clone(),
487+
) -> Result<Puzzle, Error> {
488+
Ok(Puzzle::from_nodeptr(CurriedProgram {
489+
program: self.my_identity.puzzle.clone(),
495490
args: clvm_curried_args!(
496491
curried_args.mover_puzzle_hash.clone(),
497492
curried_args.waiter_puzzle_hash.clone(),
@@ -507,22 +502,45 @@ impl RefereeMaker {
507502
),
508503
}
509504
.to_clvm(allocator)
510-
.into_gen()?;
511-
let solution = args.unwrap_or_else(|| allocator.allocator().null());
512-
let solution_hash = Node(solution).sha256tree(allocator);
513-
514-
let signature = sign_agg_sig_me(
515-
&self.my_identity.private_key,
516-
&solution_hash.bytes(),
517-
&coin_string.to_coin_id(),
518-
agg_sig_additional_data,
519-
);
505+
.into_gen()?))
506+
}
520507

521-
Ok(TransactionBundle {
522-
puzzle: Puzzle::from_nodeptr(puzzle),
523-
solution,
524-
signature,
525-
})
508+
pub fn curried_referee_puzzle_for_validator(
509+
&self,
510+
allocator: &mut AllocEncoder,
511+
args: Option<NodePtr>,
512+
) -> Result<Puzzle, Error> {
513+
let current_state = self.current_state();
514+
let my_turn =
515+
matches!(current_state.game_handler, GameHandler::MyTurnHandler(_));
516+
let mover_puzzle_hash = if my_turn {
517+
self.my_identity.puzzle_hash.clone()
518+
} else {
519+
self.their_referee_puzzle_hash.clone()
520+
};
521+
let waiter_puzzle_hash = if my_turn {
522+
self.their_referee_puzzle_hash.clone()
523+
} else {
524+
self.my_identity.puzzle_hash.clone()
525+
};
526+
527+
self.curry_referee_puzzle(
528+
allocator,
529+
&RefereePuzzleArgs {
530+
mover_puzzle_hash,
531+
waiter_puzzle_hash,
532+
timeout: self.timeout.clone(),
533+
amount: self.amount.clone(),
534+
referee_coin_puzzle_hash: self.referee_coin_puzzle_hash.clone(),
535+
nonce: self.nonce,
536+
537+
game_move: current_state.game_move.clone(),
538+
previous_validation_info_hash: current_state
539+
.previous_validation_program_hash
540+
.clone(),
541+
},
542+
args,
543+
)
526544
}
527545

528546
// Ensure this returns
@@ -571,37 +589,26 @@ impl RefereeMaker {
571589
// XXX do this differently based on args.is_none()
572590
// because that is a move transaction with no reward.
573591
let transaction_bundle = {
574-
let current_state = self.current_state();
575-
let mover_puzzle_hash = if my_turn {
576-
self.my_identity.puzzle_hash.clone()
577-
} else {
578-
self.their_referee_puzzle_hash.clone()
579-
};
580-
let waiter_puzzle_hash = if my_turn {
581-
self.their_referee_puzzle_hash.clone()
582-
} else {
583-
self.my_identity.puzzle_hash.clone()
584-
};
585-
586-
self.curry_referee_puzzle(
592+
let puzzle = self.curried_referee_puzzle_for_validator(
587593
allocator,
588-
coin_string,
589-
&RefereePuzzleArgs {
590-
mover_puzzle_hash,
591-
waiter_puzzle_hash,
592-
timeout: self.timeout.clone(),
593-
amount: self.amount.clone(),
594-
referee_coin_puzzle_hash: self.referee_coin_puzzle_hash.clone(),
595-
nonce: self.nonce,
594+
args
595+
)?;
596596

597-
game_move: current_state.game_move.clone(),
598-
previous_validation_info_hash: current_state
599-
.previous_validation_program_hash
600-
.clone(),
601-
},
602-
args,
597+
let solution = args.unwrap_or_else(|| allocator.allocator().null());
598+
let solution_hash = Node(solution).sha256tree(allocator);
599+
600+
let signature = sign_agg_sig_me(
601+
&self.my_identity.private_key,
602+
&solution_hash.bytes(),
603+
&coin_string.to_coin_id(),
603604
agg_sig_me_additional_data,
604-
)?
605+
);
606+
607+
TransactionBundle {
608+
puzzle,
609+
solution,
610+
signature,
611+
}
605612
};
606613

607614
let output_coin_string = CoinString::from_parts(
@@ -805,19 +812,11 @@ impl RefereeMaker {
805812
Ok(())
806813
}
807814

808-
pub fn curried_referee_coin_puzzle_hash(
809-
&mut self,
810-
allocator: &mut AllocEncoder,
811-
validator_move_args: &ValidatorMoveArgs,
812-
) -> Result<PuzzleHash, Error> {
813-
todo!();
814-
}
815-
816815
pub fn run_validator_for_their_move(
817816
&mut self,
818817
allocator: &mut AllocEncoder,
819818
validator_move_args: &ValidatorMoveArgs
820-
) -> Result<Option<SlashOutcome>, Error> {
819+
) -> Result<(), Error> {
821820
let validation_program = self.current_state().validation_program;
822821
let validator_move_converted = validator_move_args.to_nodeptr(allocator)?;
823822
let ran_validator =
@@ -828,8 +827,7 @@ impl RefereeMaker {
828827
validator_move_converted,
829828
0
830829
).into_gen()?.1;
831-
eprintln!("ran_validator {}", disassemble(allocator.allocator(), ran_validator, None));
832-
todo!();
830+
Ok(())
833831
}
834832

835833
pub fn their_turn_move_off_chain(
@@ -1058,10 +1056,8 @@ impl RefereeMaker {
10581056
};
10591057
let new_puzzle = self.curry_referee_puzzle(
10601058
allocator,
1061-
coin_string,
10621059
&ref_puzzle_args,
10631060
None,
1064-
agg_sig_me_additional_data,
10651061
)?;
10661062
let new_puzzle_hash =
10671063
curry_referee_puzzle_hash(allocator, &self.referee_coin_puzzle_hash, &ref_puzzle_args)?;
@@ -1144,7 +1140,7 @@ impl RefereeMaker {
11441140
self.make_slash_for_their_turn(
11451141
allocator,
11461142
coin_string,
1147-
&new_puzzle.puzzle,
1143+
&new_puzzle,
11481144
&new_puzzle_hash,
11491145
full_slash_solution,
11501146
slash_solution,
@@ -1175,7 +1171,7 @@ impl RefereeMaker {
11751171
TheirTurnResult::Slash(solution, sig) => self.make_slash_for_their_turn(
11761172
allocator,
11771173
coin_string,
1178-
&new_puzzle.puzzle,
1174+
&new_puzzle,
11791175
&new_puzzle_hash,
11801176
full_slash_solution,
11811177
solution,

0 commit comments

Comments
 (0)