Skip to content
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

epoch_params.protocol_version destructed, and column name variance #368

Closed
rhyslbw opened this issue Oct 21, 2020 · 3 comments
Closed

epoch_params.protocol_version destructed, and column name variance #368

rhyslbw opened this issue Oct 21, 2020 · 3 comments

Comments

@rhyslbw
Copy link
Contributor

rhyslbw commented Oct 21, 2020

The protocol params in the genesis file are modelled as:

"protocolVersion": {
  "minor": 0,
  "major": 2
}

however, the values are concatenated into the db as a single string ProtVer 2 0.

  1. Why is there divergence here? Presumably there's a reason to have structure for the version, which could be represented with jsonb or just flattened into two columns
  2. The column names are more human-friendly, however the actual param names require a manual re-mapping should an implementation wish to use the names defined in the spec.
@erikd
Copy link
Contributor

erikd commented Oct 21, 2020

This field is contains close to zero information. The value can only change at epoch boundaries (as a result of a protocol parameter update) so storing it for every block seems excessive. I would prefer to drop this column all together.

@rhyslbw
Copy link
Contributor Author

rhyslbw commented Oct 21, 2020

so storing it for every block seems excessive. I would prefer to drop this column all together.

I'm referring to the epoch_params table, but agree you could drop it from the block table with this in place

@erikd
Copy link
Contributor

erikd commented Oct 21, 2020

Ok, its gone from the block table. I can live with the full version in the epoch_params table

erikd added a commit that referenced this issue Oct 21, 2020
Previously ProtVer was serialised as a String and then the String was
stored. That now switches to two separate columns for the major and
minor version. Byron also had a third "alt" version but we simply
ignore that.

Closes: #368
@erikd erikd closed this as completed in afdb4e9 Oct 22, 2020
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

No branches or pull requests

2 participants