Performance Tip: Use
Ctrl+Fto jump to sections using anchor links (e.g.,#building-and-running)
make unit-tests - Run unit testsmake unit-tests-race - Unit tests with race detectormake integration-tests-fabtoken-fabric-t1 - Fabtoken integration testsmake integration-tests-dlog-fabric-t1 TEST_FILTER="T1" - ZK integration tests with T1 filtermake fmt - Format code using gofmtmake lint - Check code stylemake lint-auto-fix - Auto-fix linting issues (recommended pre-commit)make install-tools - Install development dependenciesmake checks - Run all pre-CI checks (license, fmt, vet, etc.)make download-fabric - Download Fabric binariesmake docker-images - Prepare Docker imagesmake testing-docker-images - Prepare test Docker imagesmake clean - Remove build artifactsmake clean-all-containers - Remove Docker containersmake tidy - Synchronize Go dependenciesgo generate ./... - Generate mockstoken/
βββ core/ # Driver implementations (fabtoken, zkatdlog)
βββ driver/ # Interface definitions (ports)
βββ services/ # High-level services (identity, network, ttx, storage)
βββ sdk/ # Public API entry points
integration/
βββ nwo/ # Network Orchestrator for test networks
βββ token/ # Actual test suites (fungible, nft, dvp, etc.)
make install-tools
make download-fabric
export FAB_BINS=$PWD/../fabric/bin
make docker-images
make testing-docker-images
# Code quality
make lint-auto-fix
make checks
# Testing
make unit-tests # Standard
make unit-tests-race # With race detection
make integration-tests-fabtoken-fabric-t1 # Integration tests
# Performance profiling
go test -cpuprofile=cpu.out ./...
go test -memprofile=mem.out ./...
# Focused testing
make integration-tests-dlog-fabric TEST_FILTER="T1"
FAB_BINS is set correctly and points to valid Fabric binariesmake testing-docker-imagesmake lint-auto-fixchmod +x on Fabric binaries in $FAB_BINSmake clean-all-containersmake tidymake install-tools (ensures counterfeiter is installed)To ensure your commits pass CI automatically, understand what runs:
All PRs and pushes to main trigger these workflows:
gofmt, goimports)govet, staticcheck, ineffassign, misspell)make checksmake checks and make lint-auto-fix before committingFAB_BINS is set for integration test compatibilitymake tidytoken/drivertoken/services*_test.go)assert for values, require for error handling)integration/ directoryTEST_FILTER environment variable with Ginkgo labels for focused testingTEST_FILTER="T1" runs only tests with T1 labelcounterfeiter (go generate ./...)disabled.Provider for metrics to avoid nil panicsnoop.NewTracerProvider() for tracingtoken/services/ttx for example)git commit -s)Before implementing any task:
plan.md in project root with:
[ ] Pending checkboxes[x] Done + brief change notes## Notes & Decisionsβ
COMPLETE when finished/tmp/fsc-integration-<random>/...)docker logs <container_name>NewLocalTestSuite (outputs to ./testdata)time.Sleep() or pause loops in tests to inspect Docker stateno-cleanup option or manually comment test suite cleanupIt(...) to FIt(...) to focus, or XIt(...) to skip (never commit these changes)Makefile: Central control hub - read to discover targetsgo.mod: Project dependenciestools/tools.go: Tool dependencies source of truth (install with make install-tools)token/: Core SDK logicintegration/: Integration tests and Network OrchestratorTo ensure your commits pass CI automatically, understand what runs:
All PRs and pushes to main trigger these workflows:
gofmt, goimports)govet, staticcheck, ineffassign, misspell)make checksmake checks and make lint-auto-fix before committingFAB_BINS is set for integration test compatibilitymake tidy