-
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 decentralization parameter d. #1725
Report live value of decentralization parameter d. #1725
Conversation
e8dcb9b
to
af0dc50
Compare
af0dc50
to
a5734f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far
Rather than doing this migration step, you could change |
a5734f6
to
ee9d006
Compare
Add `HasCallStack` constraint to function `decentralizationLevelFromPParams` and all functions that call it directly. In response to review feedback: #1725 (comment)
ee9d006
to
4bc118b
Compare
In response to review feedback: #1725 (comment)
github.com/input-output-hk/cardano-wallet/wiki/Coding-Standards#limit-line-length-to-80-characters
Generalize `TxParameters` to `ProtocolParameters` in the wallet, network and DB layers.
Add `HasCallStack` constraint to function `decentralizationLevelFromPParams` and all functions that call it directly. In response to review feedback: #1725 (comment)
In response to review feedback: #1725 (comment)
4de805b
to
93ee74f
Compare
After a discussion with @rvl, we decided to leave Justification:
So the corner case here is: attempting to create a coin selection immediately after a migration, but before the network layer has started. In this corner case, creating a coin selection will fail. On the assumption that this corner case is relatively rare and easy to work around (by waiting for the network layer to start), we've decided to leave the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 👍
bors r+ |
Build succeeded |
1728: Remove a duplicated comment section. r=jonathanknowles a=jonathanknowles # Issue Number #1725 # Overview This PR removes a duplicated section of comment. Co-authored-by: Jonathan Knowles <[email protected]>
Issue Number
#1693
Overview
This PR:
Introduces the
DecentralizationLevel
type (based on thePercentage
type).Greater values indicate greater levels of decentralization, as follows:
Adjusts the wallet API server to convert from values of type
DecentralizationLevel
to values of typeQuantity "percent" Percentage
.Adjusts the wallet layer to store a value of type
ProtocolParameters
instead ofTxParameters
. (Note thatProtocolParameters
includesTxParameters
.)Adjusts the network layer to provide a
getProtocolParameters
function instead ofgetTxParameters
.Adjusts the database layer to use a
protocol_parameters
table instead of atx_parameters
table. (Note thatprotocol_parameters
is a superset oftx_parameters
.)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.Adds a conversion function to convert from
d
parameter values to values of typeDecentralizationLevel
.This function performs the following mapping:
Comments
Starting a wallet with this PR applied will result in the creation of a new
protocol_parameters
table, if one does not already exist. (We rely on the automatic migration mechanism to create the table, and the network layer to add rows to the table.)The redundant
tx_parameters
table, if it exists, will be ignored, but not deleted.In a future PR, we can add a manual migration step that removes the
tx_parameters
table.See Issue #1727.