Init community scripts#1
Open
louis14448 wants to merge 51 commits into
Open
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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