From cfbbcd468f38065fa24b82934532d72c88c128fb Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Wed, 8 May 2024 11:41:51 +0200 Subject: [PATCH 1/7] added 0.12.0 release notes --- doc/release/0.12.0.md | 133 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 126 insertions(+), 7 deletions(-) diff --git a/doc/release/0.12.0.md b/doc/release/0.12.0.md index dd845f4acb..b375cbfd18 100644 --- a/doc/release/0.12.0.md +++ b/doc/release/0.12.0.md @@ -4,16 +4,135 @@ ## Notes about new/updated Features ---- -## Bug Fixes +### Stake V2 ---- +A new stake management will be activated, with two main targets: -## Improvements - ---- -## Update test instructions from previous version +- Switch from a “UTXO based” to an “Account based” model (no more stakeId assigned to each delegation operation, but just a balance assigned to each pair [forger,delegator]) +- Allow the possibility to redirect earnings to a smart-contract, which will be responsible for rewards distribution among the delegators. + +Notable changes: +- The old stake native smart contract will be deprecated/deactivated. +A new native smart contract will be activated. +Methods exposed will allow to: + + - Introduce a preliminary registration step for forgers: will be performed by executing a transaction declaring the forger public keys (VRF key and block sign key), the percentage of rewards to be redirected to a smart contract responsible to manage the delegators’ rewards (named “reward share”), and the address of that smart contract. (The last two fields will be optional). + An additional signature will be required with the method to prove the sender is the effective owner of the forger keys: for this reason the preferred way is to use the new http endpoint /transaction/registerForger to invoke the tx based on the local wallet data (it will handle automatically the additional signature). A method is also available in the native smart contract, but currently there is no way to generate a vrf signature from outside the node (it requires the cryptolib, and we don’t have the layer to invoke it from javascript) + - A minimum amount of 10 ZEN will be required to be sent with the transaction: it will be converted automatically into the first stake assigned to the forger. + - The registration step will not be required for existing forgers owning a stake before the hardfork: they will be automatically added to the list of registered ones, with “reward share” = 0 and “smart contract address” = none. + - Introduce an updateForger() method to allow forgers with “reward share” = 0 and “smart contract address” = none to update the fields .The update will be allowed only one time: once set, the values will be immutable. This protects delegators from distribution mechanisms being changed without their knowledge. + - Modify the consensus lottery to consider only forgers owning an amount of stakes (directly or delegated) equals or over to 10 ZEN. + +The following changes will happen in the http endpoints: +- /transaction/allForgingStakes and /transaction/myForgingStakes +Same format as now, but the output field stakeId will no more be present +- /transaction/makeForgerStake
+**DEPRECATED** (creation of a new stake will be doable only by calling the native smart contract method delegate) +- /transaction/spendForgingStake
+**DEPRECATED** (withdraw of a stake will be doable only by calling the native smart contract method withdraw) + +The following addition will be included in:
+ +Endpoint: /block/getFeePayments
+Rpc endpoint: zen_getFeePayments
+ +Their result will keep the same format as now, but will also include the reward paid to the address of the smart contracts (if defined). + +We will also detail the amount coming from the mainchain redistribution: to be retrocompatible they will be into additional fields valueFromMainchain and valueFromFees: + +``` +{ + "result" : { + "feePayments" : [ + { + "address" : "c49dedc85a2c360fea781bcea2bc5d58fde19", + "value" : 2000000 -> total + "valueFromMainchain:": 500000 -> part from the mainchain + "valueFromFees": 1500000 -> part from the fees + } + ] + } +} +``` +### Reward from mainchain - new rules + +The maximum ZEN amount redistributed to forgers from the special address 0x000000000000000000003333333333333333333 in a single withdrawal epoch is now limited to a maximum value expressed by the following formula: + +- MAX_VALUE_REDISTRIBUTED = sum [10% of Mainchain’s block-reward Coinbase of each mainchain block reference included in the withdrawal epoch] + +- Funds over the limit will stay in the address balance and will be redistributed in the following epochs. + +For example:
+Current Mainchain block reward: 6.25 ZEN
+Number of mainchain block-reference in a withdrawal epoch: 100
+MAX_VALUE_REDISTRIBUTED = 10%(6.25) * 100 = 62.5 ZEN
+ +### Updates in RPC endpoints + +- web3_clientVersion now returns also the EON version, in the following format: +EON_VERSION/SDK_VERSION/ARCHITECTURE/JAVA_VERSION + +- Better error handling: in case of error the response status code will be 400 instead of 200. + +- In case of batch requests, the response is now always an array, even with a batch composed of only one element. Previously, if the batch request was composed by only one element, the response was an object. + +### New metrics endpoint +A new endpoint can be optionally exposed (on a different port from the serverAPI) to show some node metrics. +To configure it, you can add the following new fragment in the settings file (fragment is optional, the value displayed are the defaults): +``` +metricsApi { + enabled = false + bindAddress = "127.0.0.1:9088" + timeout = 5s + #apiKeyHash = "" +} +``` + +If using docker, the configuration is also supported through the following optional env variables: + +- SCNODE_METRICS_ENABLED: set to true to enable metric endpoint (default: false) +- SCNODE_METRICS_PORT: specify the port where the endpoint will be exposed (default: 9088) +- SCNODE_METRICS_REST_PASSWORD: if set, the endpoint will be protected and require the BCrypt hash of the specified password (same basic authentication method used in rest-API) + +Format: + +The metrics will be exposed in an http endpoint /metrics, in Prometheus format, one line per metric, in this format: + +``` +metric_id value +``` + +Available metrics: + +Following metrics will be available (also listed in the endpoint /metrics/help): + +- **block_apply_time**
+Time to apply block to node wallet and state (milliseconds) +- **block_apply_time_fromslotstart**
+Delta between timestamp when block has been applied successfully on this node and start timestamp of the slot it belongs to (milliseconds) +- **block_applied_ok**
+Number of received blocks applied successfully (absolute value since start of the node) +- **block_applied_ko**
+Number of received blocks not applied (absolute value since start of the node) +- **mempool_size**
+Mempool size (number of transactions in this node mempool) +- **forge_block_count**
+Number of forged blocks by this node (absolute value since start of the node) +- **forge_lottery_time**
+Time to execute the lottery (milliseconds) +- **forge_blockcreation_time**
+Time to create a new forged block (calculated from the start timestamp of the slot it belongs to) (milliseconds) + +### Updates in EON forger nodes connection policy + +Default value for the property: + +maxForgerConnections + +Has been increased from 20 to 100. +(Remember this only applies if no value is set explicitly in conf / docker env). +Furthermore, the dedicated connection pool for forgers nodes (governed by the above property) now only applies if the node is itself a forger. --- Full [Changelog](/CHANGELOG.md) file here From e0185eb698bb920973ed1507cf0920550b259b4d Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Wed, 8 May 2024 11:45:07 +0200 Subject: [PATCH 2/7] fix release notes --- doc/release/0.12.0.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/release/0.12.0.md b/doc/release/0.12.0.md index b375cbfd18..b997a69b34 100644 --- a/doc/release/0.12.0.md +++ b/doc/release/0.12.0.md @@ -6,7 +6,7 @@ ### Stake V2 -A new stake management will be activated, with two main targets: +Support for new stake management, with two main targets: - Switch from a “UTXO based” to an “Account based” model (no more stakeId assigned to each delegation operation, but just a balance assigned to each pair [forger,delegator]) - Allow the possibility to redirect earnings to a smart-contract, which will be responsible for rewards distribution among the delegators. @@ -88,12 +88,6 @@ metricsApi { } ``` -If using docker, the configuration is also supported through the following optional env variables: - -- SCNODE_METRICS_ENABLED: set to true to enable metric endpoint (default: false) -- SCNODE_METRICS_PORT: specify the port where the endpoint will be exposed (default: 9088) -- SCNODE_METRICS_REST_PASSWORD: if set, the endpoint will be protected and require the BCrypt hash of the specified password (same basic authentication method used in rest-API) - Format: The metrics will be exposed in an http endpoint /metrics, in Prometheus format, one line per metric, in this format: From 63ce6ef18aea1e9bc6ffedaf538762ccce47434c Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Wed, 8 May 2024 11:48:58 +0200 Subject: [PATCH 3/7] updated changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e38b6ec93..274d9fa8b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ **0.12.0** 1. Sparkz dependency updated to 2.4.0 + * Updates in EON forger nodes connection policy (see release notes for further info) +2. New stake managemet support (see release notes for further info) +3. Reward from mainchain - new rules (see release notes for further info) +4. Added metrics endpoint +5. Minor fixes: + * [eth RPC endpoint] web3_clientVersion now returns also the EON version + * [eth RPC endpoint] Better error handling: in case of error the response status code will be 400 instead of 200 + * [eth RPC endpoint] In case of batch requests, the response is now always an array, even with a batch composed of only one element. **0.11.0** 1. Sparkz dependency updated to 2.3.0 From 4abbfca5fbc76d828500a0ae4626d3661327c8bd Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Wed, 8 May 2024 14:44:49 +0200 Subject: [PATCH 4/7] yaml file --- .../resources/account/api/accountApi.yaml | 260 +++++++++++++++++- 1 file changed, 258 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/resources/account/api/accountApi.yaml b/sdk/src/main/resources/account/api/accountApi.yaml index c3520557ce..e89129aa2a 100644 --- a/sdk/src/main/resources/account/api/accountApi.yaml +++ b/sdk/src/main/resources/account/api/accountApi.yaml @@ -646,7 +646,7 @@ paths: tags: - transaction summary: creates transaction with forger stake - description: Creates transaction with forger stake. + description: Creates transaction with forger stake. It will be disabled after Forger Stake V2 will be activated. operationId: makeForgerStake security: - basicAuth: [] @@ -707,7 +707,7 @@ paths: tags: - transaction summary: creates and signs sidechain transaction for spending forging stake - description: Creates and signs sidechain transaction for spending forging stake. + description: Creates and signs sidechain transaction for spending forging stake. It will be disabled after Forger Stake V2 will be activated. operationId: spendForgingStake security: - basicAuth: [] @@ -1389,6 +1389,261 @@ paths: application/json: schema: $ref: '#/components/schemas/SidechainApiError' + + /transaction/registerForger: + post: + tags: + - transaction + summary: Register a new forger + description: Register a new forger. + operationId: registerForger + requestBody: + content: + application/json: + schema: + type: object + required: + - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress, stakedAmount + properties: + blockSignPubKey: + type: string + description: Key of this forger (private key must be in the local wallet) + vrfPubKey: + type: string + description: Vrfkey of this forger(private key must be in the local wallet) + rewardShare: + type: integer + description: Reward to be redirected to a separate reward address (integer, range from 0 to 1000 - where 1000 represents 100%) + rewarAddress: + type: string + description: External reward address (may be a single EOA or (more likely) a smart contract handling rewards distribution to delegators) | + stakedAmount: + type: integer + description: Amount to be assigned as first stake to this forger. Specified in zennies, and must be >= 10 ZEN + gasInfo: + $ref: '#/components/schemas/EIP1559GasInfo' + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + properties: + result: + type: object + properties: + transactionId: + type: string + error: + $ref: '#/components/schemas/SidechainApiErrorResponse' + default: + description: any kind of http error + content: + application/json: + schema: + $ref: '#/components/schemas/SidechainApiError' + + /transaction/updateForger: + post: + tags: + - transaction + summary: Update an existing forger + description: Update an existing forger. This action can be performed only for forgers with rewardShare = 0 and rewardAddress not set, and only to assign them a value. + operationId: updateForger + requestBody: + content: + application/json: + schema: + type: object + required: + - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress + properties: + blockSignPubKey: + type: string + description: Key of this forger (private key must be in the local wallet) + vrfPubKey: + type: string + description: Vrfkey of this forger(private key must be in the local wallet) + rewardShare: + type: integer + description: Reward to be redirected to a separate reward address (integer, range from 0 to 1000 - where 1000 represents 100%) + rewarAddress: + type: string + description: External reward address (may be a single EOA or (more likely) a smart contract handling rewards distribution to delegators) | + gasInfo: + $ref: '#/components/schemas/EIP1559GasInfo' + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + properties: + result: + type: object + properties: + transactionId: + type: string + error: + $ref: '#/components/schemas/SidechainApiErrorResponse' + default: + description: any kind of http error + content: + application/json: + schema: + $ref: '#/components/schemas/SidechainApiError' + + /transaction/pagedForgingStakes: + post: + tags: + - transaction + summary: Returns the paginated list of forging stakes. + description: Returns the paginated list of forging stakes. + operationId: pagedForgingStakes + requestBody: + content: + application/json: + schema: + type: object + required: + - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress + properties: + startPos: + type: integer + description: Start position in the paginated list + default: 0 + size: + type: integer + description: Number of records to return + default: 10 + gasInfo: + $ref: '#/components/schemas/EIP1559GasInfo' + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + properties: + result: + type: object + properties: + transactionId: + type: string + error: + $ref: '#/components/schemas/SidechainApiErrorResponse' + default: + description: any kind of http error + content: + application/json: + schema: + $ref: '#/components/schemas/SidechainApiError' + + /transaction/pagedForgerStakesByDelegator: + post: + tags: + - transaction + summary: Returns the paginated list of forging stakes, filtered by a specific delegator. + description: Returns the paginated list of forging stakes, filtered by a specific delegator. + operationId: pagedForgerStakesByDelegator + requestBody: + content: + application/json: + schema: + type: object + required: + - delegatorAddress + properties: + delegatorAddress: + type: string + description: Delegator address + startPos: + type: integer + description: Start position in the paginated list + default: 0 + size: + type: integer + description: Number of records to return + default: 10 + gasInfo: + $ref: '#/components/schemas/EIP1559GasInfo' + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + properties: + result: + type: object + properties: + transactionId: + type: string + error: + $ref: '#/components/schemas/SidechainApiErrorResponse' + default: + description: any kind of http error + content: + application/json: + schema: + $ref: '#/components/schemas/SidechainApiError' + + /transaction/pagedForgerStakesByForger: + post: + tags: + - transaction + summary: Returns the paginated list of forging stakes, filtered by a specific forger. + description: Returns the paginated list of forging stakes, filtered by a specific forger. + operationId: pagedForgerStakesByForger + requestBody: + content: + application/json: + schema: + type: object + required: + - blockSignPubKey, vrfPubKey + properties: + blockSignPubKey: + type: string + description: blockSignPubKey identifying the forger + vrfPubKey: + type: string + description: vrfPubKey identifying the forger + startPos: + type: integer + description: Start position in the paginated list + default: 0 + size: + type: integer + description: Number of records to return + default: 10 + gasInfo: + $ref: '#/components/schemas/EIP1559GasInfo' + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + properties: + result: + type: object + properties: + transactionId: + type: string + error: + $ref: '#/components/schemas/SidechainApiErrorResponse' + default: + description: any kind of http error + content: + application/json: + schema: + $ref: '#/components/schemas/SidechainApiError' # Sidechain wallet operations /wallet/createPrivateKey25519: @@ -3618,6 +3873,7 @@ components: stakeId: type: string format: byte + nullable: true forgerStakeData: type: object properties: From 9520d18977d4f09e7e36552567390d9045cb2752 Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Fri, 10 May 2024 10:12:43 +0200 Subject: [PATCH 5/7] updated yaml --- .../resources/account/api/accountApi.yaml | 83 ++++++++++++++++--- 1 file changed, 71 insertions(+), 12 deletions(-) diff --git a/sdk/src/main/resources/account/api/accountApi.yaml b/sdk/src/main/resources/account/api/accountApi.yaml index e89129aa2a..3a426d5cbf 100644 --- a/sdk/src/main/resources/account/api/accountApi.yaml +++ b/sdk/src/main/resources/account/api/accountApi.yaml @@ -1531,10 +1531,41 @@ paths: result: type: object properties: - transactionId: - type: string - error: - $ref: '#/components/schemas/SidechainApiErrorResponse' + nextPos: + type: integer + stakes: + type: array + items: + type: object + properties: + forgerStakeData: + type: object + properties: + forgerPublicKeys: + type: object + properties: + blockSignPublicKey: + type: object + properties: + publicKey: + type: string + vrfPublicKey: + type: object + properties: + publicKey: + type: string + ownerPublicKey: + type: object + properties: + address: + type: string + stakedAmount: + type: integer + + + + + default: description: any kind of http error content: @@ -1581,10 +1612,28 @@ paths: result: type: object properties: - transactionId: - type: string - error: - $ref: '#/components/schemas/SidechainApiErrorResponse' + nextPos: + type: integer + stakes: + type: array + items: + type: object + properties: + forgerPublicKeys: + type: object + properties: + blockSignPublicKey: + type: object + properties: + publicKey: + type: string + vrfPublicKey: + type: object + properties: + publicKey: + type: string + stakedAmount: + type: integer default: description: any kind of http error content: @@ -1634,10 +1683,20 @@ paths: result: type: object properties: - transactionId: - type: string - error: - $ref: '#/components/schemas/SidechainApiErrorResponse' + nextPos: + type: integer + stakes: + type: array + items: + type: object + properties: + delegator: + type: object + properties: + address: + type: string + stakedAmount: + type: integer default: description: any kind of http error content: From 0f465c2b5c363f5834252dfa21574e1aa0a92585 Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Tue, 14 May 2024 09:16:49 +0200 Subject: [PATCH 6/7] code review fix --- CHANGELOG.md | 2 +- doc/release/0.12.0.md | 6 +++--- .../main/resources/account/api/accountApi.yaml | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 274d9fa8b6..4f8a732839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ **0.12.0** 1. Sparkz dependency updated to 2.4.0 * Updates in EON forger nodes connection policy (see release notes for further info) -2. New stake managemet support (see release notes for further info) +2. New stake management support (see release notes for further info) 3. Reward from mainchain - new rules (see release notes for further info) 4. Added metrics endpoint 5. Minor fixes: diff --git a/doc/release/0.12.0.md b/doc/release/0.12.0.md index b997a69b34..51c03294e4 100644 --- a/doc/release/0.12.0.md +++ b/doc/release/0.12.0.md @@ -16,11 +16,11 @@ Notable changes: A new native smart contract will be activated. Methods exposed will allow to: - - Introduce a preliminary registration step for forgers: will be performed by executing a transaction declaring the forger public keys (VRF key and block sign key), the percentage of rewards to be redirected to a smart contract responsible to manage the delegators’ rewards (named “reward share”), and the address of that smart contract. (The last two fields will be optional). + - Introduce a preliminary mandatory registration step for forgers: will be performed by executing a transaction declaring the forger public keys (VRF key and block sign key), the percentage of rewards to be redirected to a smart contract responsible to manage the delegators’ rewards (named “reward share”), and the address of that smart contract. (The last two fields will be optional). An additional signature will be required with the method to prove the sender is the effective owner of the forger keys: for this reason the preferred way is to use the new http endpoint /transaction/registerForger to invoke the tx based on the local wallet data (it will handle automatically the additional signature). A method is also available in the native smart contract, but currently there is no way to generate a vrf signature from outside the node (it requires the cryptolib, and we don’t have the layer to invoke it from javascript) - A minimum amount of 10 ZEN will be required to be sent with the transaction: it will be converted automatically into the first stake assigned to the forger. - The registration step will not be required for existing forgers owning a stake before the hardfork: they will be automatically added to the list of registered ones, with “reward share” = 0 and “smart contract address” = none. - - Introduce an updateForger() method to allow forgers with “reward share” = 0 and “smart contract address” = none to update the fields .The update will be allowed only one time: once set, the values will be immutable. This protects delegators from distribution mechanisms being changed without their knowledge. + - Introduce an updateForger() method to allow forgers with “reward share” = 0 and “smart contract address” = none to update the fields. The update will be allowed only one time: once set, the values will be immutable. This protects delegators from distribution mechanisms being changed without their knowledge. - Modify the consensus lottery to consider only forgers owning an amount of stakes (directly or delegated) equals or over to 10 ZEN. The following changes will happen in the http endpoints: @@ -90,7 +90,7 @@ metricsApi { Format: -The metrics will be exposed in an http endpoint /metrics, in Prometheus format, one line per metric, in this format: +The metrics will be exposed in a http endpoint /metrics, in Prometheus format, one line per metric, in this format: ``` metric_id value diff --git a/sdk/src/main/resources/account/api/accountApi.yaml b/sdk/src/main/resources/account/api/accountApi.yaml index 3a426d5cbf..84e15071a1 100644 --- a/sdk/src/main/resources/account/api/accountApi.yaml +++ b/sdk/src/main/resources/account/api/accountApi.yaml @@ -1403,7 +1403,7 @@ paths: schema: type: object required: - - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress, stakedAmount + - blockSignPubKey, vrfPubKey, rewardShare, rewardAddress, stakedAmount properties: blockSignPubKey: type: string @@ -1414,7 +1414,7 @@ paths: rewardShare: type: integer description: Reward to be redirected to a separate reward address (integer, range from 0 to 1000 - where 1000 represents 100%) - rewarAddress: + rewardAddress: type: string description: External reward address (may be a single EOA or (more likely) a smart contract handling rewards distribution to delegators) | stakedAmount: @@ -1457,7 +1457,7 @@ paths: schema: type: object required: - - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress + - blockSignPubKey, vrfPubKey, rewardShare, rewardAddress properties: blockSignPubKey: type: string @@ -1467,8 +1467,8 @@ paths: description: Vrfkey of this forger(private key must be in the local wallet) rewardShare: type: integer - description: Reward to be redirected to a separate reward address (integer, range from 0 to 1000 - where 1000 represents 100%) - rewarAddress: + description: Reward share to be redirected to the specified reward address (integer, range from 0 to 1000 - where 1000 represents 100%) + rewardAddress: type: string description: External reward address (may be a single EOA or (more likely) a smart contract handling rewards distribution to delegators) | gasInfo: @@ -1508,7 +1508,7 @@ paths: schema: type: object required: - - blockSignPubKey, vrfPubKey ,rewardShare, rewarAddress + - blockSignPubKey, vrfPubKey, rewardShare, rewardAddress properties: startPos: type: integer @@ -1522,7 +1522,7 @@ paths: $ref: '#/components/schemas/EIP1559GasInfo' responses: '200': - description: successful operation + description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements. content: application/json: schema: @@ -1603,7 +1603,7 @@ paths: $ref: '#/components/schemas/EIP1559GasInfo' responses: '200': - description: successful operation + description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements. content: application/json: schema: @@ -1674,7 +1674,7 @@ paths: $ref: '#/components/schemas/EIP1559GasInfo' responses: '200': - description: successful operation + description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements. content: application/json: schema: From 2ce7b35f4b777726af4c622d50317058ae8ec947 Mon Sep 17 00:00:00 2001 From: saratnt Date: Tue, 14 May 2024 09:58:56 +0200 Subject: [PATCH 7/7] Fixes --- doc/release/0.12.0.md | 16 +++++------ .../resources/account/api/accountApi.yaml | 28 ++----------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/doc/release/0.12.0.md b/doc/release/0.12.0.md index 51c03294e4..067d2eb67b 100644 --- a/doc/release/0.12.0.md +++ b/doc/release/0.12.0.md @@ -34,11 +34,11 @@ Same format as now, but the output field stakeId will no more be present The following addition will be included in:
Endpoint: /block/getFeePayments
-Rpc endpoint: zen_getFeePayments
+Rpc endpoint: zen_getFeePayments
-Their result will keep the same format as now, but will also include the reward paid to the address of the smart contracts (if defined). +Their result will keep the same format as now, but will also include the reward paid to the address of the smart contracts (if defined). -We will also detail the amount coming from the mainchain redistribution: to be retrocompatible they will be into additional fields valueFromMainchain and valueFromFees: +We will also detail the amount coming from the mainchain redistribution: to be retrocompatible they will be into additional fields valueFromMainchain and valueFromFees: ``` { @@ -56,11 +56,11 @@ We will also detail the amount coming from the mainchain redistribution: to be r ``` ### Reward from mainchain - new rules -The maximum ZEN amount redistributed to forgers from the special address 0x000000000000000000003333333333333333333 in a single withdrawal epoch is now limited to a maximum value expressed by the following formula: +The maximum ZEN amount redistributed to forgers from the special address 0x000000000000000000003333333333333333333 in a single withdrawal epoch is now limited to a maximum value expressed by the following formula: - MAX_VALUE_REDISTRIBUTED = sum [10% of Mainchain’s block-reward Coinbase of each mainchain block reference included in the withdrawal epoch] -- Funds over the limit will stay in the address balance and will be redistributed in the following epochs. +- Funds over the limit will stay in the address balance and will be redistributed in the following epochs. For example:
Current Mainchain block reward: 6.25 ZEN
@@ -74,7 +74,7 @@ EON_VERSION/SDK_VERSION/ARCHITECTURE/JAVA_VERSION - Better error handling: in case of error the response status code will be 400 instead of 200. -- In case of batch requests, the response is now always an array, even with a batch composed of only one element. Previously, if the batch request was composed by only one element, the response was an object. +- In case of batch requests, the response is now always an array, even with a batch composed of only one element. Previously, if the batch request was composed by only one element, the response was an object. ### New metrics endpoint A new endpoint can be optionally exposed (on a different port from the serverAPI) to show some node metrics. @@ -98,7 +98,7 @@ metric_id value Available metrics: -Following metrics will be available (also listed in the endpoint /metrics/help): +Following metrics will be available (also listed in the endpoint /metrics/help): - **block_apply_time**
Time to apply block to node wallet and state (milliseconds) @@ -123,7 +123,7 @@ Default value for the property: maxForgerConnections -Has been increased from 20 to 100. +Has been increased from 20 to 100. (Remember this only applies if no value is set explicitly in conf / docker env). Furthermore, the dedicated connection pool for forgers nodes (governed by the above property) now only applies if the node is itself a forger. diff --git a/sdk/src/main/resources/account/api/accountApi.yaml b/sdk/src/main/resources/account/api/accountApi.yaml index 84e15071a1..0428464d4b 100644 --- a/sdk/src/main/resources/account/api/accountApi.yaml +++ b/sdk/src/main/resources/account/api/accountApi.yaml @@ -1502,24 +1502,6 @@ paths: summary: Returns the paginated list of forging stakes. description: Returns the paginated list of forging stakes. operationId: pagedForgingStakes - requestBody: - content: - application/json: - schema: - type: object - required: - - blockSignPubKey, vrfPubKey, rewardShare, rewardAddress - properties: - startPos: - type: integer - description: Start position in the paginated list - default: 0 - size: - type: integer - description: Number of records to return - default: 10 - gasInfo: - $ref: '#/components/schemas/EIP1559GasInfo' responses: '200': description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements. @@ -1561,10 +1543,6 @@ paths: type: string stakedAmount: type: integer - - - - default: description: any kind of http error @@ -1599,8 +1577,7 @@ paths: type: integer description: Number of records to return default: 10 - gasInfo: - $ref: '#/components/schemas/EIP1559GasInfo' + responses: '200': description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements. @@ -1670,8 +1647,7 @@ paths: type: integer description: Number of records to return default: 10 - gasInfo: - $ref: '#/components/schemas/EIP1559GasInfo' + responses: '200': description: successful operation. If nextPos is == -1 means no additional records, otherwise it is the starting index of the remaining elements.