-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: add Shelley protocol parameters support #587
Conversation
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.
Please add a ShelleyProtocolParameters
type (the equivalent of BabbageProtocolParameters
) and wire it up in local-state-query. This should really just be copying ShelleyProtocolParameterUpdate
, adding cbor.StructAsArray
at the top, removing all of the field annotations, and making the protocol major/minor top-level fields.
ledger/shelley.go
Outdated
Tau *cbor.Rat `cbor:"11,keyasint"` | ||
DDecentralization *cbor.Rat `cbor:"12,keyasint"` | ||
Nonce *cbor.Rat `cbor:"13,keyasint"` | ||
ProtocolVersion []uint `cbor:"14,keyasint"` |
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.
Use an embedded struct to capture the major/minor protocol version in named fields like we did for the Babbage protocol parameters:
ProtocolVersion struct {
cbor.StructAsArray
Major uint
Minor uint
} `cbor:"14,keyasint"`
ledger/shelley.go
Outdated
A0 *cbor.Rat `cbor:"9,keyasint"` | ||
Rho *cbor.Rat `cbor:"10,keyasint"` | ||
Tau *cbor.Rat `cbor:"11,keyasint"` | ||
DDecentralization *cbor.Rat `cbor:"12,keyasint"` |
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.
Get rid of the doubled D
at the beginning of this field name
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.
Comments above
4d010a1
to
c4a65f0
Compare
ledger/shelley.go
Outdated
ProtocolMinor uint | ||
Decentralization *cbor.Rat | ||
Nonce *cbor.Rat | ||
ProtocolVersion []uint |
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.
This would instead be two top level fields for major/minor like we have for Babbage...for reasons
4097b7e
to
778a8cf
Compare
Signed-off-by: Ales Verbic <[email protected]>
778a8cf
to
195b533
Compare
Test
Closes #324