Init community scripts#1
Conversation
Adds project.md with the contributor contract (4 Makefile rules, Docker constraint, funder flow). Expands README to document repo purpose, structure, the Makefile interface, and how to run tests against a remote RPC.
Replaces the local-node docker-compose setup with a self-contained Dockerfile (ghcr.io/gnolang/gno/gnokey base). Tests now run against any remote RPC via REMOTE/CHAINID env vars. - Adds Dockerfile (runner only, no gnoland node) - Rewrites Makefile with the 4 required rules + REMOTE/CHAINID vars - Rewrites run_tests.sh: mode-aware (one-shot/repeatable), uses REMOTE - Updates common.sh: RPC resolved from REMOTE, supports FUNDER_MNEMONIC - Removes docker-compose.yml
Script that funds a list of addresses from the test1 faucet account. Reads addresses as positional arguments, configurable via REMOTE, CHAINID, FUNDER_MNEMONIC, and AMOUNT env vars.
Iterates over all contributor subdirs, calls list-funding-* to collect addresses, passes them to the FUNDER script, then runs tests-*. Configurable via REMOTE, CHAINID, and FUNDER.
Runs one-shot and repeatable tests against test-13 on push/PR to main. Uses a matrix of networks for future extensibility. FUNDER_MNEMONIC is read from repository variables (vars.FUNDER_MNEMONIC), falling back to the public test1 mnemonic if not configured.
Each test run now generates a fresh keypair via `gnokey generate`, funds it from test1 (FUNDER_MNEMONIC), and uses it to sign all test transactions. No per-contributor secret is needed. - run_tests.sh: generates runner account, funds it, exports KEY/KEY_ADDR - common.sh: KEY_ADDR is now overridable, removed hardcoded key import - samourai-crew/Makefile: list-funding-* return empty (funding internal) - root Makefile: exports FUNDER_MNEMONIC to sub-makes - ci.yml: only FUNDER_MNEMONIC env var needed, comment updated
…Makefile Each contributor now owns a fixed testnet keypair. The address and the funding amount needed are declared in their Makefile's list-funding-* rules. The funder script (test1) sends the exact amount before each run. The mnemonic is baked into the Dockerfile — it is a testnet-only key with no real value. - samourai-crew: new keypair (g1hvl0529gtj4fgtsuaurg4hcruuya2l9nuh04uj) - list-funding-*: now outputs "address amount" pairs - run_tests.sh: removed account generation and self-funding logic - funders/test-13.sh: accepts address/amount pairs - root Makefile: passes address+amount args to the funder script
Each test container now generates a fresh throwaway wallet at startup, funds it from test1 (FUNDER_MNEMONIC), and discards it after the run. The Makefile is the single interface — contributors declare the amount needed (list-funding-*) and the image to run (tests-*). No pre-existing wallet or per-contributor secret required. - _template/Makefile: copy-paste template for new contributors - samourai-crew/Makefile: IMAGE from dirname, FUND_AMOUNT vars - samourai-crew/Dockerfile: removed hardcoded key, added FUND_AMOUNT env - samourai-crew/run_tests.sh: generates throwaway wallet, self-funds - root Makefile: simplified, funding handled inside containers - ci.yml: only FUNDER_MNEMONIC needed, no funding step in CI
test-13 has restricted token transfers. test12 has a genesis test1 balance of ~9.2e18 ugnot — sufficient for unlimited test runs.
- Remove funders/ (unused in current flow) - Align FUND_AMOUNT fallback to 50M ugnot - Clean up common.sh fallbacks (KEY_ADDR empty, KEY=runner) - Add comment in _template/Makefile on REMOTE override - Update README structure
Three stress scripts targeting N validators simultaneously via REMOTES: - sybil_chaos: full parallel bombardment - sybil_precision: sequential per wallet with delay, parallel across wallets - sybil_salted_chaos: ultra-parallel fire-and-forget with memo salt Each script generates N throwaway wallets (one per RPC), deploys its own counter realm, funds the wallets from the runner, then bombards in parallel. Final state is verified for convergence across all nodes. - Dockerfile: add bash + jq, copy stress/ and realms/ - realms/counter/counter.gno: shared counter realm source - run_tests.sh: export REMOTES/FUND_AMOUNT_PER_WALLET, add stress to one-shot - Makefile: add REMOTES, FUND_AMOUNT_PER_WALLET, raise FUND_AMOUNT_ONE_SHOT
On networks with restricted transfers (test-13, test12), accounts must sign the CLA (gno.land/r/sys/cla) before they can initiate transfers. run_tests.sh now fetches the CLA hash and signs it with the runner key right after funding. Stress scripts reverted to use runner (not funder) to fund their wallets, preserving the intended architecture.
Goes back to the spec's funder model: test1 funds all accounts before the tests run, each contributor declares their fixed accounts in list-funding-* (address + amount pairs). - Restore funders/test-13.sh - Root Makefile: add FUNDER= param, call list-funding-* then funder then tests - samourai-crew/Makefile: list-funding-* returns fixed addresses (TODO placeholders) - samourai-crew/Dockerfile: bake runner + stress wallet mnemonics (TODO placeholders) - run_tests.sh: import fixed keys from mnemonics, no more throwaway generation - stress scripts: use pre-imported stress_1/2/3 keys, no more dynamic wallet creation
- Fill in the 3 samourai-crew test account addresses and mnemonics - funders/test-13.sh: skip funding if wallet already has sufficient balance
- Makefile: funder runs via Docker (no local gnokey needed on CI runner) FUNDER_MNEMONIC passed via -e (inherits from env, handles spaces) - run_tests.sh: import all keys before CLA signing loop - ci.yml: fix comment (no throwaway wallet), add REMOTES for multi-validator - Dockerfile: remove unused FUND_AMOUNT env vars - samourai-crew/Makefile: remove stale TODO comment
maketx call doesn't persist realm state correctly in this context. maketx run with a dynamically generated increment.gno that imports the freshly deployed counter realm is the correct approach. The counter=0 bug was due to query parsing (now fixed with tail -1).
The sybil tests verify that all validators agree on the same state, not that every transaction committed. Under parallel load, some txs fail due to nonce conflicts — this is expected behavior. PASS if all nodes show the same value AND at least one tx committed.
| # 3 wallets — wallet 1 is both the runner (audit/e2e) and stress_1 (first RPC) | ||
| ADDR_1 := g1hzlg063fqrq4gltql992ssjc0xzau89t5jp63w | ||
| ADDR_2 := g174tsxfpf8zj8h3tyrz4ld690xvhcjnquls6ffc | ||
| ADDR_3 := g19xnaenyhe88emmge4726ta43lp3n237vvuzc2n | ||
|
|
||
| # wallet 1 gets more funds: covers audit/e2e + stress role | ||
| FUND_AMOUNT_WALLET_1 := 50000000ugnot | ||
| FUND_AMOUNT_PER_WALLET := 15000000ugnot | ||
| FUND_AMOUNT_REPEATABLE := 10000000ugnot |
There was a problem hiding this comment.
I don't know what the logic of your scripts is, but it seems strange to me that all of this is hardcoded in your Makefile.
Also the fact that your addresses are duplicated between your Dockerfile, your Makefile, and probably other parts of the code creates multiple sources of truth and leads to errors in the end. It would be better if a single global file contained this kind of information and was imported by the different scripts that need it.
| .PHONY: list-funding-one-shot list-funding-repeatable tests-one-shot tests-repeatable build help | ||
|
|
||
| comma := , | ||
| REMOTES ?= |
There was a problem hiding this comment.
Why REMOTES when we have REMOTE?
It seems confusing to me. The README only explains that it is a comma-separated list but does not explain why we would pass multiple remotes.
Also, the comment for tests-repeatable seems wrong, it mentions REMOTES but does not seem to use it. By the way, why would one-shot use it but not repeatable?
|
|
||
| # Contributor subdirectories are detected automatically. | ||
| CONTRIB_DIRS := $(filter-out _%, $(patsubst %/Makefile,%,$(wildcard */Makefile))) | ||
|
|
There was a problem hiding this comment.
Move them to a tests subdir please, it will be cleaner and less error prone.
| REMOTE ?= $(if $(REMOTES),$(firstword $(subst $(comma), ,$(REMOTES))),https://rpc.test-13-aeddi-1.gnoland.network) | ||
| CHAINID ?= test-13 | ||
| FUNDER_SCRIPT ?= ./funders/gnoland.sh | ||
| FUNDER_MNEMONIC ?= source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast |
There was a problem hiding this comment.
Can you remove this please?
This should not be here, the root Makefile should be completely agnostic of this kind of thing.
Some funder scripts may use multiple addresses, others may use a faucet, etc.
| CHAINID ?= test-13 | ||
| FUNDER_SCRIPT ?= ./funders/gnoland.sh | ||
| FUNDER_MNEMONIC ?= source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast | ||
| GNOKEY_IMAGE ?= ghcr.io/gnolang/gno/gnokey:master |
There was a problem hiding this comment.
Same thing for this gnokey image: if my funder script doesn’t need gnokey to work, it shouldn’t be in the root Makefile. Can you remove it please?
| # Run the funder script inside a gnokey Docker container. | ||
| # No local gnokey installation required — compatible with GitHub Actions. | ||
| define run-funder | ||
| docker run --rm \ | ||
| -e REMOTE=$(REMOTE) \ | ||
| -e CHAINID=$(CHAINID) \ | ||
| -e FUNDER_MNEMONIC \ | ||
| -v "$(CURDIR)/funders:/funders:ro" \ | ||
| --entrypoint /bin/sh \ | ||
| $(GNOKEY_IMAGE) \ | ||
| /funders/$(notdir $(FUNDER_SCRIPT)) $(1) | ||
| endef |
There was a problem hiding this comment.
Remove this entirely please.
This Makefile should just take a funder script path as parameter, and call it with CHAIN_ID + REMOTE and the account / amount. No matters if it use a mnemonic, gnokey or anything else.
| #!/bin/sh | ||
| # Funds a list of address/amount pairs from the test1 faucet on test-13. | ||
| # Usage: test-13.sh <addr1> <amount1> [<addr2> <amount2> ...] | ||
| # | ||
| # Required env: | ||
| # REMOTE — RPC endpoint (default: https://rpc.test-13-aeddi-1.gnoland.network) | ||
| # CHAINID — chain ID (default: test-13) | ||
| # FUNDER_MNEMONIC — test1 mnemonic (default: public test1 mnemonic) |
| PASSWORD="test1234" | ||
| GNOKEY_HOME="${GNOKEY_HOME:-/tmp/gnokey-funder}" | ||
| FUNDER_KEY="funder" |
There was a problem hiding this comment.
Looks like this should be removed and hardcoded below. There is no point to change them.
There was a problem hiding this comment.
It would be cleaner to have a gnokey-send.sh script or similar which take as params: REMOTE, CHAIN_ID, SENDER_MNEMONIC (and it just fails if one of this param is not passed, this script is generic, don't set any default values).
Then have a thin test-13.sh wrapper which just call gnokey-send.sh with the right REMOTE, CHAIN_ID, SENDER_MNEMONIC (test1) + pass through the dest address and amount to send.
There was a problem hiding this comment.
And later on, just add a thin test-14.sh wrapper, etc. without duplicating code.
There was a problem hiding this comment.
Can you make all this generic please by removing:
- the
run_test13andrun_test12inputs (keep thetest_typechoice as is) - the
pushandpull_requesttriggers
And by adding:
- the text input fields:
chain_id,remote, andfunder_script - a
workflow_calltrigger with the same 4 inputs as theworkflow_dispatchone
Then create a test-13.yml with the triggers push on main, pull_request on main, and a workflow_dispatch with only one input test_type. This test-13 workflow calls the generic workflow with the right test-13 chain_id, remote, and funder_script.
This way, we can launch a workflow_dispatch on test-13 with a single click or run a custom one if we want to. And we might later add a cron job in test-13.yml that won’t be the same as for the other chains.
Sets up the initial community test framework and adds the first contributor
test suite (
samourai-crew).Framework (
Makefile,_template/,.github/):_template/Makefile) with the 4 required rulesContributor contract (Makefile interface):
Every contributor subdirectory exposes 4 rules:
list-funding-one-shot,list-funding-repeatable,tests-one-shot,tests-repeatableEach contributor declares their testnet account addresses in
list-funding-*.The funder script (test1) tops up those accounts before each run.
Mnemonics are baked into each contributor's Dockerfile (testnet keys, no real value).
samourai-crewtest suite:ghcr.io/gnolang/gno/gnokey:masterAfter merge — configure these repository variables (Settings → Secrets and variables → Actions → Variables):
REMOTES_TEST13CHAINID_TEST13test-13REMOTES_TEST12https://rpc.testnet12.samourai.live,http://sentry1.test12.gno.berty.io:27657,https://rpc.test12.moul.p2p.teamCHAINID_TEST12test12Also: test1 on test-13 needs to be funded for the funder script to work.
Test plan
make tests-one-shot REMOTES=<rpc_list> CHAINID=<id>runs successfullymake tests-repeatable REMOTES=<rpc_list> CHAINID=<id>runs successfullymake helplists available targets from any directory