GL
Darano's independent, append-only general-ledger service. It preserves every committed wallet value movement so financial state can be reconstructed when a blockchain or provider is unavailable.
The implementation contract and invariants are defined in DESIGN.md.
Generate protobufs, test, and build with:
make generate
make test
make build
Run the ledger API and dashboard as separate processes:
go run ./cmd/gl -conf ./gl.cfg.toml
go run ./cmd/dashboard -conf ./dashboard.cfg.toml
For live reload, install Air and run air
from the repository root. The checked-in .air.toml rebuilds and restarts both
processes together.
The read-only network explorer is served on http://localhost:8080 by default:
/shows network totals and recent committed journals;/assetsranks the top positive user holders for recently active assets;/holderscombines a user's available and frozen balance and activity for one asset;/transactionsshows paginated recent transactions, filters them by user/wallet and effect type, and finds journals by exact blockchain transaction hash or internal journal ID;/accountsrebuilds a ledger account balance and activity history.
The gRPC service owns schema migrations. The dashboard is read-only, uses its
own dashboard.cfg.toml, and does not run migrations.
Run the dashboard load test against a started dashboard with:
make load-test LOADTEST_ARGS='-duration 30s -concurrency 50'
Use -paths to exercise known explorer records as well as the overview, for
example -paths '/,/transactions?q=KNOWN_HASH,/accounts?class=USER_AVAILABLE&owner_type=user&owner_id=17&asset_id=9'.
Run the fixed 10-person, 10,000,000-transfer GL conservation scenario with:
make gl-redistribution-load-test
Asset number: 7
It starts with one person holding 10,000, uses random transfer values while protecting a minimum of 45 per person, and verifies that the final ten balances still sum to exactly 10,000.