User contributions for Gneale

Jump to navigation Jump to search
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View (newer 50 | ) (20 | 50 | 100 | 250 | 500)

20 February 2024

25 January 2024

21 January 2024

20 January 2024

27 December 2023

10 December 2023

25 November 2023

22 November 2023

21 November 2023

18 November 2023

  • 02:0802:08, 18 November 2023 diff hist +107 N Sha256tree RKissCreated page with "===== Return to: Insightful Comments ===== <gallery> Rkiss.PNG|Caption 3 </gallery>" current
  • 02:0802:08, 18 November 2023 diff hist +1,205 N Intercoin CommunicationCreated page with "===== Return to: Insightful Comments ===== Keybase 20211023: Q: Any wisdom on the differences/use-cases between CREATE_COIN_ANNOUNCEMENT and CREATE_PUZZLE_ANNOUNCEMENT? A (gneale): CREATE_COIN_ANNOUNCEMENT versus CREATE_PUZZLE_ANNOUNCEMENT is not that big of a difference code-wise, but usage-wise it is vast. Basically, the coinID dependency is much stricter, like one and done. The assertion coin is looking for that one announcement coin with t..." current
  • 02:0702:07, 18 November 2023 diff hist +485 N Simplest puzzles for testingCreated page with "===== Return to: Insightful Comments ===== <h2>Example 1</h2>keybase://chat/chia_network.public#chialisp/6836 Q: Is it the case that a coin locked with the puzzle '()' can be spent always? Or should it be '(1)'? A: The puzzle can actually just be `1` yes which just returns whatever you pass in the solution. We use it a lot for testing. <h2>Example 2</h2> <code>(mod () (q (51 0x656214f18f80a85a30f97cafa0fdfd29578d5e8030316b21e36552f9172c49d1 0x01..." current
  • 02:0702:07, 18 November 2023 diff hist +1,491 N Block CompositionCreated page with "===== Return to: Insightful Comments ===== <h2>Question: Is there a limit per bundle?</h2> 2021-09-01 "efishcent" said the following on Keybase channel chialisp: Answers from dev on your question: technically, a block is a single spend bundle (with a single aggregate signature). Right now our farmer limits the cost of included transactions to 0.5 of max (called limit_factor in the code). Presumably more to your question though, the mempool also..." current
  • 02:0602:06, 18 November 2023 diff hist +294 N Graftroot QuexingtonCreated page with "===== Return to: Insightful Comments ===== #Keybase 20211019 11:30EST For example, graftroot is just a puzzle that requires a signature of another puzzle hash and then allows you to run whatever puzzle has been signed. That pubkey can sign an infinite number of puzzles" current
  • 02:0602:06, 18 November 2023 diff hist +209 N Length of a listCreated page with "===== Return to: Insightful Comments ===== Matt Howard Keybase 20211019 8:00am EST: (defun get_length (my_list) (if my_list (+ 1 (get_length (r my_list))) 0 ) )" current
  • 02:0402:04, 18 November 2023 diff hist +574 N Cancelling a coinCreated page with "==== Return to: Insightful_Comments ==== Keybase 20211020: Q: I want to make a coin that can be "cancelled" and the amount returns to sender. One easy way to do this is to embed the sender's address in the puzzle. Is there another way? A(Quexington): You can prove your parent's puzzle hash and then allow sending there. Q (gneale): But how? ASSERT_MY_PARENT_ID - [71] is the closest I thing can find... a nudge in the right direction is sufficient. Thx! A(Quexington..." current
  • 02:0302:03, 18 November 2023 diff hist +857 N Timed eventsCreated page with "==== Return to: Insightful_Comments ==== Keybase 20211021: Q : Hi there, a friend and I are wanting to develop a project on Chia as part of our dissertation at university, we wanted to know if timed events/conditions are possible/easy to do? A (Quexington): You can assert that a certain time/block height has passed if you'd like but you cannot assert that a certain time/block height has not passed. If you want to lock a spend until a certain time, you can do that...." current
  • 02:0102:01, 18 November 2023 diff hist +993 N Signature tracingCreated page with "==== Return to: Insightful_Comments ==== Keybase 20211021: Q (gneale): Is there any evidence in retrospect in the blockrecord that any particular spendbundle signature is associated with any particular spent coin? A (Quexington): It's kind of like hashing. You can't pull apart a signature to see what pubkeys and messages are inside of it, but if you have a coin spend, you can verify a signature that signs all of its data. If you looked at the spent coin, you can..." current
  • 02:0002:00, 18 November 2023 diff hist +3 Signature creation in Python3No edit summary current
  • 01:5901:59, 18 November 2023 diff hist +1,319 N Signature creation in Python3Created page with "==== Return to: Insightful_Comments ==== Russw_ on 20211029 @01:00am EST said: ----------------------- GOT IT! This works for me: <code> basicSpendBundle = await alice.spend_coin(testcoin, pushtx = False, args = spendArgs) // assemble the aggregated BLS signatures on their own... // - in this case there is only 1 sig, so `aggSig == sig1`, and `AugScheme.MPL.aggregate` is // not actually needed here... but just add more to sigs when needed privateKey = alice...."
  • 01:5801:58, 18 November 2023 diff hist +632 N Getting started with PRs - QuexCreated page with "==== Return to: Insightful_Comments ==== Quexington on Keybase #chialisp 20211201 "If you want to get started with PRs, you just fork the repo, clone the branch you want to PR into (in this case main), create a new branch from that (git checkout -b new_branch), make your changes, push the changes to github and then open a PR to chia's repo. As for testing, the change you want to make is very small, so you could just add it and then a couple of lines in tests/clvm/te..." current
  • 01:5701:57, 18 November 2023 diff hist +390 N Identifying CATsCreated page with "==== Return to: Insightful_Comments ==== Keybase 20211209 fcoleman Q: "if you are trying to determine if a puzzle hash is a CAT, how can you do this without knowing the inner puzzle as that is one of the curried in arguments..?" Quexington A: "You cannot. You have to look at the parent puzzle reveal with /get_puzzle_and_solution. If the parent was a CAT, then the child is a CAT."" current
  • 01:3701:37, 18 November 2023 diff hist +204 N Puzzle hintsCreated page with "==== Return to: Insightful_Comments ==== Bram Cohen 2021-12-17 1:52pm "The hint is the first extra parameter in the create coin and it's more to get someone's attention than it is to explain things"" current
  • 01:3501:35, 18 November 2023 diff hist +2,048 N Securing spend with announcements - overviewCreated page with "==== Return to: Insightful_Comments ==== <h1>1.</h1>Dan Perry on Keybase 20211220 10:59pm EST The parameters you pass into the puzzle ("defconstant" and "TARGET_AMOUNT" in your example) are the puzzle's solution. If you curry one of these parameters, you are hard-coding it into the solution, and therefore into the puzzle as well. You won't always know what all of these values will be at the time of the coin's creation, so currying them isn't always an option. Any p..." current
  • 01:3401:34, 18 November 2023 diff hist +623 N Singleton commentsCreated page with "==== Return to: Insightful_Comments ==== Trepca 20020511: *singleton is tricky yeah, you first create launcher coin, then launcher coin creates singleton coin, and then you need to spend the singleton (eve spend) to "initialize" it *conditions are applied when coin is spent if any are returned *because chia has this concept of all spends happening at the same time in a block, so order doesn't matter, just that parent exists, will be spent, will create a new child coi..." current

