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

[CBR-481/482] Add functionality for determining slot leaders during OBFT #4029

Merged
merged 5 commits into from
Jan 31, 2019

Conversation

intricate
Copy link
Contributor

Description

Adds functionality for determining slot leaders and richmen during the OBFT era. Also adds a test ObftRoundRobinSpec which introduces a couple of property tests pertaining to the OBFT round-robin slot leader schedule.

Note: This PR does not actually modify block generation or validation code. It only introduces the functions which will be utilized in upcoming PRs.

Linked issues

https://iohk.myjetbrains.com/youtrack/issue/CBR-481
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 self-assigned this Jan 23, 2019
@intricate intricate requested review from erikd and mhuesch January 23, 2019 17:21
Michael Hueschen and others added 4 commits January 30, 2019 15:29
This function selects the current slot leaders by obtaining the
genesis stakeholders, then tracing them through the delegation
mapping. If a genesis stakeholder delegated to another stakeholder,
we return the delegatee's id. If the genesis stakeholder did not
delegate, we return their id.
@intricate intricate force-pushed the intricate+mhuesch/obft-leaders branch from 06c67bd to 30669ab Compare January 30, 2019 21:34
@intricate intricate force-pushed the intricate+mhuesch/obft-leaders branch from 30669ab to c61f195 Compare January 30, 2019 21:54
Copy link
Member

@erikd erikd left a comment

Choose a reason for hiding this comment

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

LGTM!

This review stands if all you are doing is adding another test.

@erikd
Copy link
Member

erikd commented Jan 31, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Jan 31, 2019
4029: [CBR-481/482] Add functionality for determining slot leaders during OBFT r=erikd a=intricate

## Description

Adds functionality for determining slot leaders and richmen during the OBFT era. Also adds a test `ObftRoundRobinSpec` which introduces a couple of property tests pertaining to the OBFT round-robin slot leader schedule. 

_Note: This PR does not actually modify block generation or validation code. It only introduces the functions which will be utilized in upcoming PRs._

## Linked issues

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



Co-authored-by: Michael Hueschen <[email protected]>
Co-authored-by: Luke Nadur <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 31, 2019

Timed out

@intricate
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jan 31, 2019
4029: [CBR-481/482] Add functionality for determining slot leaders during OBFT r=intricate a=intricate

## Description

Adds functionality for determining slot leaders and richmen during the OBFT era. Also adds a test `ObftRoundRobinSpec` which introduces a couple of property tests pertaining to the OBFT round-robin slot leader schedule. 

_Note: This PR does not actually modify block generation or validation code. It only introduces the functions which will be utilized in upcoming PRs._

## Linked issues

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



4050: Internal Endpoints Disclaimer r=KtorZ a=KtorZ

## Description

<!--- A brief description of this PR and the problem is trying to solve -->

As a follow-up from the discussion in cardano-foundation/cardano-wallet#151 (comment), we will add a proper disclaimer in the documentation about the internal endpoints. 

## Linked issue

<!--- Put here the relevant issue from YouTrack -->

cardano-foundation/cardano-wallet#228



Co-authored-by: Michael Hueschen <[email protected]>
Co-authored-by: Luke Nadur <[email protected]>
Co-authored-by: KtorZ <[email protected]>
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.

Looks great :shipit:

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 31, 2019

Timed out (retrying...)

iohk-bors bot added a commit that referenced this pull request Jan 31, 2019
4029: [CBR-481/482] Add functionality for determining slot leaders during OBFT r=intricate a=intricate

## Description

Adds functionality for determining slot leaders and richmen during the OBFT era. Also adds a test `ObftRoundRobinSpec` which introduces a couple of property tests pertaining to the OBFT round-robin slot leader schedule. 

_Note: This PR does not actually modify block generation or validation code. It only introduces the functions which will be utilized in upcoming PRs._

## Linked issues

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



Co-authored-by: Michael Hueschen <[email protected]>
Co-authored-by: Luke Nadur <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 31, 2019

@iohk-bors iohk-bors bot merged commit c61f195 into develop Jan 31, 2019
@iohk-bors iohk-bors bot deleted the intricate+mhuesch/obft-leaders branch January 31, 2019 19:08
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.

3 participants