Skip to content

Conversation

mrBliss
Copy link
Contributor

@mrBliss mrBliss commented Jul 1, 2020

Fixes #2346.

  • Split HardForkQuery up into:

    1. QueryIfCurrent: queries about a certain era that only can be answered
      when the current ledger is in the respective era.

    2. QueryAnytime: queries about a certain era that can be answered when the
      current ledger is in any era. No queries about the first era can be
      asked to keep the HFC with a single ledger isomorphic to just the ledger.

      An example query is EraStart, which returns the start epoch/time/slot
      of an era.

  • The pattern synonyms for CardanoQuery were renamed from QueryByron and
    QueryShelley to QueryIfCurrentByron, QueryIfCurrentShelley, and
    QueryAnytimeShelley.

@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Jul 1, 2020
@mrBliss mrBliss requested a review from edsko July 1, 2020 14:47
@mrBliss mrBliss force-pushed the mrBliss/query-anytime branch from 00e888f to 802bb67 Compare July 1, 2020 14:52
Fixes #2346.

* Split `HardForkQuery` up into:
  1. `QueryIfCurrent`: queries about a certain era that only can be answered
     when the current ledger is in the respective era.
  2. `QueryAnytime`: queries about a certain era that can be answered when the
     current ledger is in *any* era. No queries about the first era can be
     asked to keep the HFC with a single ledger isomorphic to just the ledger.

     An example query is `EraStart`, which returns the start epoch/time/slot
     of an era.

* The pattern synonyms for `CardanoQuery` were renamed from `QueryByron` and
  `QueryShelley` to `QueryIfCurrentByron`, `QueryIfCurrentShelley`, and
  `QueryAnytimeShelley`.
@mrBliss mrBliss force-pushed the mrBliss/query-anytime branch from 802bb67 to e7bb3fd Compare July 1, 2020 14:54
Copy link
Contributor

@edsko edsko left a comment

Choose a reason for hiding this comment

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

Took you longer than 2 minutes but okay.

@mrBliss
Copy link
Contributor Author

mrBliss commented Jul 1, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 1, 2020

@iohk-bors iohk-bors bot merged commit d224db4 into master Jul 1, 2020
@iohk-bors iohk-bors bot deleted the mrBliss/query-anytime branch July 1, 2020 15:24
mrBliss added a commit that referenced this pull request Jul 10, 2020
Some idiot broke backwards compatibility in #2349.

We were no longer able to exchange queries via the `LocalStateQuery` protocol
with a Byron-only node.
mrBliss added a commit that referenced this pull request Jul 10, 2020
Some idiot broke backwards compatibility in #2349.

We were no longer able to exchange queries via the `LocalStateQuery` protocol
with a Byron-only node.
iohk-bors bot added a commit that referenced this pull request Jul 10, 2020
2385: Test & fix backwards compatibility between Byron and Cardano r=mrBliss a=mrBliss

Test backwards compatibility between Byron and Cardano

Fixes #2361.

A node running `CardanoBlock` can communicate with older nodes that run
`ByronBlock`, until the hard fork happens (as the other nodes won't support
Shelley). Test that we're actually backwards compatible.

This test did exactly what it was supposed to do: it found a bug!

Some idiot broke backwards compatibility in #2349. We were no longer able to exchange queries via the `LocalStateQuery` protocol
with a Byron-only node. Fix it.


Co-authored-by: Thomas Winant <thomas@well-typed.com>
iohk-bors bot added a commit that referenced this pull request Jul 10, 2020
2385: Test & fix backwards compatibility between Byron and Cardano r=mrBliss a=mrBliss

Test backwards compatibility between Byron and Cardano

Fixes #2361.

A node running `CardanoBlock` can communicate with older nodes that run
`ByronBlock`, until the hard fork happens (as the other nodes won't support
Shelley). Test that we're actually backwards compatible.

This test did exactly what it was supposed to do: it found a bug!

Some idiot broke backwards compatibility in #2349. We were no longer able to exchange queries via the `LocalStateQuery` protocol
with a Byron-only node. Fix it.


Co-authored-by: Thomas Winant <thomas@well-typed.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus issues related to ouroboros-consensus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Byron: query the transition point

2 participants