Home / Input Output / ouroboros-network
94 commits this week Oct 14, 2019 - Oct 21, 2019

Merge #1122

1122: Fix MsgNoBlocks in-flight stats and tidy up tracing r=dcoutts a=dcoutts

In the block fetch client, do the TODO for updating the in-flight stats in the MsgNoBlocks case.

This should fix issue #1116

Also tidy up the tracing to make it a bit more coherent. Documented the tracer events better. Make them include more consistent information.

Added a batch start, to match the batch end. Also added a rejected event for the MsgNoBlocks case.

Co-authored-by: Duncan Coutts [email protected]

Merge #1122

1122: Fix MsgNoBlocks in-flight stats and tidy up tracing r=dcoutts a=dcoutts

In the block fetch client, do the TODO for updating the in-flight stats in the MsgNoBlocks case.

This should fix issue #1116

Also tidy up the tracing to make it a bit more coherent. Documented the tracer events better. Make them include more consistent information.

Added a batch start, to match the batch end. Also added a rejected event for the MsgNoBlocks case.

Co-authored-by: Duncan Coutts [email protected]

Merge #1146

1146: factor out actual leader schedule from growth schedule r=mrBliss a=nfrisby

Fixes #1145.

Praos test was incorrectly reusing the “growth schedule” as the “actual leader schedule”. This diff now now also computes the “actual leader schedule” so that Praos test can use it instead.

“Actual leader” excludes leaders that forged blocks they immediately discarded as invalid (cf PBFT threshold) and leaders that forged EBB (not an actual block).

Co-authored-by: Nicolas Frisby [email protected]

ChainDB.Model: look at SlotNo, not BlockNo for garbageCollectable

As the VolatileDB’s garbage collection is slot-based, we should look at the slot number to check whether a block is garbage-collectable instead of the block number.

We currently generate test blocks with such slot and block numbers that this difference doesn’t matter. This will change in a future commit.

ChainDB.Model: look at SlotNo, not BlockNo for garbageCollectable

As the VolatileDB’s garbage collection is slot-based, we should look at the slot number to check whether a block is garbage-collectable instead of the block number.

We currently generate test blocks with such slot and block numbers that this difference doesn’t matter. This will change in a future commit.

New TestBlock that includes EBBs for ChainDB and ImmutableDB

Addresses #872.

The test block used in the ChainDB did not include EBBs, so we weren’t properly testing that part of the ChainDB. The new test block uses a real hash instead of a clever and user/test-friendly hash (path through a tree). This trick only worked when the predecessor of the block was deterministic, so that we can derive the predecessor’s hash without having to store it. The new approach makes it easier to have arbitrary slot numbers, block numbers, invalid/valid blocks, EBBs or no EBBs, etc.

Switch the ImmutableDB tests to this block too, in preparation of #865, which also needs a working blockPrevHash.

Also move the ChainDB’s epochFileParser to ImmutableDB/Util.hs, as we use it in the ImmutableDB tests too.

New TestBlock that includes EBBs for ChainDB and ImmutableDB

Addresses #872.

The test block used in the ChainDB did not include EBBs, so we weren’t properly testing that part of the ChainDB. The new test block uses a real hash instead of a clever and user/test-friendly hash (path through a tree). This trick only worked when the predecessor of the block was deterministic, so that we can derive the predecessor’s hash without having to store it. The new approach makes it easier to have arbitrary slot numbers, block numbers, invalid/valid blocks, EBBs or no EBBs, etc.

Switch the ImmutableDB tests to this block too, in preparation of #865, which also needs a working blockPrevHash.

Also move the ChainDB’s epochFileParser to ImmutableDB/Util.hs, as we use it in the ImmutableDB tests too.

New TestBlock that includes EBBs for ChainDB and ImmutableDB

Addresses #872.

The test block used in the ChainDB did not include EBBs, so we weren’t properly testing that part of the ChainDB. The new test block uses a real hash instead of a clever and user/test-friendly hash (path through a tree). This trick only worked when the predecessor of the block was deterministic, so that we can derive the predecessor’s hash without having to store it. The new approach makes it easier to have arbitrary slot numbers, block numbers, invalid/valid blocks, EBBs or no EBBs, etc.

Switch the ImmutableDB tests to this block too, in preparation of #865, which also needs a working blockPrevHash.

Also move the ChainDB’s epochFileParser to ImmutableDB/Util.hs, as we use it in the ImmutableDB tests too.

New TestBlock that includes EBBs for ChainDB and ImmutableDB

Addresses #872.

The test block used in the ChainDB did not include EBBs, so we weren’t properly testing that part of the ChainDB. The new test block uses a real hash instead of a clever and user/test-friendly hash (path through a tree). This trick only worked when the predecessor of the block was deterministic, so that we can derive the predecessor’s hash without having to store it. The new approach makes it easier to have arbitrary slot numbers, block numbers, invalid/valid blocks, EBBs or no EBBs, etc.

Switch the ImmutableDB tests to this block too, in preparation of #865, which also needs a working blockPrevHash.

Also move the ChainDB’s epochFileParser to ImmutableDB/Util.hs, as we use it in the ImmutableDB tests too.