Skip to main content
Cyber Defense StudioIoT Security and PrivacyExperimentsWorkspaces
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
BLOCKCHAIN FOR IoT · BC-M08
Blockchain for IoT

Consensus algorithms and Byzantine disagreement

Dr. Mohammad Alja’afreh · Princess Sumaya University for Technology

ValidatorsVotesObservers
Design experiment & verify evidence →
BC-M08 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice

← Lecture-aligned module experiments · All blockchain labs · Setup wizard

Introduction

Consensus · Byzantine quorum and stake weighting

Separate count-based quorum from probabilistic stake-weighted selection
Separate count-based quorum from probabilistic stake-weighted selection

Scientific architecture · Consensus mechanisms and Byzantine disagreement

Validator agreement — Proposal / candidate A; Four validators / votes; Network partition / delayed messages; Quorum / 3 of 4 in teaching model; Outcome / wait if insufficient
Scientific concept map: Candidate proposal — Value; Validators — Votes or stake weights; Network condition — Failure or partition; Quorum rule — Agreement threshold; Outcome — Commit or wait.

Scientific foundations and analytical reasoning

A Byzantine quorum model with n≥3f+1 uses 2f+1 matching votes in the simplified n=3f+1 case. Stake weighting changes selection probabilities, not necessarily finality.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

BC-M08 · Academic orientation

Scope and objectives

Scope of the experiment

Compare observer decisions with conflicting validator messages and inspect a 3-of-4 quorum. Explore a simplified count versus stake-weighted voting rule.

The focus of this experiment is to distinguish consensus, Byzantine behavior and finality assumptions. Students then trace decisions under a specified participant and fault model, and compare safety and liveness using the stated model. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Distinguish consensus, Byzantine behavior and finality assumptions.
  • Trace decisions under a specified participant and fault model.
  • Compare safety and liveness using the stated model.
  • Identify the configured inputs (Consensus abstraction; Participants; Faulty/offline participants; Honest votes for conflicting value B; Participant 0 resource weight) and record the corresponding observed outputs with units where applicable.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can distinguish consensus, Byzantine behavior and finality assumptions, trace decisions under a specified participant and fault model, and compare safety and liveness using the stated model.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing compare safety and liveness using the stated model. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the foundational terminology in Concepts and confirm readiness using the existing setup instructions. After completion, continue to Smart contracts, lifecycle and gas.

Environment and experimental methodology

The listed browser model and experiment-specific local Python, Solidity or EVM workflow, where provided. Do not treat a model as a deployed ledger.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

Scientific theory · Consensus under fault assumptions

Consensus separates agreement, validity and termination under an explicit network and fault model. In a simplified Byzantine setting with n=3f+1, a quorum of 2f+1 has intersection sufficient to include an honest participant. Proof-of-stake selection weights candidates by stake in the model, but selection alone is not a finality protocol.

Worked example and engineering interpretation

For four validators tolerating one Byzantine fault, three matching eligible votes form the teaching quorum. Stakes 10,20,70 give respective selection probabilities 10%,20%,70% in a simple proportional model. Compare observed frequencies over repeated trials and identify assumptions.

Engineering principles · additional worked teaching example

Classical PBFT safety assumes n≥3f+1 and a quorum of 2f+1 among 3f+1 replicas. For n=4,f=1, quorum 3; any two such quorums intersect in at least 2 replicas, at least one honest.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

Worked engineering reasoning and boundary conditions

Engineering reference configuration: Consensus abstraction = PBFT; Participants = 7; Faulty/offline participants = 2; Honest votes for conflicting value B = 0; Participant 0 resource weight = 30; Leader-selection rounds = 100; Random seed = 42. In the classroom model, Quorum = 5; Fault bound = 2; Fault bound met = Yes; Decision = A; Votes A = 5; Votes B = 0. A quorum is only a decision in this simplified round; guarantees depend on the protocol and fault assumptions. PBFT quorum teaching abstraction with faulty participants silent; resource-weighted and timer/authority selection abstractions, not implementations of full named protocols.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · independent state notebook

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

Consensus algorithms and Byzantine disagreement: independent state notebook1234567Calculated state 1ValidatorV0VoteAStatusHonest

Step 1 of 7 · Calculated state 1

Calculated state 1

Validator
V0
Vote
A
Status
Honest

Teaching example only; inspect live calculations or real practical evidence separately.

How to investigate Consensus algorithms and Byzantine disagreement

Compare observer decisions with conflicting validator messages and inspect a 3-of-4 quorum. Explore a simplified count versus stake-weighted voting rule.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Compare observer decisions with conflicting validator messages and inspect a 3-of-4 quorum. Explore a simplified count versus stake-weighted voting rule.

  1. For PBFT use seven participants, two faulty/offline, zero honest split. Calculate f=floor((n−1)/3)=2 and quorum 5; inspect five honest votes.
  2. Set faults to three; check fault bound and available votes. Restore two and split two honest votes to B. Neither proposal should reach quorum in this fixture.
  3. Switch to PoW and vary resource share and rounds; inspect seeded win frequencies. For PoS, PoB and PoC the resource denotes stake, burned resource or capacity, not hashrate.
  4. Select PoA to compare deterministic authorized rotation, and PoET to compare equal independently sampled trusted timers. Explain their different trust assumptions.

Reference check: Observer decisions reflect the actual received votes and threshold. Equivocation is visible, and lack of quorum produces no decision.

Model boundary: No network authentication or multi-round BFT; count requires 3/4, weighted mode >2/3 of fixed total stake.

Independent task and submission evidence

2. Set faults to three; check fault bound and available votes. Restore two and split two honest votes to B. Neither proposal should reach quorum in this fixture. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Compare observer decisions with conflicting validator messages and inspect a 3-of-4 quorum. Explore a simplified count versus stake-weighted voting rule.

Learning goals

  1. Explain the mechanism using the actual intermediate states in this experiment.
  2. Predict and verify the reference and modified conditions described below.
  3. Interpret the acceptance criteria and identify the limits of the model.

Module flashcards · 12 questions

Browse all 12 questions and explanations
What is equivocation?

Sending conflicting messages to different recipients.

What is a quorum?

A threshold of agreement required by a specified protocol.

Does one-round voting implement BFT?

No. Real protocols require additional message, authentication and fault assumptions.

What changes in stake weighting?

Votes contribute their assigned weights rather than equal counts.

What does proof of work weight?

Computational effort satisfying the protocol target.

What does proof of stake weight?

Protocol-defined stake and validator rules.

What is proof of authority?

A consensus family that restricts validator participation to recognized authorities.

Why compare observer-local results?

An equivocating participant can make different observers see different messages.

Why can two observers see different votes from validator 4?

An equivocating validator can send conflicting votes to different observers.

What happens if the received votes do not meet the threshold?

No decision is produced.

Why repeat the trial with validator 4 offline?

To isolate the effect of missing votes rather than contradictory votes.

Why can the stake rule change an outcome relative to count voting?

Votes contribute different weights instead of one unit per validator.

Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research