-
Notifications
You must be signed in to change notification settings - Fork 387
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
feat: add InMemory gnoland
node
#1241
Conversation
Signed-off-by: gfanton <[email protected]>
This reverts commit dce345f. Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1241 +/- ##
==========================================
- Coverage 47.87% 47.68% -0.19%
==========================================
Files 369 378 +9
Lines 62815 63655 +840
==========================================
+ Hits 30070 30353 +283
- Misses 30295 30845 +550
- Partials 2450 2457 +7
☔ View full report in Codecov by Sentry. |
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
gnoland
nodegnoland
node
Signed-off-by: gfanton <[email protected]>
39152bf
to
f597eda
Compare
Signed-off-by: gfanton <[email protected]>
f597eda
to
7300c4e
Compare
Signed-off-by: gfanton <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💯
Thank you for cleaning up parts of the node init flow as well 🙏
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Co-authored-by: Manfred Touron <[email protected]>
Co-authored-by: Manfred Touron <[email protected]>
Addresses gnoswap-labs#7 (comment) CI is red -> related/depends on #1241, #1249 (cc @gfanton). ```console $ go test -v . -run TestTestdata/grc20-registry === RUN TestTestdata === RUN TestTestdata/grc20-registry === PAUSE TestTestdata/grc20-registry === CONT TestTestdata/grc20-registry transfer from=g1sqt92sa06ugh8nlt98kyghw83qy84paf4csyh6 to=g123456789 some-amount testscript.go:534: WORK=$WORK PATH=/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/moul/bin:/Users/moul/.nix-profile/bin:/etc/profiles/per-user/moul/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/Users/moul/.local/bin:/Users/moul/.local/share/node_modules/bin:/Users/moul/go/bin:/Users/moul/.local/share/rust/cargo/bin:/Users/moul/.local/share/rust/rustup/bin:/Users/moul/.config/zsh/plugins/p10k-config GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ GOCOVERDIR= exe= USER_SEED_test1=source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast USER_ADDR_test1=g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 GNOROOT=/Users/moul/go/src/github.com/gnolang/gno GNOHOME=/var/folders/22/d9yt75bd2wv9sl3dm_lx85x80000gn/T/TestTestdata1289631443/001/gno # test for add package ## start a new node (1.390s) > gnoland start [stdout] node started successfully # add registry (0.466s) > gnokey maketx addpkg -pkgdir $WORK/registry -pkgpath gno.land/r/registry -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 274024 [stderr] Enter password. # we call Transfer with foo20, before it's registered (0.454s) > gnokey maketx call -pkgpath gno.land/r/registry -func TransferByName -args 'foo20' -args 'g123456789' -args '42' -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] ("not found" string) OK! GAS WANTED: 2000000 GAS USED: 73759 [stderr] Enter password. > stdout 'not found' # add foo20, and foo20wrapper (0.936s) > gnokey maketx addpkg -pkgdir $WORK/foo20 -pkgpath gno.land/r/foo20 -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 196098 [stderr] Enter password. > gnokey maketx addpkg -pkgdir $WORK/foo20wrapper -pkgpath gno.land/r/foo20wrapper -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 276276 [stderr] Enter password. # we call Transfer with foo20, after it's registered (0.464s) > gnokey maketx call -pkgpath gno.land/r/registry -func TransferByName -args 'foo20' -args 'g123456789' -args '42' -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] ("same address, success!" string) OK! GAS WANTED: 2000000 GAS USED: 132948 [stderr] Enter password. > stdout 'same address, success!' PASS --- PASS: TestTestdata (0.01s) --- PASS: TestTestdata/grc20-registry (4.09s) PASS ok github.com/gnolang/gno/gno.land/cmd/gnoland (cached) ``` --------- Signed-off-by: moul <[email protected]> Co-authored-by: Guilhem Fanton <[email protected]> Co-authored-by: Hariom Verma <[email protected]>
…ng#1262) Addresses gnoswap-labs#7 (comment) CI is red -> related/depends on gnolang#1241, gnolang#1249 (cc @gfanton). ```console $ go test -v . -run TestTestdata/grc20-registry === RUN TestTestdata === RUN TestTestdata/grc20-registry === PAUSE TestTestdata/grc20-registry === CONT TestTestdata/grc20-registry transfer from=g1sqt92sa06ugh8nlt98kyghw83qy84paf4csyh6 to=g123456789 some-amount testscript.go:534: WORK=$WORK PATH=/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/moul/bin:/Users/moul/.nix-profile/bin:/etc/profiles/per-user/moul/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/Users/moul/.local/bin:/Users/moul/.local/share/node_modules/bin:/Users/moul/go/bin:/Users/moul/.local/share/rust/cargo/bin:/Users/moul/.local/share/rust/rustup/bin:/Users/moul/.config/zsh/plugins/p10k-config GOTRACEBACK=system HOME=/no-home TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ GOCOVERDIR= exe= USER_SEED_test1=source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast USER_ADDR_test1=g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 GNOROOT=/Users/moul/go/src/github.com/gnolang/gno GNOHOME=/var/folders/22/d9yt75bd2wv9sl3dm_lx85x80000gn/T/TestTestdata1289631443/001/gno # test for add package ## start a new node (1.390s) > gnoland start [stdout] node started successfully # add registry (0.466s) > gnokey maketx addpkg -pkgdir $WORK/registry -pkgpath gno.land/r/registry -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 274024 [stderr] Enter password. # we call Transfer with foo20, before it's registered (0.454s) > gnokey maketx call -pkgpath gno.land/r/registry -func TransferByName -args 'foo20' -args 'g123456789' -args '42' -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] ("not found" string) OK! GAS WANTED: 2000000 GAS USED: 73759 [stderr] Enter password. > stdout 'not found' # add foo20, and foo20wrapper (0.936s) > gnokey maketx addpkg -pkgdir $WORK/foo20 -pkgpath gno.land/r/foo20 -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 196098 [stderr] Enter password. > gnokey maketx addpkg -pkgdir $WORK/foo20wrapper -pkgpath gno.land/r/foo20wrapper -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] OK! GAS WANTED: 2000000 GAS USED: 276276 [stderr] Enter password. # we call Transfer with foo20, after it's registered (0.464s) > gnokey maketx call -pkgpath gno.land/r/registry -func TransferByName -args 'foo20' -args 'g123456789' -args '42' -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1 [stdout] ("same address, success!" string) OK! GAS WANTED: 2000000 GAS USED: 132948 [stderr] Enter password. > stdout 'same address, success!' PASS --- PASS: TestTestdata (0.01s) --- PASS: TestTestdata/grc20-registry (4.09s) PASS ok github.com/gnolang/gno/gno.land/cmd/gnoland (cached) ``` --------- Signed-off-by: moul <[email protected]> Co-authored-by: Guilhem Fanton <[email protected]> Co-authored-by: Hariom Verma <[email protected]>
This PR add an inMemory gnoland node for standard test.
One of the goal of this PR is to make the creation of a node for integration test easier
It will be second iteration on gnoland following #1117
It will certainly need more iterations
cmd/gnoland
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description