88 Commits

Author SHA1 Message Date
Mark Spanbroek
f5fdf8e581 move code to exchange proposals to simulator 2024-11-04 14:36:19 +01:00
Mark Spanbroek
2d5f3721e4 extract network simulator from tests 2024-10-31 13:16:35 +01:00
Mark Spanbroek
e20da68dfc skip blocks using the indirect rule 2024-10-31 12:29:05 +01:00
Mark Spanbroek
7ce6f639f3 count votes from committee members only once 2024-10-30 14:50:00 +01:00
Mark Spanbroek
da66c27de7 rewording 2024-10-30 11:28:59 +01:00
Mark Spanbroek
923f09976e update certificates for older blocks 2024-10-30 11:25:24 +01:00
Mark Spanbroek
432692f472 update skipped for older blocks 2024-10-30 10:45:54 +01:00
Mark Spanbroek
099aeeb0af validator can't propose a block with too few parents 2024-10-30 10:23:56 +01:00
Mark Spanbroek
2a13ddffd4 refuse a proposal that was already received 2024-10-29 13:05:38 +01:00
Mark Spanbroek
09f7257bd3 ignore parents that are too old to matter 2024-10-29 12:58:22 +01:00
Mark Spanbroek
26234bec9c refuse proposals with a round number that is too high 2024-10-29 12:35:06 +01:00
Mark Spanbroek
415a8fcc3f allow validator to request missing blocks
- refuse proposals with unknown parent blocks
- store signed blocks in slots
- allow retrieval of signed blocks
- make indirect decision rule test more similar to
  scenario from the paper
2024-10-29 12:19:20 +01:00
Mark Spanbroek
66f24cb296 separate checking of block from receiving of block 2024-10-28 12:54:36 +01:00
Mark Spanbroek
103da7497f refuse block that doesn't include parents from previous block with >2/3 stake 2024-10-28 10:56:23 +01:00
Mark Spanbroek
d39813f333 refuse blcok that includes a parent more than once 2024-10-24 15:00:13 +02:00
Mark Spanbroek
3220612690 validator refuses bad block proposals 2024-10-22 16:26:12 +02:00
Mark Spanbroek
4ae99f73e2 add tests for Rounds 2024-10-22 12:55:08 +02:00
Mark Spanbroek
1692bde0f4 add tests for Round 2024-10-22 12:29:55 +02:00
Mark Spanbroek
f3c013ced0 rename add() -> addProposal() 2024-10-21 13:35:07 +02:00
Mark Spanbroek
5c09e8ee3f move Round into its own module 2024-10-21 12:48:52 +02:00
Mark Spanbroek
65519a30f4 rename Rounds.new() to Rounds.init() 2024-10-21 11:16:08 +02:00
Mark Spanbroek
2d83d8066d cleanup 2024-10-21 11:06:31 +02:00
Mark Spanbroek
619c11c2ad simplify Validator.status() 2024-10-21 11:05:20 +02:00
Mark Spanbroek
c4d1300374 cleanup 2024-10-21 11:04:08 +02:00
Mark Spanbroek
30273d705c rename last and first to latest and oldest 2024-10-21 10:35:25 +02:00
Mark Spanbroek
903fffd101 make Rounds.first and Rounds.last read-only 2024-10-21 10:16:51 +02:00
Mark Spanbroek
d478e438b0 formatting 2024-10-17 16:06:50 +02:00
Mark Spanbroek
96295461ae find block by block id 2024-10-17 16:06:28 +02:00
Mark Spanbroek
6a400772cd move findAnchor to rounds module 2024-10-17 16:05:43 +02:00
Mark Spanbroek
fb153b7e9f move round-robin ordering of members to Round 2024-10-17 16:00:22 +02:00
Mark Spanbroek
fa2985718a make Round.slots private 2024-10-17 15:45:37 +02:00
Mark Spanbroek
33773f3e56 move more functions to round module 2024-10-17 15:15:09 +02:00
Mark Spanbroek
70f61d1ef6 introduce Round.find() 2024-10-17 15:13:39 +02:00
Mark Spanbroek
2dede094c8 move Rounds to rounds module 2024-10-17 14:46:40 +02:00
Mark Spanbroek
6250be0d97 create next round from last round 2024-10-17 14:42:40 +02:00
Mark Spanbroek
db46e9927f move Round to its own module 2024-10-17 14:35:50 +02:00
Mark Spanbroek
017d48c5c8 introduce Rounds type 2024-10-17 14:13:22 +02:00
Mark Spanbroek
c3b8429ed6 add tests for proposer slots 2024-10-16 15:08:24 +02:00
Mark Spanbroek
87da1b774d replace slot.certifiedProposal() by slot.proposal() 2024-10-14 13:33:38 +02:00
Mark Spanbroek
a91221d8f4 move proposer slots into their own module 2024-10-14 13:11:39 +02:00
Mark Spanbroek
83a1592fcb simplify handling of proposals 2024-10-07 16:31:16 +02:00
Mark Spanbroek
a2304160d8 separate modules for BlockId, SignedBlock and Transaction 2024-10-07 14:42:26 +02:00
Mark Spanbroek
0f8d59958f add tests for blocks and block ids 2024-10-07 14:29:52 +02:00
Mark Spanbroek
b50d455f7e add tests for Committee 2024-10-03 14:53:15 +02:00
Mark Spanbroek
70d3969564 simplify imports in tests 2024-10-03 14:36:03 +02:00
Mark Spanbroek
6b5529d6e2 rename tests 2024-10-03 10:23:41 +02:00
Mark Spanbroek
30872786e5 move CommitteeMember to its own module 2024-10-03 09:51:29 +02:00
Mark Spanbroek
9137edbfee remove Block's unnecessary dependency on Signing 2024-10-02 15:58:33 +02:00
Mark Spanbroek
75ad9d09d5 ignore warnings about .? operator 2024-10-02 15:44:16 +02:00
Mark Spanbroek
5aa7ee0fbd commit blocks using the indirect decision rule 2024-10-02 15:44:01 +02:00