A coroutine-based library for streaming blocks and events from the Provenance blockchain to interested consumers.
The code in this repository can also be run as a standalone utility for displaying live and historical Provenance blocks and events.
Port 26657 is expected to be open for RPC and web-socket traffic, which will
require port-forwarding to the Provenance Kubernetes cluster.
This can be accomplished easily using the internal Figure command line tool, figcli:
-
If it does not already exist, add a
[port_forward]entry to you localfigcliconfiguration file:[port_forward] context = "gke_provenance-io-test_us-east1-b_p-io-cluster"This example will use the Provenance test cluster.
-
Create a pod in the cluster to perform port-forwarding on a specific remote host and port:
$ figcli port-forward 26657:$REMOTE_HOST:26657where
$REMOTE_HOSTis a private IP within the cluster network, e.g.192.168.xxx.xxx -
If successful, you should see the pod listed in the output of
kubectl get pods:$ kubectl get pods NAME READY STATUS RESTARTS AGE datadog-agent-29nvm 1/1 Running 2 26d datadog-agent-44rdl 1/1 Running 1 26d datadog-agent-xcj48 1/1 Running 1 26d ... datadog-agent-xfkmw 1/1 Running 1 26d figcli-temp-port-forward-fi8dlktx 1/1 Running 0 15m <<< nginx-test 1/1 Running 0 154d
Traffic on localhost:26657 will now be forwarded to the Provenance cluster
The service can be run locally:
$ make run-localTo pass an arbitrary argument string to the service, run make run-local with a variable named ARGS:
$ make run-local ARGS="--from=3017000" # Display blocks starting from 3017000$ make run-local ARGS="--verbose" # Only show live blocks with verbose output