Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

[chainspecs]: make eip1108 optional #11065

Closed
wants to merge 2 commits into from
Closed

Conversation

niklasad1
Copy link
Collaborator

Closes #11063

This PR makes the eip1108 fields as Option such that serde deserialization succeeds without being specified.

Also a json file is added to test it.

Closes #11063

This PR makes the `eip1108 fields` as `Option` such that serde deserialization succeeds without being specified.

Also a `json file` is added to test it.
@niklasad1 niklasad1 added A0-pleasereview 🤓 Pull request needs code review. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. B1-patch-beta 🕷🕷 M4-core ⛓ Core client code / Rust. M2-config 📂 Chain specifications and node configurations. labels Sep 18, 2019
self.eip1108_transition_price.into()
} else {
self.price.into()
match (self.eip1108_transition_at, self.eip1108_transition_price) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this became a little more complex unfortunately

However, it will only enable the eip iff both fields are specified in the chain spec. Do we want a warning/trace if only one field is specified (probably a bug in the case)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also this two matches are not DRY but it would require a trait object or enum such as Eip1108 to replace eip_transition_at and eip_price (price types will be different). I prefer not to do because most of this will be fixed by #11039

@ordian
Copy link
Collaborator

ordian commented Sep 19, 2019

@niklasad1 could you elaborate on how this relates to #11039? Would this be a spec breaking change and #11039 not, just refactoring the internal impl?

@niklasad1
Copy link
Collaborator Author

niklasad1 commented Sep 19, 2019

@niklasad1 could you elaborate on how this relates to #11039? Would this be a spec breaking change and #11039 not, just refactoring the internal impl?

#11008 was an unintentional breaking change this PR is just a hack to fix it.

#11039 is re-write of this mess to handle different prices and price models in more future proof way for builtins. Currently, it is a breaking change but I can investigate if it is possible to make it backward compatible with a deprecation warning of the old format.

Thoughts?

@ordian
Copy link
Collaborator

ordian commented Sep 19, 2019

We probably want to backport one future-proof change, ideally backwards (with 2.5.7 format) compatible.
If it's not possible to be backwards compatible, then what is the point of merging this PR only to be replaced by #11039 later (just delaying the breakage?)?

So I would propose to put this PR on hold until we see what would the accepted pricing formats in #11039 look like.

@niklasad1
Copy link
Collaborator Author

Yeah, agree.

@niklasad1 niklasad1 added A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 19, 2019
@niklasad1 niklasad1 closed this Oct 2, 2019
@niklasad1 niklasad1 deleted the na-make-eip1108-optional branch November 12, 2019 20:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. M2-config 📂 Chain specifications and node configurations. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validating Aura node crashes on startup with 2.5.8
4 participants