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

[CBR-482] Implement OBFT block creation/generation #4077

Merged
merged 6 commits into from
Feb 22, 2019

Conversation

intricate
Copy link
Contributor

Description

Implementation of block generation/creation for the OBFT era.

Linked issues

https://iohk.myjetbrains.com/youtrack/issue/CBR-482

Type of change

  • [~] 🐞 Bug fix (non-breaking change which fixes an issue)
  • [~] 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • [~] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • [~] 🔨 New or improved tests for existing code
  • [~] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

@intricate intricate added the wip label Feb 13, 2019
@intricate intricate self-assigned this Feb 13, 2019
@intricate intricate force-pushed the intricate+mhuesch/CBR-482 branch 2 times, most recently from 67c86a9 to 68d841d Compare February 14, 2019 16:07
Copy link
Contributor

@tatyanavych tatyanavych left a comment

Choose a reason for hiding this comment

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

Please, add CHANGELOG.md entry in OBFT Features subsection.

@intricate intricate force-pushed the intricate+mhuesch/CBR-482 branch 3 times, most recently from a066fb5 to c9f825a Compare February 19, 2019 01:56
@intricate intricate requested a review from erikd February 19, 2019 04:37
@intricate intricate force-pushed the intricate+mhuesch/CBR-482 branch 9 times, most recently from c546d98 to 49737f7 Compare February 22, 2019 13:39
@intricate intricate changed the title [WIP] [CBR-482] Implement OBFT block generation [CBR-482] Implement OBFT block generation Feb 22, 2019
@intricate intricate removed the wip label Feb 22, 2019
@intricate intricate dismissed tatyanavych’s stale review February 22, 2019 13:46

Added CHANGELOG entries

@intricate intricate changed the title [CBR-482] Implement OBFT block generation [CBR-482] Implement OBFT block creation/generation Feb 22, 2019
Copy link
Contributor

@mhuesch mhuesch left a comment

Choose a reason for hiding this comment

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

LGTM. Addition of my proposed comment would be nice.

processGenesisBlock genesisConfig ei)
getAdoptedBV

Original -> pure initialBV
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I like the refactor here to drop the BlockVersion arg and instead check getAdoptedBV inside of verifyBlock, so that we can catch updates as we go along.

lib/src/Pos/Worker/Block.hs Show resolved Hide resolved
Just leaders ->
maybe onNoLeader
(onKnownLeader leaders)
(leaders ^? ix (fromIntegral $ getSlotIndex siSlot))
Copy link
Contributor

Choose a reason for hiding this comment

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

Context for other reviewers: this part is just the red deletions above, indented over. We hide the whenJust in this branch of the case, so that creation of the EBB won't be reported (since we will roll it back shortly).

# Kill all existing cardano-node-simple processes. If there are processes
# still running from previous runs of this script, the test will fail if
# we don't kill them first.
kill_cardano_nodes
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@mhuesch mhuesch self-assigned this Feb 22, 2019
Michael Hueschen and others added 3 commits February 22, 2019 11:49
There should be no EBB (epoch boundary block) between the last original
epoch and the first OBFT block and the first block of the first OBFT
epoch should have its previous block hash point to the last block of
the last original epoch.
iohk-bors bot added a commit that referenced this pull request Feb 22, 2019
4077: [CBR-482] Implement OBFT block creation/generation r=mhuesch a=intricate

## Description

Implementation of block generation/creation for the `OBFT` era.

## Linked issues

https://iohk.myjetbrains.com/youtrack/issue/CBR-482



Co-authored-by: Luke Nadur <luke.nadur@iohk.io>
Co-authored-by: Michael Hueschen <michael.hueschen@iohk.io>
Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 22, 2019

Canceled

iohk-bors bot added a commit that referenced this pull request Feb 22, 2019
@mhuesch
Copy link
Contributor

mhuesch commented Feb 22, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 22, 2019
4077: [CBR-482] Implement OBFT block creation/generation r=mhuesch a=intricate

## Description

Implementation of block generation/creation for the `OBFT` era.

## Linked issues

https://iohk.myjetbrains.com/youtrack/issue/CBR-482



Co-authored-by: Luke Nadur <luke.nadur@iohk.io>
Co-authored-by: Michael Hueschen <michael.hueschen@iohk.io>
Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 22, 2019

Timed out

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 22, 2019

try

Timed out

@intricate
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 22, 2019
4077: [CBR-482] Implement OBFT block creation/generation r=intricate a=intricate

## Description

Implementation of block generation/creation for the `OBFT` era.

## Linked issues

https://iohk.myjetbrains.com/youtrack/issue/CBR-482



Co-authored-by: Luke Nadur <luke.nadur@iohk.io>
Co-authored-by: Michael Hueschen <michael.hueschen@iohk.io>
Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 22, 2019

@iohk-bors iohk-bors bot merged commit ccacf63 into develop Feb 22, 2019
@iohk-bors iohk-bors bot deleted the intricate+mhuesch/CBR-482 branch February 22, 2019 20:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants