Node for zero-art protocol
appszrt-node- node which takes a role of a intermediate server, storing data for users
cratesapi- main logic of a servercallback- small helper crate for defining structures for communication between api and proof-verifier.proof-verifier- separate proof verifierstorage- mongo db storagetests- unit tests for a projecttypes- library with types used in the project. It contains errors, mongodb records, requests, responses, queries, etc.
To build the Docker image with access to private GitHub repositories:
DOCKER_BUILDKIT=1 docker build --ssh default .This command uses Docker BuildKit with SSH agent forwarding to authenticate with private GitHub repositories during the build process.
-
zrt-nodefeatures- default - Enables
verificationfeature. To run the node without default features, use--no-default-featurescommand line option. - verification - Enable
api/verificationfeature.
- default - Enables
-
apifeatures- api/verification - Enable Proof verification. (Automatically enables
api/art_modificationsfeature.)
- api/verification - Enable Proof verification. (Automatically enables
-
testsfeature- tests/integration_tests - Enables integration tests.
- tests/merge_changes - configure tests, to work with
merge_changesconfig enabled
To run the node without features use --no-default-features option.
cargo run -p zrt-node --no-default-features --release -- run --config config.tomlTo test the node api, one should prepare the environment. Firstly raise the infrastructure in docker. Node can be run in docker or locally. Then one can run tests with integration_tests and or merge_changes features like the next:
cargo test -p tests --features integration_tests,merge_changes