All public logs

Jump to navigation Jump to search

Combined display of all available logs of mojo_puzzler. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).

Logs
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)
  • 15:57, 17 November 2023 Gneale talk contribs created page Sha256tree (Created page with "===== Return to: CLVM ===== <big>sha256tree:</big> <pre> (a (q 2 6 (c 2 (c 5 ()))) (c (q 1 2 (i (l 5) (q 11 (q . 2) (a 6 (c 2 (c 9 ()))) (a 6 (c 2 (c 13 ()))) ) (q 11 (q . 1) 5)) 1) 1) ) ( (c 2 (c 5 (c 13 () ) ) ) )</pre>")
  • 15:57, 17 November 2023 Gneale talk contribs created page CLVM (Created page with "===== Return to: Chialisp ===== <big>Common Examples</big> * sha256tree * standard transaction")
  • 15:56, 17 November 2023 Gneale talk contribs created page Integer byte encoding peculiarity (Created page with "===== Return to: Chialisp ===== According to Matt Howard 20210816, there is a "peculiarity with how integers are encoded in bytes. It's signed integers. If you just return <code>run '(q . 0xd7)'</code> you get -41 because the most significant bit is set and that's telling the interpreter to read this as a negative number. If you add some leading zeroes <code>run '(q . 0x00d7)'</code>, it should pop out as you would expect". Returns 215. <h1>Orig...")
  • 15:56, 17 November 2023 Gneale talk contribs created page Recursion (Created page with "===== Return to: Chialisp ===== <big>Important excerpts from the documentaiton:</big> https://chialisp.com/docs/clvm/dive_into_clvm#programs-as-parameters : The core CLVM does not have an operator for creating user defined functions. It does, however, allow programs to be passed as parameters, which can be used for similar results. Here is a puzzle that executes the program contained in 2 (the first solution argument) with the solution (12). <code>brun '(...")
  • 15:55, 17 November 2023 Gneale talk contribs created page Cancel mojo technique (Created page with "===== Return to: Chialisp ===== The following chialisp code ensure that the introduced parent puzzlehash of the parent coin is correct first, before sending the rebate coin which is restricted to that one possible wallet address: (mod (pwd ppid pph pamt ph amt) (defconstant CREATE_COIN 51) (defconstant ASSERT_MY_PARENT_ID 71) (if (= pwd (q . cancel)) (list (list ASSERT_MY_PARENT_ID (sha256 (concat ppid pph pamt))) (list CREATE_CO...")
  • 15:55, 17 November 2023 Gneale talk contribs created page Even (Created page with "===== Return to: Chialisp ===== ===== Return to: Additional Functions ===== (mod (num) (defun remainder (x y) (r (divmod x y))) (defun even (num) (if (= (remainder num 2) 0) (q . even) (x))) (even num) ) ==Example Usage== brun '(a (q 2 4 (c 2 (c 5 ()))) (c (q (a (i (= (a 6 (c 2 (c 5 (q 2)))) ()) (q 1 . "even") (q 8)) 1) 6 (divmod 5 11)) 1))' '(10)' "even" brun '(a (q 2 4 (c 2 (c 5 ()))) (c (q (a (i (...")
  • 15:54, 17 November 2023 Gneale talk contribs created page Remainder (Created page with "===== Return to: Chialisp ===== ===== Return to: Additional Functions ===== (mod (x y) (defun remainder (x y) (r (divmod x y)) ) (remainder x y) ) ==Example Usage:== brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 3)' 1 brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 4)' 2")
  • 15:54, 17 November 2023 Gneale talk contribs created page Additional Functions (Created page with "===== Return to: Chialisp ===== * Remainder * Even")
  • 15:53, 17 November 2023 Gneale talk contribs created page Greatest Common Divisor (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== (mod (num1 num2) (defun remainder (x y) (r (divmod x y))) (defun gcd (num1 num2) (if (= num2 0) num1 (gcd num2 (remainder num1 num2)))) (gcd num1 num2) ) ==Example Usage== brun '(a (q 2 4 (c 2 (c 5 (c 11 ())))) (c (q (a (i (= 11 ()) (q . 5) (q 2 4 (c 2 (c 11 (c (a 6 (c 2 (c 5 (c 11 ())))) ()))))) 1) 6 (divmod 5 11)) 1))' '(99...")
  • 15:52, 17 November 2023 Gneale talk contribs created page Length (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== (mod (lst) (defun length (lst) (if (l lst) (+ 1 (length (r lst))) lst) ) (length lst) ) ==Usage Example 1:== brun '(a (q 2 2 (c 2 (c 5 ()))) (c (q 2 (i (l 5) (q 16 (q . 1) (a 2 (c 2 (c 13 ())))) (q . 5)) 1) 1))' '((10 20))' 2 ==Usage Example 2:== brun '(a (q 2 2 (c 2 (c 5 ()))) (c (q 2 (i (l 5) (q 16 (q . 1) (a 2 (c 2 (c 13...")
  • 15:52, 17 November 2023 Gneale talk contribs created page Iterate (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== ==Example 1== (mod (n) (defun iterate (n) (if (= n 0) n (list n (iterate (- n 1))) ) ) (iterate n) ) ==Example 1 usage:== brun '(a (q 2 2 (c 2 (c 5 ()))) (c (q 2 (i (= 5 ()) (q . 5) (q 4 5 (c (a 2 (c 2 (c (- 5 (q . 1)) ()))) ()))) 1) 1))' '(50)' (50 (49 (48 (47 (46 (45 (44 (43 (42 (41 (40 (39 (38 (37 (softfork (35 (all (any (not (31 (pubkey_for_exp (point_...")
  • 15:51, 17 November 2023 Gneale talk contribs created page Binary (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== <pre> (defun binary (n) (if (= n 1) (* n 2) (* 2 (binary (- n 1))))) </pre>")
  • 15:50, 17 November 2023 Gneale talk contribs created page Power (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== (defun power (X N) (if (= N 0) 1 (* X (power X (- N 1)))))")
  • 15:50, 17 November 2023 Gneale talk contribs created page Append (Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== <big>Appending lists in a solution:</big> (mod (list1 list2) (defun append (list1 list2) (if (l list1) (c (f list1) (append (r list1) list2)) list2) ) (append list1 list2) ) ==Example Usage:== brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 2 (i (l 5) (q 4 9 (a 2 (c 2 (c 13 (c 11 ()))))) (q . 11)) 1) 1))' '((99 33)(1 2 3))' Outputs: <pre>(99 33 1 2 3)</pre>")
  • 15:50, 17 November 2023 Gneale talk contribs created page Recursive Functions (Created page with "===== Return to: Chialisp ===== * Append * Power * Binary * Iterate * Length * Greatest Common Divisor")
  • 15:49, 17 November 2023 Gneale talk contribs created page Mempool Dump - Wallet Spend (Created page with "===== Return to: Chialisp ===== <pre>chia wallet send -a 0.000000000001 -t xch1tv0g7uc6jw0ypgy7hfvwe7627wurpmm459fashwnvx7jr0rh9xqqp8y98t</pre> Outputs: <pre>Transaction submitted to nodes: [('26aa4fcfe513852f37afa6cf9972458a78d16c18d6d43ce6cb95d26a037c8745', 1, None)] Do chia wallet get_transaction -f 4270401300 -tx 0xeb081681e3c7757f6687e59eab28f39c16e6e11a9ba7e79333f95d083e60baeb to get status</pre> <pre>cdv rpc mempool|grep '''eb081681e3c7757f6687e59e...")
  • 15:48, 17 November 2023 Gneale talk contribs created page RPC get block record by height (Created page with "===== Return to: Chialisp ===== <big>Example:</big> <pre> curl --insecure --cert ~/.chia/mainnet/config/ssl/full_node/private_full_node.crt --key ~/.chia/mainnet/config/ssl/full_node/private_full_node.key -d '{ "height": 1002908 }' -H "Content-Type:application/json" -X POST https://localhost:8555/get_block_record_by_height | python -m json.tool </pre> <pre> { "block_record": { "challenge_block_info_hash": "0xdb3909f6aebe8cad513597ffd4d28fd446b39...")
  • 15:47, 17 November 2023 Gneale talk contribs created page RPC get additions and removals (Created page with "===== Return to: Chialisp ===== <big>Example</big> <pre> curl --insecure --cert ~/.chia/mainnet/config/ssl/full_node/private_full_node.crt --key ~/.chia/mainnet/config/ssl/full_node/private_full_node.key -d '{ "header_hash": "0x2d2a429c130e39c66f5f5720730e6fbc7b0ad8f15e74370705a29e618ca83a01" }' -H "Content-Type:application/json" -X POST https://localhost:8555/get_additions_and_removals | python -m json.tool </pre> <pre> { "additions": [ {...")
  • 15:45, 17 November 2023 Gneale talk contribs created page Example puzzle reveal and solution (Created page with "===== Return to: Chialisp ===== <h1>Example 1</h1> This is spend using standard transaction from GUI: Puzzle reveal: <pre>(a (q 2 (q 2 (i 11 (q 2 (i (= 5 (point_add 11 (pubkey_for_exp (sha256 11 (a 6 (c 2 (c 23 ()))))))) (q 2 23 47) (q 8)) 1) (q 4 (c 4 (c 5 (c (a 6 (c 2 (c 23 ()))) ()))) (a 23 47))) 1) (c (q 50 2 (i (l 5) (q 11 (q . 2) (a 6 (c 2 (c 9 ()))) (a 6 (c 2 (c 13 ())))) (q 11 (q . 1) 5)) 1) 1)) (c (q . 0xb0ae2c321d9fe66b0cfc17a2772dabf692f2081632f...")
  • 15:44, 17 November 2023 Gneale talk contribs created page Cdv rpc blockspends (Created page with "===== Return to: Chialisp ===== <code>cdv rpc blockspends --coinid e256eaae0884064d54ebafbdf82d32ae876a0cb4881ac13fc496c61cc2c94d02 -h 998859</code> "coin": { "amount": 200, "parent_coin_info": "0xc7f245646ece920927bd21ce977a203fa5d1d7a5eb3f9c6ee8789a7af3f34bdb", "puzzle_hash": "0x8a3bf47feade69aefbad6e8219933c78f57ddb2c3d107de5403a0fc9848d813a" }, "puzzle_reveal": "0xff01ffff33ffa058bb585420abf3275685a71e2ea26637890881f...")
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)