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

Adapt the threshold check for OBFT #339

Closed
dnadales opened this issue Feb 22, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@dnadales
Copy link
Contributor

commented Feb 22, 2019

In the spec it is stated that we should use t = 0.22 where t is used in the following rule:

image

However this check is implemented as:

checkDelegator :: BlockCount -> PublicKey -> SigningHistory -> Bool
checkDelegator byzantineNodes s sh =
  delegatorSlots % 1 <= shK sh % byzantineNodes
 where
  delegatorSlots =
    fromMaybe 0 $ M.lookup (mkStakeholderId s) (shStakeholderCounts sh)

-- | The history of signers in the last @K@ blocks
--
--   We maintain a map of the number of blocks signed for each stakeholder to
--   improve performance. The sum of the `BlockCount`s in the map should be
--   equal to the length of the sequence.
data SigningHistory = SigningHistory
  { shK                 :: !BlockCount
  , shSigningQueue      :: !(Seq StakeholderId)
  , shStakeholderCounts :: !(Map StakeholderId BlockCount)
  } deriving (Eq, Show, Generic, NFData)

where byzantineNodes = 5. We should adapt the check so that it becomes something like:

  delegatorSlots % 1 <= shK sh % (11/50)

If we choose to use a constant name for 11/50 then we also need to find a more appropriate name than byzantineNodes.

CC: @nc6 @ruhatch

@ruhatch

This comment has been minimized.

Copy link
Collaborator

commented Apr 29, 2019

I believe this has moved to ouroboros-networking now, so is no longer an issue in this repo

@ruhatch ruhatch closed this Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.