Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalise Shelley ledger over TxSeq/TxInBlock.
The previous commits introduced the `SupportsSegWit` abstraction, but did not make use of it. This commit modifies Shelley to make use of it, with the following changes: - We add appropriate constraints on `TxInBlock` to `WellFormed`. - We realise we need to add an additional function to `SupportsSegWit`: `hashTxSeq`. This is not the regular hash function, since the block body uses a small Merkle tree in its hash. - Since the hash is now declared in `SupportsSegWit`, we drop the `BBodyHash` type. The normal Hash type already includes a type specifier, so having the newtype offers us little extra. - STS systems in general now rely on `TxInBlock` for the signal when applying transactions from a block. - The block decoding is modified to rely on `FromCBOR` for `Era.TxSeq`. This means that a small part of code (from `blockDecoder`) is now repeated, since it supports an additional flag in order to support `LaxBlock`. Since `LaxBlock` is a purely testing concern, we expect to remove it from the library entirely. - Some functions (`bbody`, `bheader`) etc are not modified to use the underlying `Block'` type, rather than the `Block` pattern, in order to avoid bringing in serialisation constraints. - Tests, as always, need to be massaged to keep working.
- Loading branch information
Showing
21 changed files
with
222 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.