Skip to content

Init community scripts#1

Open
louis14448 wants to merge 51 commits into
gnoverse:mainfrom
louis14448:init-community-scripts
Open

Init community scripts#1
louis14448 wants to merge 51 commits into
gnoverse:mainfrom
louis14448:init-community-scripts

Conversation

@louis14448
Copy link
Copy Markdown

@louis14448 louis14448 commented May 18, 2026

Sets up the initial community test framework and adds the first contributor
test suite (samourai-crew).

Framework (Makefile, _template/, .github/):

  • Root Makefile orchestrator that auto-discovers contributor subdirectories
  • Contributor template (_template/Makefile) with the 4 required rules
  • GitHub Actions CI with multi-network matrix (test-13, test12), triggered on push/PR to main
  • Funder script runs inside a gnokey Docker container — no local gnokey required on the runner

Contributor contract (Makefile interface):
Every contributor subdirectory exposes 4 rules:
list-funding-one-shot, list-funding-repeatable,
tests-one-shot, tests-repeatable

Each 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-crew test suite:

  • 8 GnoVM audit scripts (regression tests for specific gnovm bugfixes)
  • 3 E2E transaction tests (nonce replay, counter realm, mempool stress)
  • 3 Sybil stress tests (multi-validator convergence verification)
  • Self-contained Docker image based on ghcr.io/gnolang/gno/gnokey:master

After merge — configure these repository variables (Settings → Secrets and variables → Actions → Variables):

Variable Description Default
REMOTES_TEST13 Comma-separated RPC list for test-13 https://rpc.test-13-aeddi-1.gnoland.network,https://rpc.test-13-gfanton-1.gnoland.network,https://rpc.test-13-moul-1.gnoland.network
CHAINID_TEST13 Chain ID for test-13 test-13
REMOTES_TEST12 Comma-separated RPC list for test12 https://rpc.testnet12.samourai.live,http://sentry1.test12.gno.berty.io:27657,https://rpc.test12.moul.p2p.team
CHAINID_TEST12 Chain ID for test12 test12

Also: 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 successfully
  • make tests-repeatable REMOTES=<rpc_list> CHAINID=<id> runs successfully
  • CI workflow triggers on push to main
  • make help lists available targets from any directory

louis14448 added 30 commits May 18, 2026 14:17
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
louis14448 added 21 commits May 19, 2026 16:16
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant