Skip to content

shelley genesis: support fractional slot length#361

Merged
SebastienGllmt merged 2 commits intodevelopfrom
shelley-genesis-support-fractional-slot-length
Sep 21, 2024
Merged

shelley genesis: support fractional slot length#361
SebastienGllmt merged 2 commits intodevelopfrom
shelley-genesis-support-fractional-slot-length

Conversation

@ecioppettini
Copy link
Copy Markdown
Contributor

when trying to parse the shelley genesis file generated by yaci-devkit I got an error because the slotLength it's 1.0 instead of 1. It seems like the value can be actually have decimals (e.g https://github.com/bloxbean/yaci-devkit/blob/bef2cf9252972b6935b59650b347d95d78480278/applications/cli/src/main/java/com/bloxbean/cardano/yacicli/localcluster/ClusterCommands.java#L98 ), although I'm actually not sure if there is a spec for these fields anywhere.

@ecioppettini ecioppettini self-assigned this Sep 20, 2024
pub protocol_params: ShelleyGenesisProtocolParameters,
pub security_param: u64,
pub slot_length: u64,
pub slot_length: String,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a Fraction like active_slots_coeff? That one is only a String to avoid f64 losing precision in raw.rs's field, but is Fraction here.

Copy link
Copy Markdown
Contributor

@rooooooooob rooooooooob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SebastienGllmt SebastienGllmt merged commit b7acbd3 into develop Sep 21, 2024
@SebastienGllmt SebastienGllmt deleted the shelley-genesis-support-fractional-slot-length branch September 21, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants