Sign inSign up

kinghash/nodedao-oracle

By kinghash

•Updated over 3 years ago

TypeScript NodeDao Oracle daemon

Image
0

459

kinghash/nodedao-oracle repository overview

⁠NodeDAO-Oracle

Made by: kinghash⁠

NodeDAO Oracle daemon

Oracle daemon for NodeDAO decentralized staking service. Collects and reports Beacon Chain states (the number of visible validators and their summarized balances) to the NodeDAO dApp contract running on Ethereum execution layer.

For oracle contracts, see: King-Hash-Org/NodeDAO-Protocol⁠

⁠Working Mechanism

  • Upon the start daemon determines the reportable epoch and retrieves the list of validator keys to watch for.
  • Then it Gets the NodeDAO-controlled validators from the reportable beacon state and summarizes their balances.
  • Constructs the transaction containing the epochId, beaconBalance, beaconValidators and validatorRankingRoot.
  • If the daemon has privateKey in config file, it signs and sends the transaction to the oracle contract.

⁠Config File

config-default.json

{
  "log": {
    "level": "info"
  },
  "network": "goerli",
  "beaconNodeAddr": "",
  "executionLayerAddr": "",
  "privateKey": ""
}

Only json file format is supported

⁠Configuration details
AttributeRequiredDefaultDescription
log.levelfalseinfolog level
networkfalsemainnetnetwork
beaconNodeAddrtrueEndpoint of beacon chain connection
executionLayerAddrtrueEndpoint of layer connection
privateKeytrueOracle member's private key(Make enough ETH to support the GAS of transactions)
⁠Note:
  • Ensure connectivity between the ETH execution layer and the ETH consensus layer nodes for which the executionLayerAddr and beaconNodeAddr parameters are set.
  • Ensure that privateKey's private key is authorized by Oracle-Dao.

⁠Setup

⁠Docker

NodeDAO-Oracle docker images⁠

docker pull kinghash/nodedao-oracle:latest
docker run -v `pwd`/src/config/config-dev.json:/config/config-dev.json -d  kinghash/nodedao-oracle:latest --config  /config/config-dev.json

Tag summary

Content type

Image

Digest

sha256:fc0af4135…

Size

74.8 MB

Last updated

over 3 years ago

docker pull kinghash/nodedao-oracle:1.0.0