17 November 2023

  • 15:5815:58, 17 November 2023 diff hist +759 N HintingCreated page with "===== Return to: Chialisp ===== <big>Useful Commands:</big> <pre>cd ~/.chia/mainnet/db</pre> <pre>sqlite3 blockchain_v2_testnet10.sqlite</pre> <pre>SELECT hex(hint),hex(coin_id) FROM hints LIMIT 1000,100;</pre> <pre>SELECT * FROM hints where coin_id = X'02AD7C44D75DE72550B2A8A6E63652C993AC9A60C641AE644230230D95EAD315';</pre> <pre>SELECT * FROM hints WHERE hint = X'01388426758A92EFA9669821578216A223FF167154CFCF67F5E6E8DD76DAF05E'</pre> <pre>SELECT * FROM hint..." current
  • 15:5715:57, 17 November 2023 diff hist +879 N Standard transactionCreated page with "===== Return to: CLVM ===== <big>Standard Transaction:</big> <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..." current
  • 15:5715:57, 17 November 2023 diff hist +408 N Sha256treeCreated 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>" current
  • 15:5715:57, 17 November 2023 diff hist +115 N CLVMCreated page with "===== Return to: Chialisp ===== <big>Common Examples</big> * sha256tree * standard transaction" current
  • 15:5615:56, 17 November 2023 diff hist +647 N Integer byte encoding peculiarityCreated 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..." current
  • 15:5615:56, 17 November 2023 diff hist +1,524 N RecursionCreated 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 '(..." current
  • 15:5515:55, 17 November 2023 diff hist +581 N Cancel mojo techniqueCreated 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..." current
  • 15:5515:55, 17 November 2023 diff hist +579 N EvenCreated 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 (..." current
  • 15:5415:54, 17 November 2023 diff hist +374 N RemainderCreated 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" current
  • 15:5415:54, 17 November 2023 diff hist +71 N Additional FunctionsCreated page with "===== Return to: Chialisp ===== * Remainder * Even" current
  • 15:5315:53, 17 November 2023 diff hist +651 N Greatest Common DivisorCreated 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..." current
  • 15:5215:52, 17 November 2023 diff hist +518 N LengthCreated 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..." current
  • 15:5215:52, 17 November 2023 diff hist +1,244 N IterateCreated 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_..." current
  • 15:5115:51, 17 November 2023 diff hist +183 N BinaryCreated page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== <pre> (defun binary (n) (if (= n 1) (* n 2) (* 2 (binary (- n 1))))) </pre>" current
  • 15:5015:50, 17 November 2023 diff hist +164 N PowerCreated page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== (defun power (X N) (if (= N 0) 1 (* X (power X (- N 1)))))" current
(newest | oldest) View (newer 50 | ) (20 | 50 | 100 | 250 | 500)