Skip to content

Operator Console

Overview

Karak fosters an environment of infinite innovation by providing operators with universal access to playing an active role on Karak. Please note that node operators can be either an individual or an organization. Operators allow stakers to delegate their staked assets to them. Operators then opt-in to help perform essential validation and a variety of other services for secured services.

Get started

Get in touch with the team today to start building. Contact us here.

Karak has some DSS example architectures that you could experiment with to get started as an Operator. Checkout the basic Square Number DSS example code here

Some prerequisites before you run the basic square number code as an operator:

More information on the Square Number DSS can be found here

The docker compose emulates how you as an operator will be working with the DSS. Run the code with:

docker-compose up --build

The following containers will be created when the above command is run in the numbered order:

  1. anvil - runs foundry anvil for chain emulation
  2. contract-builder - builds the contract dependencies
  3. contract-deployer - deploys the contract using forge script to the anvil container
  4. aggregator - the aggregator for square number DSS
  5. operator-1 - emulating the first operator running the DSS code
  6. operator-2 - emulating the second operator running the DSS code

The operators will register themselves with the aggregator on start up and will keep notifying the aggregator about their presence using a heartbeat ping.

To see how this DSS works you can use foundry cast to call the anvil contract from your host machine.

Send a task request:

cast send 0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE "generateTaskRequest((uint256))" "(5)" --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d --rpc-url http://localhost:8545

You will observe the task being picked up by the aggregator in the docker logs and calling operators with their urls. The operators respond with the task response which the aggregator sends back to the contract and the state for that task is updated.

Check task result:

cast call 0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE "getTaskResponse((uint256))(uint256)" "(5)" --rpc-url http://localhost:8545