jorvit

module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2020 License: MIT

README

jorvit

Tools to manage and test self VIT node operations and integrations.

Installation

  1. Download the latest release from releases page https://github.com/input-output-hk/jorvit/releases
  2. Download the jörmungandr nightly binaries from https://github.com/input-output-hk/jormungandr/releases/tag/nightly and place them inside jor_bins folder
  3. Download the servicing station binaries from https://github.com/input-output-hk/vit-servicing-station/releases and place them inside vit_bins folder
Usage

Upon installation the content/structure of the working folder should be like:

.
├── assets
│   ├── fund.csv                     <-- fund general info
│   └── proposals.csv                <-- proposals list example
├── jor_bins
│   ├── jcli                         <-- node binary
│   ├── jormungandr                  <-- node binary
│   └── Readme.md
├── vit_bins
│   ├── vit-servicing-station-cli    <-- station binary
│   ├── vit-servicing-station-server <-- station binary
│   └── Readme.md
├── jorvit                           <-- our binary
└── README.md

3 directories, 10 files

Just execute jorvit binary within a shell and the application will start in foreground and will display some informations related to the content and services it provides.

There are a lot of config parameters that you can use for the configurations

  -allow-node-restart
    	Allows to stop the node started from the service and restart it manually (default true)
  -bft-leader-fund uint
    	Lovelace amount to fund bft leader account
  -bft-leader-min uint
    	Minimun number of BFT Leaders. NEW SK/PK key pair(s) will be autogenerated if > "bft-leader-secret-key" + "bft-leader-public-key". min: 1 (default 1)
  -bft-leader-public-key value
    	PK (public key) to be used as BFT leader. No config file will be generated for this (since don't have the SK). ex: ed25519_pk15f7p4nzektlrj6muvvmn0hatzekg7yf0qjx54pg72qq2zgjjzdzqwhm8rz
  -bft-leader-secret-key value
    	File containing SK (secret key) to be used as BFT leader
  -block0-voteplan
    	Enable/Disable inclusion of proposals/voteplans signed certificate on block0
  -committee-auth-fund uint
    	Lovelace amount to fund committee auth account
  -committee-auth-public-key value
    	Global committee member public key. ex: ed25519_pk15f7p4nzektlrj6muvvmn0hatzekg7yf0qjx54pg72qq2zgjjzdzqwhm8rz
  -committee-duration string
    	Committee period duration. Ignored if 'committee-end' is set (default "24h")
  -committee-end string
    	Committee end time in '2006-01-02T15:04:05Z07:00' RFC3339 format. If not set 'committee-duration' will be used
  -committee-privacy-public-key value
    	Privacy committee member public key used to build encyption key, hex encoded
  -cors string
    	Comma separated list of CORS allowed origins (default "http://127.0.0.1,http://localhost")
  -epoch-duration string
    	Epoch period duration (default "24h")
  -explorer
    	Enable/Disable explorer
  -fees-certificate uint
    	Default certificate fee (lovelace)
  -fees-certificate-pool-registration uint
    	Pool registration certificate fee (lovelace)
  -fees-certificate-stake-delegation uint
    	Stake delegation certificate fee (lovelace)
  -fees-certificate-vote-cast uint
    	VoteCast certificate fee (lovelace)
  -fees-certificate-vote-plan uint
    	VotePlan certificate fee (lovelace)
  -fees-coefficient uint
    	Coefficient fee
  -fees-constant uint
    	Constant fee (lovelace)
  -fees-go-to string
    	Where to send the collected fees, rewards or treasury (default "rewards")
  -fund string
    	CSV full path (filename) to load FUND info from (default "./assets/fund.csv")
  -genesis-extra-data string
    	YAML full path (filename) to load extra genesis funds from (default "./assets/extra_genesis_data.yaml")
  -genesis-time string
    	Genesis time in '2006-01-02T15:04:05Z07:00' RFC3339 format (default "Now()")
  -node string
    	Address where Jörmungandr node should listen in IP:PORT format (default "127.0.0.1:9001")
  -node-log-level string
    	Jörmungandr node log level, [off, critical, error, warn, info, debug, trace] (default "warn")
  -proposals string
    	CSV full path (filename) to load PROPOSALS from (default "./assets/proposals.csv")
  -proxy string
    	Address where REST api PROXY should listen in IP:PORT format (default "0.0.0.0:8000")
  -rest string
    	Address where Jörmungandr REST api should listen in IP:PORT format (default "0.0.0.0:8001")
  -shutdown-node
    	When exiting try node shutdown in case the node was restarted manually (default true)
  -skip-bootstrap
    	Skip node bootstrap, in case of first/single genesis leader (default true) (default true)
  -slot-duration string
    	Slot period duration. 1s-255s (default "20s")
  -start-node
    	Start jörmungandr node. When false only config will be generated
  -start-vit
    	Start vit-servicing-station-server. When false only config will be generated
  -vit-log-level string
    	vit-servicing-station-server log level, [off, critical, error, warn, info, debug, trace] (default "warn")
  -vit-station string
    	Address where vit-servicing-station-server should listen in IP:PORT format (default "0.0.0.0:3030")
  -vote-duration string
    	Voting period duration. Ignored if 'vote-end' is set (default "144h")
  -vote-end string
    	Vote end time in '2006-01-02T15:04:05Z07:00' RFC3339 format. If not set 'vote-duration' will be used
  -vote-start string
    	Vote start time in '2006-01-02T15:04:05Z07:00' RFC3339 format. If not set 'genesis-time' will be used
  -voteplan-proposals-max uint
    	Max number of proposals per voteplan [1-256] (default 255)
APP - PROXY Rest API

The important service is the APP - PROXY Rest API since the other 2 services are provided from the jörmungandr service itself.

This service exposes the following rest endpoints:

  1. /api/v0/fund - provides general info related to the active fund phase:

    curl 'http://localhost:8000/api/v0/fund'
    
    {
      "fund_name": "Fund0",
      "fund_goal": "Support innovative projects",
      "voting_power_info": "2020-05-26 15:26:29 +0000 UTC",
      "rewards_info": "2020-06-26 15:26:29 +0000 UTC",
      "fund_start_time": "2020-05-26 15:26:29 +0000 UTC",
      "fund_end_time": "2020-06-26 15:26:29 +0000 UTC",
      "next_fund_start_time": "2021-06-26 15:26:29 +0000 UTC",
      "chain_vote_plans": [
        {
          "chain_voteplan_id": "f4fdab54e2d516ce1cabe8ae8cfe77e99eeb530f7033cdf20e2392e012373a7b",
          "chain_vote_starttime": "2020-05-26 19:38:35 +0000 UTC",
          "chain_vote_endtime": "2020-05-26 19:43:35 +0000 UTC",
          "chain_committee_endtime": "2020-05-26 19:48:35 +0000 UTC",
          "chain_voteplan_payload": "Public"
        },
        {
          "chain_voteplan_id": "145b208b9de264352ae8b7071ee1c59996de01dde03ce8ecd5b44f7f71631cec",
          "chain_vote_starttime": "2020-05-26 19:38:35 +0000 UTC",
          "chain_vote_endtime": "2020-05-26 19:43:35 +0000 UTC",
          "chain_committee_endtime": "2020-05-26 19:48:35 +0000 UTC",
          "chain_voteplan_payload": "Public"
        }
      ]
    }
    
  2. /api/v0/proposals/{internal_id} - get a single proposal details based on internal_id:

    curl 'http://localhost:8000/api/v0/proposals/1'
    
    {
      "internal_id": "1",
      "category": {
        "category_id": "",
        "category_name": "Fund0 Development",
        "category_description": ""
      },
      "proposal_id": "16444246",
      "proposal_title": "Test proposal 16444246",
      "proposal_summary": "To test the proposal process 16444246",
      "proposal_problem": "We haven't tested proposal integration yet 16444246",
      "proposal_solution": "Test the proposal integration process 16444246",
      "proposal_url": "https://iohk.submittable.com/submissions/16444246",
      "proposal_files_url": "https://iohk.submittable.com/submissions/16444246/file/0",
      "proposal_public_key": "Ae2tdPwUPEYwrazXRJVK4NgHSZCjP9kLSMrx2awgYiBH61zT8kz6u33Sije",
      "proposal_funds": 1000246,
      "proposer": {
        "proposer_email": "iohk_16444246@iohk.io",
        "proposer_name": "IOHK 16444246",
        "proposer_url": "https://iohk.io"
      },
      "chain_proposal_id": "5db05d3c7bfc37f2059d24966aa6ef05cfa25b6a478dedb3b93f5dca5c57c24a",
      "chain_proposal_index": 0,
      "chain_vote_options": {
        "blank": 0,
        "YES": 1,
        "NO": 2
      },
      "chain_voteplan_id": "f4fdab54e2d516ce1cabe8ae8cfe77e99eeb530f7033cdf20e2392e012373a7b",
      "chain_vote_starttime": "2020-05-26 19:38:35 +0000 UTC",
      "chain_vote_endtime": "2020-05-26 19:43:35 +0000 UTC",
      "chain_committee_endtime": "2020-05-26 19:48:35 +0000 UTC",
      "chain_voteplan_payload": "Public"
    }
    
  3. /api/v0/proposals - get a array with all detailed proposals:

    curl 'http://localhost:8000/api/v0/proposals'
    
    [
      {
        "internal_id": "1",
        "category": {
          "category_id": "",
          "category_name": "Fund0 Development",
          "category_description": ""
        },
        "proposal_id": "16444246",
        "proposal_title": "Test proposal 16444246",
        "proposal_summary": "To test the proposal process 16444246",
        "proposal_problem": "We haven't tested proposal integration yet 16444246",
        "proposal_solution": "Test the proposal integration process 16444246",
        "proposal_url": "https://iohk.submittable.com/submissions/16444246",
        "proposal_files_url": "https://iohk.submittable.com/submissions/16444246/file/0",
        "proposal_public_key": "Ae2tdPwUPEYwrazXRJVK4NgHSZCjP9kLSMrx2awgYiBH61zT8kz6u33Sije",
        "proposal_funds": 1000246,
        "proposer": {
          "proposer_email": "iohk_16444246@iohk.io",
          "proposer_name": "IOHK 16444246",
          "proposer_url": "https://iohk.io"
        },
        "chain_proposal_id": "5db05d3c7bfc37f2059d24966aa6ef05cfa25b6a478dedb3b93f5dca5c57c24a",
        "chain_proposal_index": 0,
        "chain_vote_options": {
          "blank": 0,
          "YES": 1,
          "NO": 2
        },
        "chain_voteplan_id": "f4fdab54e2d516ce1cabe8ae8cfe77e99eeb530f7033cdf20e2392e012373a7b",
        "chain_vote_starttime": "2020-05-26 19:38:35 +0000 UTC",
        "chain_vote_endtime": "2020-05-26 19:43:35 +0000 UTC",
        "chain_committee_endtime": "2020-05-26 19:48:35 +0000 UTC",
        "chain_voteplan_payload": "Public"
      },
      {
        "internal_id": "20",
        "category": {
          "category_id": "",
          "category_name": "Fund0 Development",
          "category_description": ""
        },
        "proposal_id": "16444265",
        "proposal_title": "Test proposal 16444265",
        "proposal_summary": "To test the proposal process 16444265",
        "proposal_problem": "We haven't tested proposal integration yet 16444265",
        "proposal_solution": "Test the proposal integration process 16444265",
        "proposal_url": "https://iohk.submittable.com/submissions/16444265",
        "proposal_files_url": "https://iohk.submittable.com/submissions/16444265/file/0",
        "proposal_public_key": "Ae2tdPwUPEYwrazXRJVK4NgHSZCjP9kLSMrx2awgYiBH61zT8kz6u33Sije",
        "proposal_funds": 1000265,
        "proposer": {
          "proposer_email": "iohk_16444265@iohk.io",
          "proposer_name": "IOHK 16444265",
          "proposer_url": "https://iohk.io"
        },
        "chain_proposal_id": "31a4ecb01eeae808323a11621173f684f64cd35b76b5fe876abfaf694095fee9",
        "chain_proposal_index": 9,
        "chain_vote_options": {
          "blank": 0,
          "YES": 1,
          "NO": 2
        },
        "chain_voteplan_id": "145b208b9de264352ae8b7071ee1c59996de01dde03ce8ecd5b44f7f71631cec",
        "chain_vote_starttime": "2020-05-26 19:38:35 +0000 UTC",
        "chain_vote_endtime": "2020-05-26 19:43:35 +0000 UTC",
        "chain_committee_endtime": "2020-05-26 19:48:35 +0000 UTC",
        "chain_voteplan_payload": "Public"
      }
    ]
    
  4. /api/v0/block0 - get the binary content of the genesis block needed for wallet recovery:

    curl 'http://localhost:8000/api/v0/block0'
    
Additionals

There are also some endpoints proxied to the Jörmungadr node Rest service. Are provided in the proxy endpoint for convenience, just to keep the same endpoint in the client. The api docs can be found here

  • /api/v0/account - needed to update the wallet state
  • /api/v0/message - needed to send transactions (wallet recovery, voting, ...)

Directories

Path Synopsis
cmd
internal
kit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL