A golang implementation of the Open Audio Protocol.
docker run --rm -it \
-p 80:80 \
-p 443:443 \
-p 26656:26656 \
-e OPENAUDIO_TLS_SELF_SIGNED=true \
-e OPENAUDIO_STORAGE_ENABLED=false \
openaudio/go-openaudio:stable
# in another terminal session
open https://localhost/console/overviewTo run a validator and secure the network, visit docs.openaudio.org.
Ensure the following are installed:
- Docker
- Docker Compose
- Go v1.25
The remaining dependencies can then be automatically installed with make:
make install-depsYou can simulate an openaudio network by running multiple nodes on your machine. This makes developing certain features fast and easy.
Add the following hosts to your /etc/hosts file:
echo "127.0.0.1 node1.oap.devnet node2.oap.devnet node3.oap.devnet node4.oap.devnet" | sudo tee -a /etc/hostsThen add the local dev x509 cert to your keychain so you will have green ssl in your browser.
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dev/tls/cert.pemBuild and run a local devnet with 4 nodes.
make upAccess the dev nodes
# add -k if you don't have the cert in your keychain
curl https://node1.oap.devnet/health-check
curl https://node2.oap.devnet/health-check
curl https://node3.oap.devnet/health-check
curl https://node4.oap.devnet/health-check
# view in browser (quit and re-open if you added the cert and still get browser warnings)
open https://node1.oap.devnet/console
open https://node2.oap.devnet/console
open https://node3.oap.devnet/console
open https://node4.oap.devnet/consoleSmoke test
# after 5-10s there should be 4 nodes registered
# this validates that the registry bridge is working,
# as only nodes 1 and 2 are defined in the genesis file as validators
$ curl -s https://node1.oap.devnet/core/nodes | jq .
{
"data": [
"https://node2.oap.devnet",
"https://node1.oap.devnet",
"https://node3.oap.devnet",
"https://node4.oap.devnet"
]
}
# or in the UI
open https://node1.oap.devnet/console/nodes
# view uptime across the network
open https://node1.oap.devnet/console/uptimeNote: By default, hot reloading is only enabled on node1.oap.devnet to conserve system resources. To enable on other nodes, update the corresponding env file in dev/env.
Build a local docker image
make docker-devPeer with mainnet
docker run --rm -it -p 80:80 -p 443:443 -e NETWORK=prod openaudio/go-openaudio:devRun all tests
make testRun only storage service tests
make test-mediorumRun only unittests
make test-unitRun only integration tests
make test-integrationThe ETL service indexes blockchain data into the postgres database, enabling faster queries for certain views.
OPENAUDIO_ETL_ENABLED=trueThe Explorer provides a web-based interface to browse blocks, transactions, validators, and other data. If enabled, the explorer runs at the site root, e.g. https://node1.oap.devnet/. Explorer requires ETL.
OPENAUDIO_ETL_ENABLED=true
OPENAUDIO_EXPLORER_ENABLED=true
# View explorer in browser
open https://node1.oap.devnet/