mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Have Batch contain Block and batch ID, ensuring eclipsed validators don't publish invalid shares
See prior commit message for more info. With the plan for the batch sign ID to be just 5 bytes (potentially 4), this does incur a +5 bytes cost compared to the ExternalBlock system *even in the standard case*. The simplicity remains preferred at this time.
This commit is contained in:
@@ -103,9 +103,11 @@ fn serialize_transaction() {
|
||||
));
|
||||
|
||||
{
|
||||
let mut block = [0; 32];
|
||||
OsRng.fill_bytes(&mut block);
|
||||
let mut batch = [0; 32];
|
||||
OsRng.fill_bytes(&mut batch);
|
||||
test_read_write(Transaction::Batch(batch));
|
||||
test_read_write(Transaction::Batch(block, batch));
|
||||
}
|
||||
test_read_write(Transaction::SubstrateBlock(OsRng.next_u64()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user