Skip to main content

Prerequisites:

  • Crunch Protocol CLI tools installed:
    • npm install @crunchdao/coordinator-cli
    • npm install @crunchdao/cruncher-cli
    • pipx install crunch-certificate
  • Solana wallet with SOL tokens for transaction fees
  1. Register your Coordinator
crunch-coordinator register "<coordinator-name>"
Wait for the Coordinator to be approved by the Foundation (as long as the Crunch Protocol is in alpha mode)
  1. Register your Crunch
crunch-coordinator crunch create "<crunch-name>" 5000 2
# OUTPUT
Next steps:
  1. Fund the crunch with USDC rewards:
     crunch-coordinator deposit-reward test4 <amount>
     or send USDC directly to: <solana-address>
  2. Start accepting submissions:
     crunch-coordinator start test4
Make sure all transactions and sending is using the Solana devnet. Verify your Solana CLI configuration is set to devnet before proceeding with any deployment steps.
  1. Fund the Crunch You need to deposit some USDC to the Crunch to be able to start and run it. This is the reward pool for the Crunch.
crunch-coordinator crunch deposit-reward "<crunch-name>" 1200
Alternatively you can deposit by just sending USDC to the Crunch Token Account which was given in the output of the previous command.
  1. Start your Crunch
crunch-coordinator crunch start <crunch-name>
  1. Deploy your Coordinator Node
Launch your Coordinator Node in your preferred cloud provider or on-premises. To get access to the Model Nodes you need to generate certificates for your Coordinator Node.
  1. Install the Certificate Generator Follow the instructions in the Crunch Certificate package to generate a certificate. Decompress the compressed file and use the folder for the coming steps.
  2. Store the certificate securely Restrict access to the certificate files and add them to your Coordinator Node.
  3. In your code specify the path to the certificate folder when initialising DynamicSubclassModelConcurrentRunner
secure_credentials = SecureCredentials.from_directory(
    path="../../issued-certificate"
)
self.model_concurrent_runner = DynamicSubclassModelConcurrentRunner(
    self.MODEL_RUNNER_TIMEOUT,
    "condorgame",
    self.MODEL_RUNNER_NODE_HOST,
    self.MODEL_RUNNER_NODE_PORT,
    "condorgame.tracker.TrackerBase",
    max_consecutive_failures=100,
    max_consecutive_timeouts=100
    max_consecutive_timeouts=100,
    secure_credentials=secure_credentials, # new parameter
)
  1. Publish your Crunch You can configure and publish you Crunch using the Coordinator Platform. Launch it by running:
crunch-coordinator platform 
On the page loaded you can configure your Crunch, add models, set the rules and publish it on the Testnet Hub.