diff --git a/web3rpc/rpc-specs/components/schemas/common/Common.yaml b/web3rpc/rpc-specs/components/schemas/common/Common.yaml index 17ea682ed..dbe1e962d 100644 --- a/web3rpc/rpc-specs/components/schemas/common/Common.yaml +++ b/web3rpc/rpc-specs/components/schemas/common/Common.yaml @@ -2041,3 +2041,25 @@ components: "transactionsRoot": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "voteData": "0x" } + StateOverrideSet: + type: object + description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. + properties: + balance: + type: integer + format: int64 + description: (optional) Fake balance to set for the account before executing the call. + nonce: + type: integer + format: int64 + description: (optional) Fake nonce to set for the account before executing the call. + code: + type: string + format: DATA + description: (optional) Fake EVM bytecode to inject into the account before executing the call. + state: + type: object + description: (optional) Fake key-value mapping to override all slots in the account storage before executing the call. + stateDiff: + type: object + description: (optional) Fake key-value mapping to override individual slots in the account storage before executing the call. diff --git a/web3rpc/rpc-specs/paths/eth/transaction/call.yaml b/web3rpc/rpc-specs/paths/eth/transaction/call.yaml index c7b1b5e1c..a53dbafd1 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/call.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/call.yaml @@ -39,7 +39,7 @@ paths: description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. required: false schema: - $ref: "#/components/schemas/StateOverrideSet" + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" requestBody: content: @@ -96,32 +96,9 @@ components: BlockNumberOrTag: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrTag" StateOverrideSet: - $ref: "#/components/schemas/StateOverrideSet" + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0xca7a99380131e6c76cfa622396347107aeedca2d", "to": "0xbE3892d33620bE5aca8c75D39e7401871194d290", "input": "0x2e64cec1"}, "latest", {"0xbE3892d33620bE5aca8c75D39e7401871194d290": {"code":"0x6080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e64cec114604e5780636057361d146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a9565b005b60008054905090565b80600081905550505600a165627a7a723058207783dba41884f73679e167576362b7277f88458815141651f48ca38c25b498f80029"}}] - StateOverrideSet: - type: object - description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. - properties: - balance: - type: integer - format: int64 - description: (optional) Fake balance to set for the account before executing the call. - nonce: - type: integer - format: int64 - description: (optional) Fake nonce to set for the account before executing the call. - code: - type: string - format: DATA - description: (optional) Fake EVM bytecode to inject into the account before executing the call. - state: - type: object - description: (optional) Fake key-value mapping to override all slots in the account storage before executing the call. - stateDiff: - type: object - description: (optional) Fake key-value mapping to override individual slots in the account storage before executing the call. - KlayCallResp: type: object properties: diff --git a/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml index b4022fe31..5d75032bb 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml @@ -28,6 +28,12 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/EthCallObject" + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + requestBody: content: @@ -74,15 +80,28 @@ components: properties: method: type: string - default: 'eth_estimateGas' + default: "eth_estimateGas" params: type: array items: properties: - EthCallObject: - description: The transaction call object. See the next table for the object's properties. - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/EthCallObject" - example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" + example: + [ + { + "from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", + "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", + "gas": "0x100000", + "gasPrice": "0x5d21dba00", + "value": "0x0", + "input": "0x8ada066e", + }, + ] EthEstimateGasResp: type: object @@ -92,4 +111,3 @@ components: format: hex description: The amount of gas used. example: "0x5208" - diff --git a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml index 9eb5d807a..2c4ffd8ac 100644 --- a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml @@ -19,6 +19,12 @@ paths: **NOTE:** In versions earlier than Kaia v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Kaia v1.10.0. To query the initial chain configuration, use getChainConfigAt(0) instead. + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `governance_getChainConfig` tags: diff --git a/web3rpc/rpc-specs/paths/governance/getParams.yaml b/web3rpc/rpc-specs/paths/governance/getParams.yaml index c951eb5de..a5990a84e 100644 --- a/web3rpc/rpc-specs/paths/governance/getParams.yaml +++ b/web3rpc/rpc-specs/paths/governance/getParams.yaml @@ -23,6 +23,12 @@ paths: **NOTE:** The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future governance parameters are subject to change via additional governance votes or GovParam contract state changes. + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `governance_getParams` tags: diff --git a/web3rpc/rpc-specs/paths/governance/vote.yaml b/web3rpc/rpc-specs/paths/governance/vote.yaml index 04de82b83..d751dcb12 100644 --- a/web3rpc/rpc-specs/paths/governance/vote.yaml +++ b/web3rpc/rpc-specs/paths/governance/vote.yaml @@ -18,6 +18,26 @@ paths: The vote method submits a new vote. If the node has the right to vote based on governance mode, the vote can be placed. If not, an error message will be returned and the vote will be ignored. **JSONRPC:** `governance_vote` + The vote method submits a new vote. If the node has the right to vote based on governance mode, the vote can be placed. If not, an error message will be returned and the vote will be ignored. + + You can vote for the parameters listed in kaia_getParams, except immutable items. Immutable items are first decided at the genesis configuration and remain unchanged. + + In addition to the parameters described in kaia_getParams, you can vote for validator council changes using the values below. + + + + + + + + + + + + + + +
Key<Value
governance.addvalidatorADDRESS. An address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2, 0xf39fd6e51aad88f6f4ce6a88827279cFfB92266
governance.removevalidatorADDRESS. An address or comma-separated list of addresses of a current validator to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
tags: - governance @@ -100,97 +120,6 @@ components: schemas: Value: type: string - description: | - Various types of value for each key. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyDescription
"governance.governancemode"STRING. One of the three governance modes. "none", "single", "ballot"
"governance.governingnode"ADDRESS. Designated governing node's address. It only works if the governance mode is "single" e.g.,"0xe733cb4d279da696f30d470f8c04decb54fcb0d2"
"governance.unitprice"NUMBER. Price of unit gas. e.g., 25000000000
"governance.addvalidator"ADDRESS. Address of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"governance.removevalidator"ADDRESS. Address of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"governance.deriveshaimpl"NUMBER. Policy to generate the transaction hash and receipt hash in a block header. See here for available options. e.g., 2 (DeriveShaConcat)
"governance.govparamcontract"ADDRESS. Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"istanbul.epoch"NUMBER. A period in which votes are gathered in blocks. When an epoch end, all votes which haven't been passed will be cleared. e.g., 86400
"istanbul.committeesize"NUMBER. The number of validators in a committee.(sub in chain configuration) e.g., 7
"reward.mintingamount"STRING. Amount of Peb minted when a block is generated. Double quotation marks are needed for a value. e.g., "9600000000000000000"
"reward.ratio"STRING. Distribution rate for a CN/KGF/KIR separated by "/". The sum of all values has to be 100. e.g., "50/40/10" meaning CN 50%, KGF 40%, KIR 10%
"reward.kip82ratio"STRING. Distribution ratio of the block proposer to stakers separated by "/". The sum of all values has to be "100". See KIP-82 for further details. e.g., "20/80" means that the proposer takes 20% while stakers take 80%.
"reward.useginicoeff"BOOL. Use the Gini coefficient or not. true, false
"reward.deferredtxfee"BOOL. The way of giving transaction fee to a proposer. If true, it means the tx fee will be summed up with block reward and distributed to the proposer, KIR and KGF. If not, all tx fee will be given to the proposer. true, false
"reward.minimumstake"STRING. Amount of Kaia required to be a CN (Consensus Node). Double quotation marks are needed for a value. e.g., "5000000"
"kip71.lowerboundbasefee"NUMBER. The lowest possible base fee. See KIP-71 for further details. e.g., 25000000000
"kip71.upperboundbasefee"NUMBER. The highest possible base fee. e.g., 750000000000
"kip71.gastarget"NUMBER. The block gas that base fee wants to achieve. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
"kip71.basefeedenominator"NUMBER. Controls how fast base fee changes. e.g., 20
"kip71.maxblockgasusedforbasefee"NUMBER. The maximum block gas perceived in base fee calculation. e.g., 60000000
+ description: Various types of value for each key. \ No newline at end of file diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml index 3fda6b855..6ef81b9b8 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml @@ -15,8 +15,18 @@ paths: operationId: ..getChainConfig summary: "[Configuration] kaia_getChainConfig" description: | - Returns the configuration of the chain. + Returns the chain configuration at the given block number. + See kaia_getParams for the list of parameters. + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `kaia_getChainConfig` tags: - kaia diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml index 91b417319..65fd9ea56 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml @@ -19,6 +19,118 @@ paths: NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
governance.governancemodeSTRING. One of the three governance modes, "none", "single", "ballot". this parameter is immutable.
governance.governingnodeADDRESS. Designated governing node's address. Only works with "single" governance mode. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.unitpriceNUMBER. Pre-Magma fixed gas price in kei. e.g., 25000000000 (25 gkei/gas)
governance.addvalidatorADDRESS. Address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
governance.removevalidatorADDRESS. Address or comma-separated list of addresses of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.deriveshaimplNUMBER. One of the three methods for generating the transaction hash and receipt hash in a block header. 0 (Original), 1 (Simple), 2 (Concat).
governance.govparamcontractADDRESS. (since Kore) Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
istanbul.epochNUMBER. The voting period in header-based governance. This parameter is immutable. e.g., 86400
istanbul.committeesizeNUMBER. The maximum number of validators in a committee. (also known as istanbul.sub in ChainConfig)
istanbul.policyNUMBER. One of three proposer selection policies, 0 (RoundRobin), 1 (Sticky), 2 (WeightedRandom). This parameter is immutable.
reward.mintingamountSTRING. Minted rewards per block in kei. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 9600000000000000000 (9.6 KAIA/block)
reward.ratioSTRING. Reward distribution ratio among GC/KIF/KEF. Three integers separated by "/" that adds up to 100. e.g., 50/40/10
reward.kip82ratioSTRING. (Since Kore) Reward distribution between block proposer and stakers. Two integers separated by "/" that adds up to 100. e.g., 20/80.
reward.useginicoeffBOOL. (Before Kore) If true, proposer selection algorithm adjusts the staking amounts using Gini coefficient. This parameter is immutable. This parameter is no longer used since Kore, so false is displayed in the APIs. e.g., true
reward.deferredtxfeeBOOL. If false, transaction fees sent to the proposer after executing each transaction. If true, transaction fees are summed up with other rewards and given to the proposer after executing all transactions. This field is immutable.
reward.minimumstakeSTRING. Minimum staking amount in KAIA to be a validator (i.e. CN). This parameter is immutable. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 5000000 (5 million KAIA)
reward.proposerupdateintervalNUMBER. (Before Randao) Size of the proposer selection batch. This parameter is immutable. This parameter is no longer used since Kore, so 1 is displayed in the APIs. e.g., 3600
reward.stakingupdateintervalNUMBER. (Before Kaia) The block interval in which staking information is updated. This parameter is immutable. This parameter is no longer used since Kaia, so 1 is displayed in the APIs. e.g., 86400
kip71.lowerboundbasefeeNUMBER. The lowest possible base fee in kei. e.g., 25000000000
kip71.upperboundbasefeeNUMBER. The highest possible base fee in kei. e.g., 750000000000
kip71.gastargetNUMBER. The target, or neutral, block gasUsed. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
kip71.basefeedenominatorNUMBER. Controls how fast the base fee changes. e.g., 20
kip71.maxblockgasusedforbasefeeNUMBER. The maximum block gas recognized in base fee calculation. e.g., 60000000
+ + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `kaia_getParams` tags: @@ -103,4 +215,4 @@ paths: - lang: "Python" label: "Python" source: - $ref: "../../../code-samples/python/kaia/configuration/getParams.py" + $ref: "../../../code-samples/python/kaia/configuration/getParams.py" \ No newline at end of file diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml index cd1d80159..49c510bb2 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml @@ -28,7 +28,11 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" - + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" requestBody: content: application/json: @@ -36,6 +40,7 @@ paths: allOf: - $ref: "../../../components/requests/JsonRpcRequest.yaml#/components/schemas/JsonRpcRequest" - $ref: "#/components/schemas/KaiaEstimateGasReq" + responses: 200: @@ -46,6 +51,7 @@ paths: allOf: - $ref: "../../../components/responses/JsonRpcResponse.yaml#/components/schemas/JsonRpcResponse" - $ref: "#/components/schemas/KaiaEstimateGasResp" + x-codeSamples: - lang: "Shell" @@ -79,9 +85,13 @@ components: params: type: array items: - allOf: - - title: callObject - - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + properties: + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] KaiaEstimateGasResp: diff --git a/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml b/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml index e87bfa31d..296a7d36b 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml @@ -16,7 +16,15 @@ paths: summary: "[Configuration] klay_getChainConfig" description: | Returns the configuration of the chain. + + See klay_getParams for the list of parameters. + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `klay_getChainConfig` tags: - klay diff --git a/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml b/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml index 1afd59bc4..4da82e681 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml @@ -15,10 +15,122 @@ paths: operationId: $getParams summary: "klay_getParams" description: | - Returns the governance parameters effective at the given block. + Returns the governance parameters effective at the given block. NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
governance.governancemodeSTRING. One of the three governance modes, "none", "single", "ballot". this parameter is immutable.
governance.governingnodeADDRESS. Designated governing node's address. Only works with "single" governance mode. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.unitpriceNUMBER. Pre-Magma fixed gas price in kei. e.g., 25000000000 (25 gkei/gas)
governance.addvalidatorADDRESS. Address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
governance.removevalidatorADDRESS. Address or comma-separated list of addresses of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.deriveshaimplNUMBER. One of the three methods for generating the transaction hash and receipt hash in a block header. 0 (Original), 1 (Simple), 2 (Concat).
governance.govparamcontractADDRESS. (since Kore) Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
istanbul.epochNUMBER. The voting period in header-based governance. This parameter is immutable. e.g., 86400
istanbul.committeesizeNUMBER. The maximum number of validators in a committee. (also known as istanbul.sub in ChainConfig)
istanbul.policyNUMBER. One of three proposer selection policies, 0 (RoundRobin), 1 (Sticky), 2 (WeightedRandom). This parameter is immutable.
reward.mintingamountSTRING. Minted rewards per block in kei. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 9600000000000000000 (9.6 KAIA/block)
reward.ratioSTRING. Reward distribution ratio among GC/KIF/KEF. Three integers separated by "/" that adds up to 100. e.g., 50/40/10
reward.kip82ratioSTRING. (Since Kore) Reward distribution between block proposer and stakers. Two integers separated by "/" that adds up to 100. e.g., 20/80.
reward.useginicoeffBOOL. (Before Kore) If true, proposer selection algorithm adjusts the staking amounts using Gini coefficient. This parameter is immutable. This parameter is no longer used since Kore, so false is displayed in the APIs. e.g., true
reward.deferredtxfeeBOOL. If false, transaction fees sent to the proposer after executing each transaction. If true, transaction fees are summed up with other rewards and given to the proposer after executing all transactions. This field is immutable.
reward.minimumstakeSTRING. Minimum staking amount in KAIA to be a validator (i.e. CN). This parameter is immutable. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 5000000 (5 million KAIA)
reward.proposerupdateintervalNUMBER. (Before Randao) Size of the proposer selection batch. This parameter is immutable. This parameter is no longer used since Kore, so 1 is displayed in the APIs. e.g., 3600
reward.stakingupdateintervalNUMBER. (Before Kaia) The block interval in which staking information is updated. This parameter is immutable. This parameter is no longer used since Kaia, so 1 is displayed in the APIs. e.g., 86400
kip71.lowerboundbasefeeNUMBER. The lowest possible base fee in kei. e.g., 25000000000
kip71.upperboundbasefeeNUMBER. The highest possible base fee in kei. e.g., 750000000000
kip71.gastargetNUMBER. The target, or neutral, block gasUsed. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
kip71.basefeedenominatorNUMBER. Controls how fast the base fee changes. e.g., 20
kip71.maxblockgasusedforbasefeeNUMBER. The maximum block gas recognized in base fee calculation. e.g., 60000000
+ + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `klay_getParams` tags: diff --git a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml index 066462cd1..a44166815 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml @@ -28,7 +28,11 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KlayCallObject" - + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" requestBody: content: application/json: @@ -79,9 +83,13 @@ components: params: type: array items: - allOf: - - title: callObject - - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KlayCallObject" + properties: + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] KlayEstimateGasResp: