Sign inSign up

magicblocklabs/validator

By magicblocklabs

Updated about 1 year ago

Blazing Fast SVM Ephemeral Validator

Image
0

739

magicblocklabs/validator repository overview

MagicBlock Ephemeral Validator

Blazing Fast SVM Ephemeral Validator. The ER can clones accounts/programs just-in-time from a base cluster.

Using docker run

Run a a local validator which automatically clones accounts/programs from mainnet

docker run -e ACCOUNTS_REMOTE=https://api.mainnet-beta.solana.com/ \
           -e VALIDATOR_MILLIS_PER_SLOT=50 \
           -e ACCOUNTS_LIFECYCLE=replica \
           -p 8899:8899 -p 8900:8900 -p 10000:10000 \
           magicblocklabs/validator

Environment Variables for configuring the validator

ACCOUNTS_REMOTE
  • Description: Specifies the remote URL for the remote cluster used to clone accounts/programs.
  • Type: URL
  • Example: https://api.mainnet-beta.solana.com/
ACCOUNTS_LIFECYCLE
  • Description: Indicates the validator lifecycle. (replica, ephemeral, programs-replica, offline)
  • Type: Enum (true or false)
  • Example: replica
ACCOUNTS_COMMIT_FREQUENCY_MILLIS
  • Description: The frequency in milliseconds for committing accounts to the base layer.
  • Type: Unsigned 64-bit integer (u64)
  • Example: 5000
ACCOUNTS_COMMIT_COMPUTE_UNIT_PRICE
  • Description: The compute unit price for accounts commit.
  • Type: Unsigned 64-bit integer (u64)
  • Example: 100
RPC_ADDR
  • Description: The IP address for the RPC service.
  • Type: IPv4 Address
  • Example: 0.0.0.0
RPC_PORT
  • Description: The port number for the RPC service.
  • Type: Unsigned 16-bit integer (u16)
  • Example: 8899
GEYSER_GRPC_ADDR
  • Description: The IP address for the Geyser gRPC service.
  • Type: IPv4 Address
  • Example: 0.0.0.0
GEYSER_GRPC_PORT
  • Description: The port number for the Geyser gRPC service.
  • Type: Unsigned 16-bit integer (u16)
  • Example: 9090
VALIDATOR_MILLIS_PER_SLOT
  • Description: The duration in milliseconds per slot for the validator.
  • Type: Unsigned 64-bit integer (u64)
  • Example: 50

Example Docker Configuration

To set these environment variables in a Docker container, you can use the -e flag with docker run, or define them in a docker-compose.yml file.

Using docker run
docker run -e ACCOUNTS_REMOTE=https://api.mainnet-beta.solana.com/ \
           -e ACCOUNTS_COMMIT_FREQUENCY_MILLIS=5000 \
           -e ACCOUNTS_COMMIT_COMPUTE_UNIT_PRICE=100 \
           -e RPC_ADDR=192.168.1.1 \
           -e RPC_PORT=8080 \
           -e GEYSER_GRPC_ADDR=192.168.1.2 \
           -e GEYSER_GRPC_PORT=9090 \
           -e VALIDATOR_MILLIS_PER_SLOT=400 \
           magicblocklabs/validator

LICENSE

https://github.com/magicblock-labs/licenses/blob/main/LICENSE.md

Tag summary

Content type

Image

Digest

sha256:0ea9e02ee

Size

55 MB

Last updated

about 1 year ago

docker pull magicblocklabs/validator