Skip to content

Repository files navigation

Tari explorer

No client-side JavaScript block explorer (tari-text-explorer)

Dependencies

  • npm install

Tari protos

The .proto files are vendored under applications/minotari_app_grpc/proto/ and pinned to an upstream commit by tari-proto.pin.json. Builds use the vendored copies, so no network access to GitHub is needed to build the image.

  • npm run proto:check - verify the vendored protos still match the pin (run in CI)
  • npm run proto:refresh - restore the vendored protos at the pinned commit
  • npm run proto:refresh -- v5.5.0 - move the pin to a new tag/branch

Moving the pin resolves the ref to an immutable commit SHA and rewrites tari-proto.pin.json. Review the resulting diff: upstream proto changes regularly break codegen or the TypeScript build.

Get a minotari node binary for local development

  • npm run node:download - downloads the node matching the pinned proto tag
  • npm run node:download -- v5.5.0 - downloads a specific release

Build

  • npm run build

Start server

  • npm start

Build and run the server in dev mode watch

  • npm run dev

Useful environment variables

To run, export the following environment variables:

  • PORT Port of service (Default: 4000)
  • BASE_NODE_GRPC_URL Base node GRPC URL (Default: localhost:18142)
  • TARI_EXPLORER_INDEX_CACHE_SETTINGS Index cache (Default: public, max-age=120, s-maxage=60, stale-while-revalidate=30)
  • TARI_EXPLORER_MEMPOOL_CACHE_SETTINGS Mempool cache (Default: public, max-age=15, s-maxage=15, stale-while-revalidate=15)
  • TARI_EXPLORER_OLD_BLOCKS_CACHE_SETTINGS Old blocks cache (Default: public, max-age=604800, s-maxage=604800, stale-while-revalidate=604800)
  • TARI_EXPLORER_NEW_BLOCKS_CACHE_SETTINGS New blocks cache (Default: public, max-age=120, s-maxage=60, stale-while-revalidate=30)
  • TARI_EXPLORER_OLD_BLOCK_DELTA_TIP Delta tip between old and new (Default: 5040)

Running the Minotari Node

    ./minotari_node \
     -b syncNode-ip4 \
     --network mainnet \
     --disable-splash-screen \
     --non-interactive-mode \
     --grpc-enabled \
     -p bypass_range_proof_verification=true \
     -p base_node.grpc_address=/ip4/127.0.0.1/tcp/18142 \
     -p base_node.grpc_server_allow_methods=\"get_tokens_in_circulation,get_tip_info,get_sync_info,get_sync_progress,get_mempool_stats,get_version,get_network_status,list_headers,get_mempool_transactions,get_active_validator_nodes,get_blocks\" \
     --mining-enabled

Requrired allow methods:

  • get_tokens_in_circulation
  • get_tip_info
  • get_sync_info
  • get_sync_progress
  • get_mempool_stats
  • get_version
  • get_network_status
  • list_headers
  • get_mempool_transactions
  • get_active_validator_nodes
  • get_blocks

Dev Notes:

  • Grpc methods parse numbers as bigints if they do not fit usual numbers
  • Render functions must first convert bigints back to strings see sanitizeBigInts
  • JSON serialization converts bigints to simple numbers - not strings.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages