Comment on page
Types of Proposals
For the section that allows validators to submit network proposals the following types of forms must be created.
- Proposal of type "text"KeyValue TypeDescriptionRequired field?name"text" (fixed value)YvalueT_DICTYvalue.textText valueY{"name": "text","value": {"text": "This is a text proposal"}}
- Proposal of type "revision"KeyValue TypeDescriptionRequired field?name"revision" (fixed value)YvalueT_DICTYvalue.revisionRevision codeY{"name": "revision","value": {"revision": "0x11"}}
- Proposal of type "maliciousScore"KeyValue TypeDescriptionRequired field?name"maliciousScore" (fixed value)YvalueT_DICTYvalue.addressSCORE addressYvalue.type0x0: Freeze, 0x1: UnfreezeY{"name": "maliciousScore","value": {"address": "cx7cc546bf908018b5602b66fa65ff5fdacef45fe0","type": "0x0"}}
- Proposal of type "prepDisqualification"KeyValue TypeDescriptionRequired field?name"prepDisqualification" (fixed value)YvalueT_DICTYvalue.addressEOA address of main/sub P-RepY{"name": "prepDisqualification","value": {"address": "hx7cc546bf908018b5602b66fa65ff5fdacef45fe0"}}
- Proposal of type "stepPrice"KeyValue TypeDescriptionRequired field?name"stepPrice" (fixed value)YvalueT_DICTYvalue.stepPriceAn integer of the step price in loopY{"name": "stepPrice","value": {"stepPrice": "0x2e90edd00"}}
- Proposal of type "stepCosts"name"stepCosts" (fixed value)Required field?valueT_DICTYvalue.costsStep costs to set as a dict. All fields are optional but at least one field should be specified.Yvalue.costs.schemaT_INTSchema version (currently fixed at 1)Nvalue.costs.defaultT_INTDefault cost charged each time transaction is executedNvalue.costs.contractCallT_INTCost to call the smart contract functionNvalue.costs.contractCreateT_INTCost to call the smart contract code generation functionNvalue.costs.contractUpdateT_INTCost to call the smart contract code update functionNvalue.costs.contractSetT_INTCost to store the generated/updated smart contract code per byteNvalue.costs.getT_INTCost to get values from the state database per byteNvalue.costs.getBaseT_INTDefault cost charged each time get is calledNvalue.costs.setT_INTCost to set values newly in the state database per byteNvalue.costs.setBaseT_INTDefault cost charged each time set is calledNvalue.costs.deleteT_INTCost to delete values in the state database per byteNvalue.costs.deleteBaseT_INTDefault cost charged each time delete is calledNvalue.costs.inputT_INTCost charged for input data included in transaction per byteNvalue.costs.logT_INTCost to emit event logs per byteNvalue.costs.logBaseT_INTDefault cost charged each time log is calledNvalue.costs.apiCallT_INTCost charged for heavy API calls (e.g. hash functions)N{"name": "stepCosts","value": {"costs": {"default": "0x186a0", "set": "0x140"}}}
- Proposal of type "rewardFund"KeyValue TypeDescriptionRequired field?name"rewardFund" (fixed value)YvalueT_DICTYvalue.iglobalThe total amount of monthly reward fund in loopY{"name": "rewardFund","value": {"iglobal": "0x27b46536c66c8e3000000"}}
- Proposal of type "rewardFundsAllocation"KeyValue TypeDescriptionRequired field?name"rewardFundsAllocation" (fixed value)YvalueT_DICTYvalue.rewardFundsReward fund values information to set. All values are required.Yvalue.rewardFunds.iprepT_INTThe percentage allocated to the P-Rep from the monthly reward fundYvalue.rewardFunds.icpsT_INTThe percentage allocated to the CPS from the monthly reward fundYvalue.rewardFunds.irelayT_INTThe percentage allocated to the BTP relay from the monthly reward fundYvalue.rewardFunds.ivoterT_INTThe percentage allocated to the Voter from the monthly reward fundY{"name": "rewardFundsAllocation","value": {"rewardFunds": {"iprep": "0x10","icps": "0xa","irelay": "0xa","ivoter": "0x40"}}}
- Proposal of type "networkScoreDesignation"KeyValue TypeDescriptionRequired field?name"networkScoreDesignation" (fixed value)YvalueT_DICTYvalue.networkScoresT_LIST[T_DICT]network SCORE values to set. If the address is an empty string, deallocate network SCORE.Yvalue.networkScores.role"cps" or "relay"Yvalue.networkScores.addressnetwork SCORE addressY{"name": "networkScoreDesignation","value": {"networkScores": [{"role": "cps","address": "cx7cc546bf908018b5602b66fa65ff5fdacef45fe0"}]}}
- Proposal of type "networkScoreUpdate"KeyValue TypeDescriptionRequired field?name"networkScoreUpdate" (fixed value)YvalueT_DICTYvalue.addressnetwork SCORE address to updateYvalue.contentSCORE code in hexadecimal stringYvalue.paramsParameters passed to score on updateN{"name": "networkScoreUpdate","value": {"address": "cx7cc546bf908018b5602b66fa65ff5fdacef45fe0","content": "0x504b0304107082bc2bf352a000000280...00000504b03041400080808000000210000000","params": ["0x10", "Hello"]}}
- Proposal of type "accumulatedValidationFailureSlashingRate"KeyValue TypeDescriptionRequired field?name"accumulatedValidationFailureSlashingRate" (fixed value)YvalueT_DICTYvalue.slashingRateslashing rate [0 ~ 100]Y{"name": "accumulatedValidationFailureSlashingRate","value": {"slashingRate": "0x5"}}
- Proposal of type "missedNetworkProposalVoteSlashingRate"KeyValue TypeDescriptionRequired field?name"missedNetworkProposalVoteSlashingRate" (fixed value)YvalueT_DICTYvalue.slashingRateslashing rate [0 ~ 100]Y{"name": "missedNetworkProposalVoteSlashingRate","value": {"slashingRate": "0x5"}}
- Proposal of type "call"KeyValue TypeDescriptionRequired field?name"customCall" (fixed value)YvalueT_DICTYvalue.toSCORE addressYvalue.methodmethod nameYvalue.paramsparameters?value.params.typetype of parameter?value.params.valuevalue?value.params.fieldsT_DICT[T_STR]empty if parameter type is not struct or []struct. It has the keys of the struct as keys, and the types of values as values.?{"name": "call","value": {"to": "cx0000000000000000000000000000000000000000","method": "someMethod","params": [{"type": "str","value": "Alice"},{"type": "struct","value": {"nickName": "Bob","address": "hxb6b5791be0b5ef67063b3c10b840fb81514db2fd"},"fields": {"nickName": "str","address": "Address"}}]}}
Last modified 7mo ago