chia-network / chialisp-web Goto Github PK
View Code? Open in Web Editor NEWA docusaurus Chialisp website
Home Page: https://chialisp.com
License: Apache License 2.0
A docusaurus Chialisp website
Home Page: https://chialisp.com
License: Apache License 2.0
The ASSERT_FEE
condition documentation currently states:
ASSERT_FEE - [52] - (52 amount): This spend is only valid if there is unused value in this transaction equal to amount, which is explicitly to be used as the fee.
(from https://chialisp.com/docs/coins_spends_and_wallets#conditions)
Emphasis on "equal to" is mine.
Chatting with @Quexington on keybase, he indicated that the actual behaviour here is that ASSERT_FEE
asserts that the net amount for the entire block must be >=
amount.
What should change in the docs is something like this:
>=
and not equal to
RESERVE_FEE
is better, but ASSERT_NET_BLOCK_FEE_GE
might be more exact (where GE
is Greater Equal)What I'm ultimately after here is some way for my puzzle to assert that the leftover fees (after all my new coin creations) from my puzzle are exactly equal to some value. I can probably do logic checks with ASSERT_MY_AMOUNT
, together with values given to CREATE_COIN
, but I wanted to give the scope of what caused this issue in case it helps improve docs.
Here seems to be a little error.
brun '(i (= (sha256 2) (q . 0x2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824)) (c (q . 51) (c 5 (c (q . 100) ()))) (q . "wrong password"))' '("hello" 0xdeadbeef)' evaluates to (51 0xdeadbeef 100) and not ((51 0xdeadbeef 100)). Later on in the example the additional cons-operator is added
https://chialisp.com/docs/common_functions#outer-and-inner-puzzles
keybase://chat/chia_network.public#chialisp/6660
As per Quexington in the above Keybase discussion, MOD_HASH is a tree hash of the example code with no curried arguments. This is relevant point to understanding the example, getting it to run and is unclear in the documentation due to omission.
Please consider changing the following from:
"MOD_HASH which is the tree hash of this code"
To:
"MOD_HASH which is the tree hash of this code with no curried arguments"
I believe there is a type in chialisp-web/docs/coins_spends_and_wallets.md on line 101:
"ASSERT_MY_PUZZLE_HASH - [72]" should be "ASSERT_MY_PUZZLEHASH - [72]"
brun '(* (q . 2) (q . 4) (q . 5))' '()'
FAIL: rest of non-cons 5
brun '(* (q . 2) (q . 4) (q . 5))' '()'
FAIL: rest of non-cons 5
brun '(+ (q . 10) (q . 20) (q . 30) (q . 40))' '()'
FAIL: rest of non-cons 40
When navigating https://chialisp.com/docs/
in the Basics subsection the reference link to the glossary at the top of the page redirects to https://chialisp.com/docs/ref/clvm/
but at the bottom page under the "End of Section 1" the link to the same webpage is broken https://chialisp.com/docs/chialisp.com/docs/ref/clvm
Locally, line 361 on docs/basics.md
redirects correctly but is missing the exclamation mark.
The landing page currently lists an old (and no longer correct) video from 2020 as "A video introduction to developing in Chialisp". From experience, I can state that this is misleading and a bit frustrating. :)
It would probably be better would be to link the more current videos that are on these pages:
I think a little bit of clarity could be added to the Introduction page. While it does state that Chialisp compiles into CLVM, it's not totally clear what CLVM is used for. While this is clarified later, it's not immediately obvious in the introduction. Someone visiting this site for the first time should be able to discern quickly that:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.