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:
- Docker engine installed and running on your machine - https://docs.docker.com/engine/install/
- Docker compose installed - https://docs.docker.com/compose/install/
- Availability of ports
8080, 8081, 8454, 3000
(You can change the ports in docker-compose.yaml if needed)
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:
anvil
- runs foundry anvil for chain emulationcontract-builder
- builds the contract dependenciescontract-deployer
- deploys the contract using forge script to the anvil containeraggregator
- the aggregator for square number DSSoperator-1
- emulating the first operator running the DSS codeoperator-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