-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report live value of d
parameter in decentralizationLevel
.
#1693
Milestone
Comments
jonathanknowles
added this to the (ADP-244) Cardano decentralization progress milestone
May 27, 2020
jonathanknowles
changed the title
Report live value of
Report live value of May 28, 2020
k
parameter in decentralizationLevel
.d
parameter in decentralizationLevel
.
4 tasks
@rvl wrote:
|
iohk-bors bot
added a commit
that referenced
this issue
May 28, 2020
1699: Add skeletal `decentralizationLevel` field. r=jonathanknowles a=jonathanknowles # Issue Number #1692 # Overview This PR: - [x] Adds a skeletal `decentralizationLevel` field to `ApiNetworkParameters`. - [x] Adds a corresponding entry in the Swagger API specification. - [x] Arranges that the value of `decentralizationLevel` is initially hard-wired to **0%**. - [x] Adds a simple integration test to verify that the API really does return **0%** for the value of `decentralizationLevel`. In a future PR, we will update this code to report the live value. (See issue #1693.) Co-authored-by: Jonathan Knowles <[email protected]>
1 task
iohk-bors bot
added a commit
that referenced
this issue
Jun 2, 2020
1700: WIP: Introduce `ProtocolParameters` type. r=jonathanknowles a=jonathanknowles # Related Issue #1693 # Overview This PR prepares the ground for reporting the live value of the **_d_** protocol parameter. We introduce the following type to hold **protocol parameters**: ```hs data ProtocolParameters = ProtocolParameters { decentralizationLevel :: Quantity "percent" Percentage , txParameters :: TxParameters } ``` Using the above type, we can rewrite the following type: ```diff - data GenesisBlockParameters = GenesisBlockParameters - { staticParameters :: BlockchainParameters - , txParameters :: TxParameters - } + data NetworkParameters = NetworkParameters + { genesisParameters :: GenesisParameters + , protocolParameters :: ProtocolParameters + } ``` Finally, we change the type of `toApiNetworkParameters` to: ```diff - toApiNetworkParameters :: BlockchainParameters -> ApiNetworkParameters + toApiNetworkParameters :: NetworkParameters -> ApiNetworkParameters ``` ## Outstanding Work - [x] Ensure that related functions and values are named consistently. Co-authored-by: Jonathan Knowles <[email protected]>
iohk-bors bot
added a commit
that referenced
this issue
Jun 2, 2020
1700: Introduce `ProtocolParameters` type. r=jonathanknowles a=jonathanknowles # Related Issue #1693 # Overview This PR prepares the ground for reporting the live value of the **_d_** protocol parameter. We introduce the following type to hold **protocol parameters**: ```hs data ProtocolParameters = ProtocolParameters { decentralizationLevel :: Quantity "percent" Percentage , txParameters :: TxParameters } ``` Using the above type, we can rewrite the following type: ```diff - data GenesisBlockParameters = GenesisBlockParameters - { staticParameters :: BlockchainParameters - , txParameters :: TxParameters - } + data NetworkParameters = NetworkParameters + { genesisParameters :: GenesisParameters + , protocolParameters :: ProtocolParameters + } ``` Finally, we change the type of `toApiNetworkParameters` to: ```diff - toApiNetworkParameters :: BlockchainParameters -> ApiNetworkParameters + toApiNetworkParameters :: NetworkParameters -> ApiNetworkParameters ``` ## Outstanding Work - [x] Ensure that related functions and values are named consistently. Co-authored-by: Jonathan Knowles <[email protected]>
4 tasks
iohk-bors bot
added a commit
that referenced
this issue
Jun 3, 2020
1715: Revise documentation for `NetworkParameters` and related types. r=jonathanknowles a=jonathanknowles # Related Issues #1693 # Overview PR #1700 changed the way that network parameters are defined. This PR revises and adds documentation for the following types: - [x] `NetworkParameters` - [x] `GenesisParameters` - [x] `ProtocolParameters` - [x] `TxParameters` Co-authored-by: Jonathan Knowles <[email protected]>
iohk-bors bot
added a commit
that referenced
this issue
Jun 3, 2020
1715: Revise documentation for `NetworkParameters` and related types. r=jonathanknowles a=jonathanknowles # Related Issues #1693 # Overview PR #1700 changed the way that network parameters are defined. This PR revises and adds documentation for the following types: - [x] `NetworkParameters` - [x] `GenesisParameters` - [x] `ProtocolParameters` - [x] `TxParameters` Co-authored-by: Jonathan Knowles <[email protected]>
iohk-bors bot
added a commit
that referenced
this issue
Jun 3, 2020
1715: Revise documentation for `NetworkParameters` and related types. r=jonathanknowles a=jonathanknowles # Related Issues #1693 # Overview PR #1700 changed the way that network parameters are defined. This PR revises and adds documentation for the following types: - [x] `NetworkParameters` - [x] `GenesisParameters` - [x] `ProtocolParameters` - [x] `TxParameters` Co-authored-by: Jonathan Knowles <[email protected]>
7 tasks
iohk-bors bot
added a commit
that referenced
this issue
Jun 5, 2020
1725: Report live value of decentralization parameter d. r=jonathanknowles a=jonathanknowles # Issue Number #1693 # Overview This PR: - [x] Introduces the `DecentralizationLevel` type. This type is based on the `Percentage` type. _Greater_ values indicate _greater_ levels of decentralization, as follows: | Value | Meaning | | --: | :-- | | 0% | Network is completely _federalized_ | | 100% | Network is completely _decentralized_ | - [x] Adjusts the **wallet API server** to convert from `DecentralizationLevel` to `Quantity "percent" Percentage`. - [x] Adjusts the **wallet layer** to store a value of type `ProtocolParameters` instead of `TxParameters`. (Note that `ProtocolParameters` _includes_ `TxParameters`.) - [x] Adjusts the **network layer** to provide a `getProtocolParameters` function instead of `getTxParameters`. - [x] Adjusts the **database layer** to use a `protocol_parameters` table instead of a `tx_parameters` table. (Note that `protocol_parameters` is a superset of `tx_parameters`.) - [x] Adjusts the **chain-following code** to extract the live value of `d`, in the same way as we already do for transaction-related protocol parameters. - [x] Adds a **conversion function** to convert from `d` parameter values to values of type `DecentralizationLevel`. This function performs the following mapping: {1 → 0%, 0.9 → 10%, 0.8 → 20%, ..., 0.1 → 90%, 0 → 100%} # Future Work In a future PR, we can add a manual migration step that removes the `tx_parameters` table. Co-authored-by: Jonathan Knowles <[email protected]>
1 task
iohk-bors bot
added a commit
that referenced
this issue
Jun 12, 2020
1736: Add unit test to check updates of decentralizationLevel r=KtorZ a=rvl ### Issue Number #1693 can be moved to "QA" column once this is merged. ### Overview - Enhances the "unit test" to check that protocol parameters can be updated to include decentralization level. - Removes "todo" comment from `NETWORK_PARAMS - Able to fetch network parameters` integration test case. The `decentralisationParam` in the shelley integration test genesis is 1.0 ⇒ 0% decentralised. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
iohk-bors bot
added a commit
that referenced
this issue
Jun 12, 2020
1736: Add unit test to check updates of decentralizationLevel r=rvl a=rvl ### Issue Number #1693 can be moved to "QA" column once this is merged. ### Overview - Enhances the "unit test" to check that protocol parameters can be updated to include decentralization level. - Removes "todo" comment from `NETWORK_PARAMS - Able to fetch network parameters` integration test case. The `decentralisationParam` in the shelley integration test genesis is 1.0 ⇒ 0% decentralised. 1738: Parameterise `StakePools` API over apiPool type r=Anviking a=Anviking # Issue Number ADP-311, #1718 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I parameterised `StakePools` API over `apiPool` - [x] I renamed `ApiStakePool` to `ApiJormungandrStakePool`, such that we can later introduce a haskell `ApiStakePool` - [x] I made the default `Api` type use `ApiJormungandrStakePool`. We should later switch to `ApiStakePool`, and update the swagger scheme such that it targets haskell, and not jormungandr. - [x] I moved `StakePoolLayer` to the jormungandr package. # Comments - I am keeping the Pool DB in core, since I think we still want it. But I have not thought about how it would work with shelley. - changelog: this is pure refactoring, but in combination with follow-up PRs this is a new feature. <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> 1747: Delegation fee shelley r=paweljakubas a=paweljakubas # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #1709 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have enabled delegation fee in Shelley server - [x] I have ported integration tests from jormungandr - [x] I have adjusted feeMin # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Pawel Jakubas <[email protected]>
lgtm. |
iohk-bors bot
added a commit
that referenced
this issue
Jun 16, 2020
1760: Server: Use the network layer to get protocol parameters r=rvl a=rvl ### Issue Number ADP-244 / #1693 ### Overview The API server was previously getting all network parameters from the genesis block. This change makes it use the network layer to get the latest protocol parameters. ### Comments An integration test for this is going to be hairy. Co-authored-by: Rodney Lorrimar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Task #1692 will have added a skeletal
decentralizationLevel
parameter to theApiNetworkParameters
object.Decision
Adjust the code so that this parameter reflects the true value of the
d
parameter, as reported by the network.Acceptance Criteria
GetNetworkParameters
API endpoint must return a decentralization level percentage that reflects the true value of thed
parameter, as reported by the network.Development
(Introduce
ProtocolParameters
type. #1700)Introduce
ProtocolParameters
type to hold (a subset of) the protocol parameters defined in a Formal Specification of the Cardano Ledger.(Introduce
ProtocolParameters
type. #1700)Rewrite the
GenesisBlockParameters
type to include aProtocolParameters
value (whose type is defined above):(Introduce
ProtocolParameters
type. #1700)Change the type of
toApiNetworkParameters
to:(Revise documentation for
NetworkParameters
and related types. #1715)Revise documentation comments for the following types:
NetworkParameters
GenesisParameters
ProtocolParameters
(Report live value of decentralization parameter d. #1725)
Generalize the wallet, network, and database layers to use
ProtocolParameters
instead ofTxParameters
. (ProtocolParameters
includesTxParameters
).(Report live value of decentralization parameter d. #1725)
Adjust the chain-following code to retrieve the current value of the
d
parameter, in the same way we already do for transaction parameters.(Report live value of decentralization parameter d. #1725)
Introduce a
DecentralizationLevel
type (based on thePercentage
type).Greater values should indicate greater levels of decentralization, as follows:
(Report live value of decentralization parameter d. #1725)
Add a function to convert from
d
parameter values to values of typeDecentralizationLevel
, performing the following mapping:QA
d
(provided bycardano-node
) to values ofDecentralizationLevel
.lib/byron/test/unit/Cardano/Wallet/Byron/NetworkSpec.hs
to see that decentralization parameter is updated ⇒ Add unit test to check updates of decentralizationLevel #1736.NETWORK_PARAMS - Able to fetch network parameters
to check that decentralization parameter is correct (this is not checking parameter updates however) ⇒ Add unit test to check updates of decentralizationLevel #1736.The text was updated successfully, but these errors were encountered: