0
0
Blockchain / Solidityprogramming~10 mins

Proof of Work vs Proof of Stake in Blockchain / Solidity - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the consensus mechanism used in Proof of Work.

Blockchain / Solidity
consensus = "[1]"
Drag options to blanks, or click blank then click option'
AProof of Stake
BProof of Work
CDelegated Proof
DByzantine Fault
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Proof of Work with Proof of Stake.
Using unrelated consensus mechanisms.
2fill in blank
medium

Complete the code to define the consensus mechanism used in Proof of Stake.

Blockchain / Solidity
consensus = "[1]"
Drag options to blanks, or click blank then click option'
AProof of Stake
BProof of Work
CProof of Authority
DProof of Capacity
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing Proof of Stake with Proof of Work.
Choosing unrelated consensus types.
3fill in blank
hard

Fix the error in the code that calculates the mining reward for Proof of Work.

Blockchain / Solidity
reward = base_reward [1] difficulty
Drag options to blanks, or click blank then click option'
A*
B+
C-
D/
Attempts:
3 left
💡 Hint
Common Mistakes
Using addition instead of multiplication.
Using division or subtraction which do not make sense here.
4fill in blank
hard

Fill both blanks to complete the code that selects a validator in Proof of Stake based on stake and random chance.

Blockchain / Solidity
selected_validator = validators[[1]] if stake [2] threshold else None
Drag options to blanks, or click blank then click option'
Aindex
B>
C<
Drandom()
Attempts:
3 left
💡 Hint
Common Mistakes
Using random() as index which is incorrect.
Using wrong comparison operators.
5fill in blank
hard

Fill all three blanks to complete the code that calculates the chance to validate a block in Proof of Stake.

Blockchain / Solidity
chance = ([1] / total_stake) [2] random.random() and chance [3] threshold
Drag options to blanks, or click blank then click option'
Auser_stake
B>
C<
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using division instead of multiplication.
Using wrong comparison operators in conditions.