diff --git a/CODEOWNERS b/CODEOWNERS index b8ea65074b..4391f58fce 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,4 @@ # Ouroboros-Consensus # These owners will be the default owners for everything in the repository. -* @nfrisby @jasagredo @amesgen @fraser-iohk @dnadales +* @nfrisby @jasagredo @amesgen @fraser-iohk @dnadales @geo2a diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd11eaa851..46efafa548 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -370,6 +370,8 @@ The core contributors to consensus codebase are: - [Damian Nadales](https://github.com/dnadales) +- [Georgy Lukyanov](https://github.com/geo2a) + # Code of conduct See [Cardano engineering diff --git a/cabal.project b/cabal.project index 5bc613b1a8..25f95e93ee 100644 --- a/cabal.project +++ b/cabal.project @@ -47,3 +47,10 @@ if(os(windows)) -- https://github.com/ulidtko/cabal-doctest/issues/85 constraints: Cabal < 3.13 + +source-repository-package + type: git + location: https://github.com/input-output-hk/ouroboros-network + -- branch: fraser-iohk/one-era-gen-tx-id-protocol-version-bump + tag: 5bbd1696304d82968c3055dfcf2380ee66bb56a0 + subdir: ouroboros-network-api diff --git a/ouroboros-consensus-cardano/golden/byron/ByronNodeToNodeVersion2/GenTxId b/ouroboros-consensus-cardano/golden/byron/ByronNodeToNodeVersion2/GenTxId index 9511ba87ee..a0a1e937dc 100644 Binary files a/ouroboros-consensus-cardano/golden/byron/ByronNodeToNodeVersion2/GenTxId and b/ouroboros-consensus-cardano/golden/byron/ByronNodeToNodeVersion2/GenTxId differ diff --git a/ouroboros-consensus-cardano/golden/byron/QueryVersion1/ByronNodeToClientVersion1/GenTxId b/ouroboros-consensus-cardano/golden/byron/QueryVersion1/ByronNodeToClientVersion1/GenTxId index 9511ba87ee..a0a1e937dc 100644 Binary files a/ouroboros-consensus-cardano/golden/byron/QueryVersion1/ByronNodeToClientVersion1/GenTxId and b/ouroboros-consensus-cardano/golden/byron/QueryVersion1/ByronNodeToClientVersion1/GenTxId differ diff --git a/ouroboros-consensus-cardano/golden/byron/QueryVersion2/ByronNodeToClientVersion1/GenTxId b/ouroboros-consensus-cardano/golden/byron/QueryVersion2/ByronNodeToClientVersion1/GenTxId index 9511ba87ee..a0a1e937dc 100644 Binary files a/ouroboros-consensus-cardano/golden/byron/QueryVersion2/ByronNodeToClientVersion1/GenTxId and b/ouroboros-consensus-cardano/golden/byron/QueryVersion2/ByronNodeToClientVersion1/GenTxId differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Conway index 8f2268ce3f..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Conway @@ -1 +1 @@ -X K8aLs,а^"5J \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Allegra new file mode 100644 index 0000000000..b525fa7868 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Allegra differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Alonzo new file mode 100644 index 0000000000..dc3903d3a6 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Alonzo differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Babbage new file mode 100644 index 0000000000..279d590c81 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Babbage differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_EBB b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_EBB new file mode 100644 index 0000000000..d2bc47fdf7 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_EBB differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_regular b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_regular new file mode 100644 index 0000000000..ce89fa545b Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Byron_regular differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Conway new file mode 100644 index 0000000000..5ae5c5065d Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Conway differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Mary new file mode 100644 index 0000000000..14d8281f93 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Mary differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Shelley b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Shelley new file mode 100644 index 0000000000..7d900c96a8 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Block_Shelley differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Allegra new file mode 100644 index 0000000000..8507fa8715 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Allegra @@ -0,0 +1,3 @@ +X cA:^D d +uS| ] +q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Alonzo new file mode 100644 index 0000000000..0e06fd5e02 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Alonzo @@ -0,0 +1 @@ +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Babbage new file mode 100644 index 0000000000..f875b3bdec --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Babbage @@ -0,0 +1 @@ +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Byron new file mode 100644 index 0000000000..a0a1e937dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Byron @@ -0,0 +1 @@ +X K9 ҽC0F0. b \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Conway new file mode 100644 index 0000000000..426c12e555 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Conway @@ -0,0 +1 @@ +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Mary new file mode 100644 index 0000000000..dd7df1c0fc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Mary @@ -0,0 +1 @@ +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion1/ShelleyNodeToClientVersion5/GenTxId b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Shelley similarity index 100% rename from ouroboros-consensus-cardano/golden/shelley/QueryVersion1/ShelleyNodeToClientVersion5/GenTxId rename to ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTxId_Shelley diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Allegra new file mode 100644 index 0000000000..786e482302 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Allegra differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Alonzo new file mode 100644 index 0000000000..558dfbcca8 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Alonzo differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Babbage new file mode 100644 index 0000000000..0be195e3f1 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Babbage differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Byron b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Byron new file mode 100644 index 0000000000..9c10e1bb39 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Conway new file mode 100644 index 0000000000..9d1ce51c81 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Conway differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Mary new file mode 100644 index 0000000000..1d7d61fa77 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Mary differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Shelley b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Shelley new file mode 100644 index 0000000000..d41c1aacc8 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/GenTx_Shelley differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Allegra new file mode 100644 index 0000000000..2d2c467c6f Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Allegra differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Alonzo new file mode 100644 index 0000000000..a446de19eb Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Alonzo differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Babbage new file mode 100644 index 0000000000..91d4f95385 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Babbage differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_EBB b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_EBB new file mode 100644 index 0000000000..f69f3d5796 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_EBB differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_regular b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_regular new file mode 100644 index 0000000000..749614e068 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Byron_regular differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Conway new file mode 100644 index 0000000000..7bea7230e7 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Conway differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Mary new file mode 100644 index 0000000000..b07156aa39 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Mary differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Shelley b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Shelley new file mode 100644 index 0000000000..2aad81040d Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/Header_Shelley differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Allegra new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Allegra @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Alonzo new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Alonzo @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Babbage new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Babbage @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_EBB b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_EBB new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_EBB @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_regular b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_regular new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Byron_regular @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Conway new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Conway @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Mary new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Mary @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Shelley b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Shelley new file mode 100644 index 0000000000..6a5024d0dc --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedBlock_Shelley @@ -0,0 +1 @@ +O \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Allegra b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Allegra new file mode 100644 index 0000000000..fc2db110cd --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Allegra @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Alonzo b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Alonzo new file mode 100644 index 0000000000..bd4f42fa98 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Alonzo @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Babbage b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Babbage new file mode 100644 index 0000000000..ea805c4a85 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Babbage @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_EBB b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_EBB new file mode 100644 index 0000000000..71629ccde7 Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_EBB differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_regular b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_regular new file mode 100644 index 0000000000..9f4c849c9c Binary files /dev/null and b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Byron_regular differ diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Conway b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Conway new file mode 100644 index 0000000000..9225aa4174 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Conway @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Mary b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Mary new file mode 100644 index 0000000000..f8aa87eb5c --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Mary @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Shelley b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Shelley new file mode 100644 index 0000000000..d5a1a05c35 --- /dev/null +++ b/ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion3/SerialisedHeader_Shelley @@ -0,0 +1 @@ +H
\ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Babbage index 0d2b383718..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Babbage @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Babbage"}) \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion1/CardanoNodeToClientVersion7/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion10/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion11/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Conway index 8f2268ce3f..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Conway @@ -1 +1 @@ -X K8aLs,а^"5J \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion12/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Conway index 8f2268ce3f..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Conway @@ -1 +1 @@ -X K8aLs,а^"5J \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion13/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Conway index 8f2268ce3f..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Conway @@ -1 +1 @@ -X K8aLs,а^"5J \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion14/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Allegra index 61ec98ae96..8507fa8715 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Alonzo index 6e6d3158a7..0e06fd5e02 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Babbage index 3c56b72b00..f875b3bdec 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Byron index a07d334baa..a0a1e937dc 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Conway index 8f2268ce3f..426c12e555 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Conway @@ -1 +1 @@ -X K8aLs,а^"5J \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Mary index 1235567289..dd7df1c0fc 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Shelley b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Shelley index 667dbef8ea..b26e394526 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Shelley +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion15/GenTxId_Shelley @@ -1 +1 @@ -X np+t3NUe<Ҷ= \ No newline at end of file +X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Babbage index 0d2b383718..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Babbage @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Babbage"}) \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion7/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Babbage index 0d2b383718..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Babbage @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Babbage"}) \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion8/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Allegra b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Allegra index 61ec98ae96..a1b108b647 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Allegra +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Allegra @@ -1,3 +1,3 @@ -X cA:^D d +X cA:^D d uS| ] q \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Alonzo b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Alonzo index 6e6d3158a7..3c280119f4 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Alonzo +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Alonzo @@ -1 +1 @@ -X 3? GCa\ո1%Eg# +X 3? GCa\ո1%Eg# diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Babbage b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Babbage index 3c56b72b00..0a9e8f1976 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Babbage +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Babbage @@ -1 +1 @@ -X M~@)_ur7WH5O2$h h \ No newline at end of file +X M~@)_ur7WH5O2$h h \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Byron b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Byron index a07d334baa..3ccdd3059b 100644 Binary files a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Byron and b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Byron differ diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Conway b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Conway index 121d3fcf34..c795639f31 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Conway +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Conway @@ -1 +1 @@ -HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Conway"}) \ No newline at end of file +X K8aLs,а^"5J \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Mary b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Mary index 1235567289..ead4fbe073 100644 --- a/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Mary +++ b/ouroboros-consensus-cardano/golden/cardano/QueryVersion2/CardanoNodeToClientVersion9/GenTxId_Mary @@ -1 +1 @@ -X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file +X Ճ(x.x_GFߖ} Ԉh+ ޢ \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion10/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion10/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion10/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion11/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion11/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion11/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion5/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion5/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion5/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion6/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion6/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion6/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion7/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion7/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion7/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion8/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion8/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion8/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion9/GenTxId b/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion9/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/QueryVersion2/ShelleyNodeToClientVersion9/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/golden/shelley/ShelleyNodeToNodeVersion1/GenTxId b/ouroboros-consensus-cardano/golden/shelley/ShelleyNodeToNodeVersion1/GenTxId deleted file mode 100644 index b26e394526..0000000000 --- a/ouroboros-consensus-cardano/golden/shelley/ShelleyNodeToNodeVersion1/GenTxId +++ /dev/null @@ -1 +0,0 @@ -X np+t3NUe<Ҷ= \ No newline at end of file diff --git a/ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal b/ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal index df32ce0c7f..7164c59b70 100644 --- a/ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal +++ b/ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal @@ -435,6 +435,7 @@ test-suite cardano-test base16-bytestring, bytestring, cardano-crypto-class, + cardano-crypto-wrapper, cardano-ledger-alonzo, cardano-ledger-alonzo-test, cardano-ledger-api, diff --git a/ouroboros-consensus-cardano/src/byron/Ouroboros/Consensus/Byron/Ledger/Mempool.hs b/ouroboros-consensus-cardano/src/byron/Ouroboros/Consensus/Byron/Ledger/Mempool.hs index 8200ddf8c1..1241a6f31b 100644 --- a/ouroboros-consensus-cardano/src/byron/Ouroboros/Consensus/Byron/Ledger/Mempool.hs +++ b/ouroboros-consensus-cardano/src/byron/Ouroboros/Consensus/Byron/Ledger/Mempool.hs @@ -6,7 +6,9 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -Wno-orphans #-} @@ -16,6 +18,10 @@ module Ouroboros.Consensus.Byron.Ledger.Mempool ( GenTx (..) , TxId (..) , Validated (..) + , pattern ByronDlgId + , pattern ByronTxId + , pattern ByronUpdateProposalId + , pattern ByronUpdateVoteId -- * Transaction IDs , byronIdDlg , byronIdProp @@ -44,20 +50,17 @@ import qualified Cardano.Chain.UTxO as Utxo import qualified Cardano.Chain.ValidationMode as CC import Cardano.Crypto (hashDecoded) import qualified Cardano.Crypto as CC -import Cardano.Ledger.Binary (ByteSpan, DecoderError (..), - byronProtVer, fromByronCBOR, serialize, slice, toByronCBOR, - unsafeDeserialize) -import Cardano.Ledger.Binary.Plain (enforceSize) -import Cardano.Prelude (Natural, cborError) +import Cardano.Ledger.Binary (ByteSpan, byronProtVer, fromByronCBOR, + serialize, slice, toByronCBOR, unsafeDeserialize) +import Cardano.Prelude (Natural) import Codec.CBOR.Decoding (Decoder) -import qualified Codec.CBOR.Decoding as CBOR import Codec.CBOR.Encoding (Encoding) -import qualified Codec.CBOR.Encoding as CBOR import Control.Monad (void) import Control.Monad.Except (Except, throwError) import Data.ByteString (ByteString) import qualified Data.ByteString as Strict import qualified Data.ByteString.Lazy as Lazy +import Data.Coerce import Data.Maybe (maybeToList) import Data.Word import GHC.Generics (Generic) @@ -83,10 +86,10 @@ import Ouroboros.Consensus.Util.Condense -- This is effectively the same as 'CC.AMempoolPayload' but we cache the -- transaction ID (a hash). data instance GenTx ByronBlock - = ByronTx !Utxo.TxId !(Utxo.ATxAux ByteString) - | ByronDlg !Delegation.CertificateId !(Delegation.ACertificate ByteString) - | ByronUpdateProposal !Update.UpId !(Update.AProposal ByteString) - | ByronUpdateVote !Update.VoteId !(Update.AVote ByteString) + = ByronTx !(GenTxId ByronBlock) !(Utxo.ATxAux ByteString) + | ByronDlg !(GenTxId ByronBlock) !(Delegation.ACertificate ByteString) + | ByronUpdateProposal !(GenTxId ByronBlock) !(Update.AProposal ByteString) + | ByronUpdateVote !(GenTxId ByronBlock) !(Update.AVote ByteString) deriving (Eq, Generic) deriving NoThunks via InspectHeapNamed "GenTx ByronBlock" (GenTx ByronBlock) @@ -157,26 +160,47 @@ instance TxLimits ByronBlock where $ Utxo.TxValidationTxTooLarge txszNat maxTxSize data instance TxId (GenTx ByronBlock) - = ByronTxId !Utxo.TxId - | ByronDlgId !Delegation.CertificateId - | ByronUpdateProposalId !Update.UpId - | ByronUpdateVoteId !Update.VoteId + = ByronGenTxId !(CC.Hash (GenTx ByronBlock)) deriving (Eq, Ord) deriving NoThunks via InspectHeapNamed "TxId (GenTx ByronBlock)" (TxId (GenTx ByronBlock)) instance ShowProxy (TxId (GenTx ByronBlock)) where instance HasTxId (GenTx ByronBlock) where - txId (ByronTx i _) = ByronTxId i - txId (ByronDlg i _) = ByronDlgId i - txId (ByronUpdateProposal i _) = ByronUpdateProposalId i - txId (ByronUpdateVote i _) = ByronUpdateVoteId i + txId (ByronTx i _) = i + txId (ByronDlg i _) = i + txId (ByronUpdateProposal i _) = i + txId (ByronUpdateVote i _) = i instance ConvertRawTxId (GenTx ByronBlock) where - toRawTxIdHash (ByronTxId i) = CC.abstractHashToShort i - toRawTxIdHash (ByronDlgId i) = CC.abstractHashToShort i - toRawTxIdHash (ByronUpdateProposalId i) = CC.abstractHashToShort i - toRawTxIdHash (ByronUpdateVoteId i) = CC.abstractHashToShort i + toRawTxIdHash (ByronGenTxId i) = CC.abstractHashToShort i + +castAbstractHash :: CC.Hash a -> CC.Hash b +castAbstractHash = coerce + +pattern ByronTxId :: Utxo.TxId -> TxId (GenTx ByronBlock) +pattern ByronTxId i <- ByronGenTxId (castAbstractHash -> i) + where ByronTxId i = ByronGenTxId (castAbstractHash i) + +{-# COMPLETE ByronTxId #-} + +pattern ByronDlgId :: Delegation.CertificateId -> TxId (GenTx ByronBlock) +pattern ByronDlgId i <- ByronGenTxId (castAbstractHash -> i) + where ByronDlgId i = ByronGenTxId (castAbstractHash i) + +{-# COMPLETE ByronDlgId #-} + +pattern ByronUpdateProposalId :: Update.UpId -> TxId (GenTx ByronBlock) +pattern ByronUpdateProposalId i <- ByronGenTxId (castAbstractHash -> i) + where ByronUpdateProposalId i = ByronGenTxId (castAbstractHash i) + +{-# COMPLETE ByronUpdateProposalId #-} + +pattern ByronUpdateVoteId :: Update.VoteId -> TxId (GenTx ByronBlock) +pattern ByronUpdateVoteId i <- ByronGenTxId (castAbstractHash -> i) + where ByronUpdateVoteId i = ByronGenTxId (castAbstractHash i) + +{-# COMPLETE ByronUpdateVoteId #-} instance HasTxs ByronBlock where extractTxs blk = case byronBlockRaw blk of @@ -221,17 +245,17 @@ fromMempoolPayload = go -------------------------------------------------------------------------------} -- TODO: move to cardano-ledger-byron (cardano-ledger-byron#581) -byronIdTx :: Utxo.ATxAux ByteString -> Utxo.TxId -byronIdTx = hashDecoded . Utxo.aTaTx +byronIdTx :: Utxo.ATxAux ByteString -> GenTxId ByronBlock +byronIdTx = ByronTxId . hashDecoded . Utxo.aTaTx -byronIdDlg :: Delegation.ACertificate ByteString -> Delegation.CertificateId -byronIdDlg = Delegation.recoverCertificateId +byronIdDlg :: Delegation.ACertificate ByteString -> GenTxId ByronBlock +byronIdDlg = ByronDlgId . Delegation.recoverCertificateId -byronIdProp :: Update.AProposal ByteString -> Update.UpId -byronIdProp = Update.recoverUpId +byronIdProp :: Update.AProposal ByteString -> GenTxId ByronBlock +byronIdProp = ByronUpdateProposalId . Update.recoverUpId -byronIdVote :: Update.AVote ByteString -> Update.VoteId -byronIdVote = Update.recoverVoteId +byronIdVote :: Update.AVote ByteString -> GenTxId ByronBlock +byronIdVote = ByronUpdateVoteId . Update.recoverVoteId {------------------------------------------------------------------------------- Pretty-printing @@ -241,10 +265,7 @@ instance Condense (GenTx ByronBlock) where condense = condense . toMempoolPayload instance Condense (GenTxId ByronBlock) where - condense (ByronTxId i) = condense i - condense (ByronDlgId i) = condense i - condense (ByronUpdateProposalId i) = condense i - condense (ByronUpdateVoteId i) = condense i + condense (ByronGenTxId i) = show $ CC.abstractHashToShort i instance Show (GenTx ByronBlock) where show = condense @@ -313,24 +334,10 @@ decodeByronGenTx = fromMempoolPayload . canonicalise <$> fromByronCBOR mp' = unsafeDeserialize byronProtVer canonicalBytes encodeByronGenTxId :: GenTxId ByronBlock -> Encoding -encodeByronGenTxId genTxId = mconcat [ - CBOR.encodeListLen 2 - , case genTxId of - ByronTxId i -> toByronCBOR (0 :: Word8) <> toByronCBOR i - ByronDlgId i -> toByronCBOR (1 :: Word8) <> toByronCBOR i - ByronUpdateProposalId i -> toByronCBOR (2 :: Word8) <> toByronCBOR i - ByronUpdateVoteId i -> toByronCBOR (3 :: Word8) <> toByronCBOR i - ] +encodeByronGenTxId (ByronGenTxId i) = toByronCBOR i decodeByronGenTxId :: Decoder s (GenTxId ByronBlock) -decodeByronGenTxId = do - enforceSize "GenTxId (ByronBlock cfg)" 2 - CBOR.decodeWord8 >>= \case - 0 -> ByronTxId <$> fromByronCBOR - 1 -> ByronDlgId <$> fromByronCBOR - 2 -> ByronUpdateProposalId <$> fromByronCBOR - 3 -> ByronUpdateVoteId <$> fromByronCBOR - tag -> cborError $ DecoderErrorUnknownTag "GenTxId (ByronBlock cfg)" tag +decodeByronGenTxId = ByronGenTxId <$> fromByronCBOR encodeByronApplyTxError :: ApplyTxErr ByronBlock -> Encoding encodeByronApplyTxError = toByronCBOR diff --git a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Block.hs b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Block.hs index ac41aafe2f..73bf584ddf 100644 --- a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Block.hs +++ b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Block.hs @@ -29,7 +29,7 @@ module Ouroboros.Consensus.Cardano.Block ( , CardanoGenTxId , GenTx (GenTxAllegra, GenTxAlonzo, GenTxByron, GenTxMary, GenTxShelley, GenTxBabbage, GenTxConway) , HardForkApplyTxErr (ApplyTxErrAllegra, ApplyTxErrAlonzo, ApplyTxErrByron, ApplyTxErrMary, ApplyTxErrShelley, ApplyTxErrWrongEra, ApplyTxErrBabbage, ApplyTxErrConway) - , TxId (GenTxIdAllegra, GenTxIdAlonzo, GenTxIdByron, GenTxIdMary, GenTxIdShelley, GenTxIdBabbage, GenTxIdConway) + , TxId (CardanoGenTxId) -- * LedgerError , CardanoLedgerError , HardForkLedgerError (LedgerErrorAllegra, LedgerErrorAlonzo, LedgerErrorByron, LedgerErrorMary, LedgerErrorShelley, LedgerErrorWrongEra, LedgerErrorBabbage, LedgerErrorConway) @@ -69,6 +69,7 @@ module Ouroboros.Consensus.Cardano.Block ( , EraMismatch (..) ) where +import Data.ByteString.Short (ShortByteString) import Data.Kind import Data.SOP.BasicFunctors import Data.SOP.Strict @@ -349,54 +350,10 @@ pattern GenTxConway tx = HardForkGenTx (OneEraGenTx (TagConway tx)) -- | The ID of a Cardano transaction. type CardanoGenTxId c = GenTxId (CardanoBlock c) -pattern GenTxIdByron :: GenTxId ByronBlock -> CardanoGenTxId c -pattern GenTxIdByron txid = - HardForkGenTxId (OneEraGenTxId (TagByron (WrapGenTxId txid))) - -pattern GenTxIdShelley :: - GenTxId (ShelleyBlock (TPraos c) (ShelleyEra c)) - -> CardanoGenTxId c -pattern GenTxIdShelley txid = - HardForkGenTxId (OneEraGenTxId (TagShelley (WrapGenTxId txid))) - -pattern GenTxIdAllegra :: - GenTxId (ShelleyBlock (TPraos c) (AllegraEra c)) - -> CardanoGenTxId c -pattern GenTxIdAllegra txid = - HardForkGenTxId (OneEraGenTxId (TagAllegra (WrapGenTxId txid))) - -pattern GenTxIdMary :: - GenTxId (ShelleyBlock (TPraos c) (MaryEra c)) - -> CardanoGenTxId c -pattern GenTxIdMary txid = - HardForkGenTxId (OneEraGenTxId (TagMary (WrapGenTxId txid))) - -pattern GenTxIdAlonzo :: - GenTxId (ShelleyBlock (TPraos c) (AlonzoEra c)) - -> CardanoGenTxId c -pattern GenTxIdAlonzo txid = - HardForkGenTxId (OneEraGenTxId (TagAlonzo (WrapGenTxId txid))) - -pattern GenTxIdBabbage :: - GenTxId (ShelleyBlock (Praos c) (BabbageEra c)) - -> CardanoGenTxId c -pattern GenTxIdBabbage txid = - HardForkGenTxId (OneEraGenTxId (TagBabbage (WrapGenTxId txid))) - -pattern GenTxIdConway :: - GenTxId (ShelleyBlock (Praos c) (ConwayEra c)) - -> CardanoGenTxId c -pattern GenTxIdConway txid = - HardForkGenTxId (OneEraGenTxId (TagConway (WrapGenTxId txid))) - -{-# COMPLETE GenTxIdByron - , GenTxIdShelley - , GenTxIdAllegra - , GenTxIdMary - , GenTxIdAlonzo - , GenTxIdBabbage - , GenTxIdConway - #-} +pattern CardanoGenTxId :: ShortByteString -> CardanoGenTxId c +pattern CardanoGenTxId txid = HardForkGenTxId (OneEraGenTxId txid) + +{-# COMPLETE CardanoGenTxId #-} -- | An error resulting from applying a 'CardanoGenTx' to the ledger. -- diff --git a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/ByronHFC.hs b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/ByronHFC.hs index 140c633968..d61af2adb0 100644 --- a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/ByronHFC.hs +++ b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/ByronHFC.hs @@ -7,6 +7,7 @@ module Ouroboros.Consensus.Cardano.ByronHFC (ByronBlockHFC) where import qualified Data.Map.Strict as Map +import Data.SOP.Strict.NS import Ouroboros.Consensus.Block import Ouroboros.Consensus.Byron.Ledger import Ouroboros.Consensus.Byron.Node () @@ -60,6 +61,9 @@ instance SupportedNetworkProtocolVersion ByronBlockHFC where SerialiseHFC instance -------------------------------------------------------------------------------} +instance HasBlessedGenTxIdEra '[ByronBlock] where + blessedGenTxIdEra = Z mempty + -- | Forward to the ByronBlock instance, this means we don't add an era -- wrapper around blocks on disk. This makes sure we're compatible with the -- existing Byron blocks. diff --git a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs index f54245242f..1c96739572 100644 --- a/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs +++ b/ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs @@ -59,6 +59,7 @@ module Ouroboros.Consensus.Cardano.Node ( , pattern CardanoNodeToClientVersion9 , pattern CardanoNodeToNodeVersion1 , pattern CardanoNodeToNodeVersion2 + , pattern CardanoNodeToNodeVersion3 ) where import Cardano.Binary (DecoderError (..), enforceSize) @@ -130,6 +131,12 @@ import Ouroboros.Consensus.Util.IOLike instance SerialiseConstraintsHFC ByronBlock +instance HasBlessedGenTxIdEra (CardanoShelleyEras c) where + blessedGenTxIdEra = Z mempty + +instance HasBlessedGenTxIdEra (CardanoEras c) where + blessedGenTxIdEra = S blessedGenTxIdEra + -- | Important: we need to maintain binary compatibility with Byron blocks, as -- they are already stored on disk. -- @@ -272,6 +279,20 @@ pattern CardanoNodeToNodeVersion2 = :* Nil ) +pattern CardanoNodeToNodeVersion3 :: BlockNodeToNodeVersion (CardanoBlock c) +pattern CardanoNodeToNodeVersion3 = + HardForkNodeToNodeEnabled + HardForkSpecificNodeToNodeVersion2 + ( WrapNodeToNodeVersion ByronNodeToNodeVersion2 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* WrapNodeToNodeVersion ShelleyNodeToNodeVersion1 + :* Nil + ) + -- | We support the sole Byron version with the hard fork disabled. pattern CardanoNodeToClientVersion1 :: BlockNodeToClientVersion (CardanoBlock c) pattern CardanoNodeToClientVersion1 = @@ -494,13 +515,13 @@ pattern CardanoNodeToClientVersion14 = :* Nil ) --- | The hard fork enabled, and the Shelley, Allegra, Mary, Alonzo and Babbage --- and Conway eras enabled, using 'ShelleyNodeToClientVersion11' for the --- Shelley-based eras. +-- | The hard fork enabled, using 'HardForkSpecificNodeToClientVersion4', and +-- the Shelley, Allegra, Mary, Alonzo and Babbage and Conway eras enabled, +-- using 'ShelleyNodeToClientVersion11' for the Shelley-based eras. pattern CardanoNodeToClientVersion15 :: BlockNodeToClientVersion (CardanoBlock c) pattern CardanoNodeToClientVersion15 = HardForkNodeToClientEnabled - HardForkSpecificNodeToClientVersion3 + HardForkSpecificNodeToClientVersion4 ( EraNodeToClientEnabled ByronNodeToClientVersion1 :* EraNodeToClientEnabled ShelleyNodeToClientVersion11 :* EraNodeToClientEnabled ShelleyNodeToClientVersion11 @@ -516,6 +537,7 @@ instance CardanoHardForkConstraints c supportedNodeToNodeVersions _ = Map.fromList $ [ (NodeToNodeV_13, CardanoNodeToNodeVersion2) , (NodeToNodeV_14, CardanoNodeToNodeVersion2) + , (NodeToNodeV_15, CardanoNodeToNodeVersion3) ] supportedNodeToClientVersions _ = Map.fromList $ @@ -532,7 +554,7 @@ instance CardanoHardForkConstraints c , (NodeToClientV_19, CardanoNodeToClientVersion15) ] - latestReleasedNodeVersion _prx = (Just NodeToNodeV_14, Just NodeToClientV_19) + latestReleasedNodeVersion _prx = (Just NodeToNodeV_15, Just NodeToClientV_19) {------------------------------------------------------------------------------- ProtocolInfo diff --git a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs index 01b79c62ee..bba8285d3e 100644 --- a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs +++ b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs @@ -57,6 +57,7 @@ instance SupportedNetworkProtocolVersion (ShelleyBlock proto era) where supportedNodeToNodeVersions _ = Map.fromList [ (NodeToNodeV_13, ShelleyNodeToNodeVersion1) , (NodeToNodeV_14, ShelleyNodeToNodeVersion1) + , (NodeToNodeV_15, ShelleyNodeToNodeVersion1) ] supportedNodeToClientVersions _ = Map.fromList [ (NodeToClientV_9, ShelleyNodeToClientVersion5) diff --git a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/ShelleyHFC.hs b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/ShelleyHFC.hs index 1527dc8c6c..bc227ae690 100644 --- a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/ShelleyHFC.hs +++ b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/ShelleyHFC.hs @@ -36,6 +36,7 @@ import Data.Coerce import qualified Data.Map.Strict as Map import Data.SOP.BasicFunctors import Data.SOP.InPairs (RequiringBoth (..), ignoringBoth) +import Data.SOP.Strict.NS import qualified Data.Text as T (pack) import Data.Void (Void) import Data.Word @@ -115,6 +116,9 @@ instance ( ShelleyCompatible proto era SerialiseHFC instance -------------------------------------------------------------------------------} +instance HasBlessedGenTxIdEra '[ShelleyBlock proto era] where + blessedGenTxIdEra = Z mempty + -- | Use the default implementations. This means the serialisation of blocks -- includes an era wrapper. Each block should do this from the start to be -- prepared for future hard forks without having to do any bit twiddling. diff --git a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Ouroboros/Consensus/ByronDual/Ledger.hs b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Ouroboros/Consensus/ByronDual/Ledger.hs index 52778758b7..497f9c5516 100644 --- a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Ouroboros/Consensus/ByronDual/Ledger.hs +++ b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Ouroboros/Consensus/ByronDual/Ledger.hs @@ -30,6 +30,7 @@ import qualified Cardano.Chain.UTxO as Impl import Cardano.Crypto.DSIGN.Class import Codec.Serialise import Data.ByteString (ByteString) +import Data.Coerce import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import qualified Data.Set as Set @@ -82,13 +83,17 @@ instance Monoid SpecToImplIds where -- | Construct singleton 'SpecToImplIds' for a transaction specToImplTx :: Spec.Tx -> Impl.ATxAux ByteString -> SpecToImplIds specToImplTx spec impl = SpecToImplIds $ Spec.Test.AbstractToConcreteIdMaps { - transactionIds = Map.singleton (specTxId spec) (byronIdTx impl) + transactionIds = + Map.singleton (specTxId spec) (byronGenTxIdToTxId $ byronIdTx impl) , proposalIds = Map.empty } where specTxId :: Spec.Tx -> Spec.TxId specTxId = Spec.txid . Spec.body + byronGenTxIdToTxId :: TxId (GenTx ByronBlock) -> Impl.TxId + byronGenTxIdToTxId (ByronGenTxId i) = coerce i + {------------------------------------------------------------------------------- Bridge -------------------------------------------------------------------------------} diff --git a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Examples.hs b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Examples.hs index 9626d98aa9..cce9ce7a4d 100644 --- a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Examples.hs +++ b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Examples.hs @@ -28,7 +28,9 @@ import qualified Cardano.Chain.Byron.API as CC import qualified Cardano.Chain.Common as CC import qualified Cardano.Chain.Update.Validation.Interface as CC.UPI import qualified Cardano.Chain.UTxO as CC +import qualified Cardano.Crypto.Hashing as Crypto import Control.Monad.Except (runExcept) +import Data.Coerce import qualified Data.Map.Strict as Map import Ouroboros.Consensus.Block import Ouroboros.Consensus.Byron.Crypto.DSIGN (SignKeyDSIGN (..)) @@ -202,11 +204,14 @@ exampleExtLedgerState = ExtLedgerState { exampleHeaderHash :: ByronHash exampleHeaderHash = blockHash exampleBlock +exampleTxId :: Crypto.Hash (GenTx ByronBlock) +exampleTxId = coerce CC.exampleTxId + exampleGenTx :: GenTx ByronBlock -exampleGenTx = ByronTx CC.exampleTxId (CC.annotateTxAux CC.exampleTxAux) +exampleGenTx = ByronTx exampleGenTxId (CC.annotateTxAux CC.exampleTxAux) exampleGenTxId :: TxId (GenTx ByronBlock) -exampleGenTxId = ByronTxId CC.exampleTxId +exampleGenTxId = ByronGenTxId exampleTxId exampleUPIState :: CC.UPI.State exampleUPIState = CC.UPI.initialState ledgerConfig diff --git a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs index ee39d62924..6e5a098b21 100644 --- a/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs +++ b/ouroboros-consensus-cardano/src/unstable-byron-testlib/Test/Consensus/Byron/Generators.hs @@ -137,10 +137,10 @@ instance Arbitrary (GenTx ByronBlock) where instance Arbitrary (GenTxId ByronBlock) where arbitrary = oneof - [ ByronTxId <$> hedgehog CC.genTxId - , ByronDlgId <$> hedgehog genCertificateId + [ ByronTxId <$> hedgehog CC.genTxId + , ByronDlgId <$> hedgehog genCertificateId , ByronUpdateProposalId <$> hedgehog (UG.genUpId protocolMagicId) - , ByronUpdateVoteId <$> hedgehog genUpdateVoteId + , ByronUpdateVoteId <$> hedgehog genUpdateVoteId ] where genCertificateId = CC.genAbstractHash (CC.genCertificate protocolMagicId) diff --git a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Examples.hs b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Examples.hs index 95038ff6cf..9212e8e2eb 100644 --- a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Examples.hs +++ b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Examples.hs @@ -119,7 +119,7 @@ instance Inject Examples where , exampleSerialisedHeader = inj (Proxy @SerialisedHeader) exampleSerialisedHeader , exampleHeaderHash = inj (Proxy @WrapHeaderHash) exampleHeaderHash , exampleGenTx = inj (Proxy @GenTx) exampleGenTx - , exampleGenTxId = inj (Proxy @WrapGenTxId) exampleGenTxId + , exampleGenTxId = inj (Proxy @WrapGenTxId) exampleGenTxId , exampleApplyTxErr = inj (Proxy @WrapApplyTxErr) exampleApplyTxErr , exampleQuery = inj (Proxy @(SomeSecond BlockQuery)) exampleQuery , exampleResult = inj (Proxy @SomeResult) exampleResult diff --git a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Generators.hs b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Generators.hs index ee869afc94..f2d3fbab10 100644 --- a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Generators.hs +++ b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/Consensus/Cardano/Generators.hs @@ -39,6 +39,8 @@ import Ouroboros.Consensus.HardFork.Combinator import Ouroboros.Consensus.HardFork.Combinator.Serialisation import qualified Ouroboros.Consensus.HardFork.History as History import Ouroboros.Consensus.HeaderValidation +import Ouroboros.Consensus.Ledger.SupportsMempool + (ConvertRawTxId (..)) import Ouroboros.Consensus.Node.NetworkProtocolVersion import Ouroboros.Consensus.Node.Serialisation (Some (..)) import Ouroboros.Consensus.Protocol.TPraos (TPraos) @@ -256,7 +258,11 @@ instance c ~ MockCryptoCompatByron instance c ~ MockCryptoCompatByron => Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTxId c)) where - arbitrary = arbitraryNodeToNode GenTxIdByron GenTxIdShelley GenTxIdAllegra GenTxIdMary GenTxIdAlonzo GenTxIdBabbage GenTxIdConway + arbitrary = do + let fromByronGenTxId :: TxId (GenTx ByronBlock) -> CardanoGenTxId c + fromByronGenTxId = HardForkGenTxId . OneEraGenTxId . toRawTxIdHash + arbitraryNodeToNode fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId + {------------------------------------------------------------------------------- NodeToClient @@ -461,6 +467,14 @@ instance c ~ MockCryptoCompatByron (CardanoGenTx c)) where arbitrary = arbitraryNodeToClient GenTxByron GenTxShelley GenTxAllegra GenTxMary GenTxAlonzo GenTxBabbage GenTxConway +instance c ~ MockCryptoCompatByron + => Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) + (CardanoGenTxId c)) where + arbitrary = do + let fromByronGenTxId :: TxId (GenTx ByronBlock) -> CardanoGenTxId c + fromByronGenTxId = HardForkGenTxId . OneEraGenTxId . toRawTxIdHash + arbitraryNodeToClient fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId fromByronGenTxId + instance c ~ MockCryptoCompatByron => Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)) where diff --git a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs index d4961835e0..6d56fb2b7a 100644 --- a/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs +++ b/ouroboros-consensus-cardano/src/unstable-cardano-testlib/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs @@ -163,6 +163,9 @@ instance TranslateTxMeasure AlonzoMeasure ConwayMeasure where instance TranslateTxMeasure ConwayMeasure ConwayMeasure where translateTxMeasure = id +instance HasBlessedGenTxIdEra (ShelleyBasedHardForkEras proto1 era1 proto2 era2) where + blessedGenTxIdEra = S $ Z mempty + instance ShelleyBasedHardForkConstraints proto1 era1 proto2 era2 => SerialiseHFC (ShelleyBasedHardForkEras proto1 era1 proto2 era2) -- use defaults diff --git a/ouroboros-consensus-cardano/test/byron-test/Test/ThreadNet/Byron.hs b/ouroboros-consensus-cardano/test/byron-test/Test/ThreadNet/Byron.hs index fb50268583..a4ad3ef251 100644 --- a/ouroboros-consensus-cardano/test/byron-test/Test/ThreadNet/Byron.hs +++ b/ouroboros-consensus-cardano/test/byron-test/Test/ThreadNet/Byron.hs @@ -1365,4 +1365,4 @@ dlgTx cert = reAnnotate byronProtVer (Delegation.aEpoch cert) , Delegation.annotation = ann } - in Byron.ByronDlg (Delegation.recoverCertificateId cert') cert' + in Byron.ByronDlg (Byron.ByronGenTxId $ coerce $ Delegation.recoverCertificateId cert') cert' diff --git a/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/ByronCompatibility.hs b/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/ByronCompatibility.hs index 437670c1f4..45c15b724a 100644 --- a/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/ByronCompatibility.hs +++ b/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/ByronCompatibility.hs @@ -20,6 +20,7 @@ module Test.Consensus.Cardano.ByronCompatibility (tests) where import qualified Cardano.Chain.Byron.API as CC +import qualified Cardano.Crypto.Hashing as CC import Codec.CBOR.Decoding (Decoder) import Codec.CBOR.Encoding (Encoding) import qualified Data.ByteString.Lazy as Lazy @@ -180,6 +181,10 @@ instance ShowQuery (BlockQuery ByronToCardano) where instance SameDepIndex (BlockQuery ByronToCardano) where sameDepIndex (QueryB2C q1) (QueryB2C q2) = sameDepIndex q1 q2 +cardanoGenTxIdToByron :: TxId (GenTx (CardanoBlock Crypto)) -> TxId (GenTx ByronToCardano) +cardanoGenTxIdToByron txid = + GenTxIdB2C $ ByronGenTxId $ CC.unsafeAbstractHashFromShort $ toRawTxIdHash txid + {------------------------------------------------------------------------------ Byron to Cardano: Disk ------------------------------------------------------------------------------} @@ -295,7 +300,7 @@ instance SerialiseNodeToNode ByronToCardano (GenTx ByronToCardano) where instance SerialiseNodeToNode ByronToCardano (GenTxId ByronToCardano) where encodeNodeToNode = encodeNodeToNodeB2C (Proxy @WrapGenTxId) unGenTxIdB2C - decodeNodeToNode = decodeNodeToNodeB2C (Proxy @WrapGenTxId) (\(GenTxIdByron txid) -> GenTxIdB2C txid) + decodeNodeToNode = decodeNodeToNodeB2C (Proxy @WrapGenTxId) cardanoGenTxIdToByron instance SerialiseNodeToNodeConstraints ByronToCardano where estimateBlockSize = estimateBlockSize . unHeaderB2C @@ -371,7 +376,7 @@ instance SerialiseNodeToClient ByronToCardano (GenTx ByronToCardano) where instance SerialiseNodeToClient ByronToCardano (GenTxId ByronToCardano) where encodeNodeToClient = encodeNodeToClientB2C (Proxy @WrapGenTxId) unGenTxIdB2C - decodeNodeToClient = decodeNodeToClientB2C (Proxy @WrapGenTxId) (\(GenTxIdByron txid) -> GenTxIdB2C txid) + decodeNodeToClient = decodeNodeToClientB2C (Proxy @WrapGenTxId) cardanoGenTxIdToByron instance SerialiseNodeToClient ByronToCardano SlotNo @@ -600,7 +605,7 @@ instance SerialiseNodeToNode CardanoToByron (GenTx CardanoToByron) where decodeNodeToNode = decodeNodeToNodeC2B (Proxy @GenTx) GenTxC2B instance SerialiseNodeToNode CardanoToByron (GenTxId CardanoToByron) where - encodeNodeToNode = encodeNodeToNodeC2B (Proxy @WrapGenTxId) (GenTxIdByron . unGenTxIdC2B) + encodeNodeToNode = encodeNodeToNodeC2B (Proxy @WrapGenTxId) (CardanoGenTxId . toRawTxIdHash . unGenTxIdC2B) decodeNodeToNode = decodeNodeToNodeC2B (Proxy @WrapGenTxId) GenTxIdC2B instance SerialiseNodeToNodeConstraints CardanoToByron where @@ -660,7 +665,7 @@ instance SerialiseNodeToClient CardanoToByron (GenTx CardanoToByron) where decodeNodeToClient = decodeNodeToClientC2B (Proxy @GenTx) GenTxC2B instance SerialiseNodeToClient CardanoToByron (GenTxId CardanoToByron) where - encodeNodeToClient = encodeNodeToClientC2B (Proxy @WrapGenTxId) (GenTxIdByron . unGenTxIdC2B) + encodeNodeToClient = encodeNodeToClientC2B (Proxy @WrapGenTxId) (CardanoGenTxId . toRawTxIdHash . unGenTxIdC2B) decodeNodeToClient = decodeNodeToClientC2B (Proxy @WrapGenTxId) GenTxIdC2B instance SerialiseNodeToClient CardanoToByron SlotNo diff --git a/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Golden.hs b/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Golden.hs index 203c621df5..67d50dd0fb 100644 --- a/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Golden.hs +++ b/ouroboros-consensus-cardano/test/cardano-test/Test/Consensus/Cardano/Golden.hs @@ -27,6 +27,7 @@ instance CardanoHardForkConstraints c toGoldenDirectory v = case v of CardanoNodeToNodeVersion1 -> "CardanoNodeToNodeVersion1" CardanoNodeToNodeVersion2 -> "CardanoNodeToNodeVersion2" + CardanoNodeToNodeVersion3 -> "CardanoNodeToNodeVersion3" _ -> error $ "Unknown version: " <> show v instance CardanoHardForkConstraints c diff --git a/ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/HardFork/Combinator.hs b/ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/HardFork/Combinator.hs index c59f9b27ba..b03dd950da 100644 --- a/ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/HardFork/Combinator.hs +++ b/ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/HardFork/Combinator.hs @@ -362,6 +362,9 @@ instance TxGen TestBlock where type TestBlock = HardForkBlock '[BlockA, BlockB] +instance HasBlessedGenTxIdEra '[BlockA, BlockB] where + blessedGenTxIdEra = Z mempty + instance CanHardFork '[BlockA, BlockB] where type HardForkTxMeasure '[BlockA, BlockB] = IgnoringOverflow ByteSize32 diff --git a/ouroboros-consensus/changelog.d/20241128_123146_fraser.murray_one_era_gen_tx_id_bytestring.md b/ouroboros-consensus/changelog.d/20241128_123146_fraser.murray_one_era_gen_tx_id_bytestring.md new file mode 100644 index 0000000000..acb132b72c --- /dev/null +++ b/ouroboros-consensus/changelog.d/20241128_123146_fraser.murray_one_era_gen_tx_id_bytestring.md @@ -0,0 +1,4 @@ +### Breaking + +- Change internal representation of `OneEraGenTxId xs` from `NS WrapGenTxId xs` to `ShortByteString`. This breaks backwards compatibility for serialisation of Byron-era `GenTxId`s, and introduces new hard-fork-specific node-to-client and node-to-node versions, `HardForkSpecificNodeToClientVersion4` and `HardForkSpecificNodeToNodeVersion2`. Currently-running networks which require the ability to submit Byron transactions should ensure that all nodes are upgraded simultaneously, or these nodes may be unable to communicate with one another. +- Change internal representation of Byron-era `GenTxId`s from a sum of the different possible Byron IDs (transaction ID, certification delegation ID, etc.) to `Hash`. In order to determine the type of a Byron `GenTxId`, you'll now need to find the transaction that the ID refers to and check its type. diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/AcrossEras.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/AcrossEras.hs index 3264308fb0..c215e0aca8 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/AcrossEras.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/AcrossEras.hs @@ -68,7 +68,6 @@ import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Char8 as BSC import Data.ByteString.Short (ShortByteString) import qualified Data.ByteString.Short as Short -import Data.Function (on) import Data.Proxy import Data.SOP.BasicFunctors import Data.SOP.Constraint @@ -124,7 +123,8 @@ newtype OneEraEnvelopeErr xs = OneEraEnvelopeErr { getOneEra newtype OneEraForgeStateInfo xs = OneEraForgeStateInfo { getOneEraForgeStateInfo :: NS WrapForgeStateInfo xs } newtype OneEraForgeStateUpdateError xs = OneEraForgeStateUpdateError { getOneEraForgeStateUpdateError :: NS WrapForgeStateUpdateError xs } newtype OneEraGenTx xs = OneEraGenTx { getOneEraGenTx :: NS GenTx xs } -newtype OneEraGenTxId xs = OneEraGenTxId { getOneEraGenTxId :: NS WrapGenTxId xs } +newtype OneEraGenTxId xs = OneEraGenTxId { getOneEraGenTxId :: ShortByteString } + deriving (Show, Eq, Ord, Generic, NoThunks) newtype OneEraHeader xs = OneEraHeader { getOneEraHeader :: NS Header xs } newtype OneEraIsLeader xs = OneEraIsLeader { getOneEraIsLeader :: NS WrapIsLeader xs } newtype OneEraLedgerError xs = OneEraLedgerError { getOneEraLedgerError :: NS WrapLedgerErr xs } @@ -159,23 +159,6 @@ instance Show (OneEraHash xs) where instance Condense (OneEraHash xs) where condense = show -{------------------------------------------------------------------------------- - OneEraGenTxId --------------------------------------------------------------------------------} - --- | This instance compares the underlying raw hash ('toRawTxIdHash') of the --- 'TxId'. --- --- Note that this means that transactions in different eras can have equal --- 'TxId's. This should only be the case when the transaction format is --- backwards compatible from one era to the next. -instance CanHardFork xs => Eq (OneEraGenTxId xs) where - (==) = (==) `on` oneEraGenTxIdRawHash - --- | See the corresponding 'Eq' instance. -instance CanHardFork xs => Ord (OneEraGenTxId xs) where - compare = compare `on` oneEraGenTxIdRawHash - {------------------------------------------------------------------------------- Value for two /different/ eras -------------------------------------------------------------------------------} @@ -265,12 +248,6 @@ getSameValue values = | otherwise = throwError "differing values across hard fork" -oneEraGenTxIdRawHash :: CanHardFork xs => OneEraGenTxId xs -> ShortByteString -oneEraGenTxIdRawHash = - hcollapse - . hcmap proxySingle (K . toRawTxIdHash . unwrapGenTxId) - . getOneEraGenTxId - {------------------------------------------------------------------------------- NoThunks instances -------------------------------------------------------------------------------} @@ -296,9 +273,6 @@ deriving via LiftNamedNS "OneEraEnvelopeErr" WrapEnvelopeErr xs deriving via LiftNamedNS "OneEraGenTx" GenTx xs instance CanHardFork xs => NoThunks (OneEraGenTx xs) -deriving via LiftNamedNS "OneEraGenTxId" WrapGenTxId xs - instance CanHardFork xs => NoThunks (OneEraGenTxId xs) - deriving via LiftNamedNS "OneEraHeader" Header xs instance CanHardFork xs => NoThunks (OneEraHeader xs) @@ -361,6 +335,5 @@ deriving via LiftNS WrapApplyTxErr xs instance CanHardFork xs => Show (OneEraAp deriving via LiftNS I xs instance CanHardFork xs => Show (OneEraBlock xs) deriving via LiftNS WrapCannotForge xs instance CanHardFork xs => Show (OneEraCannotForge xs) deriving via LiftNS GenTx xs instance CanHardFork xs => Show (OneEraGenTx xs) -deriving via LiftNS WrapGenTxId xs instance CanHardFork xs => Show (OneEraGenTxId xs) deriving via LiftNS Header xs instance CanHardFork xs => Show (OneEraHeader xs) deriving via LiftNS WrapSelectView xs instance CanHardFork xs => Show (OneEraSelectView xs) diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Condense.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Condense.hs index afed7eafb5..380125f06e 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Condense.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Condense.hs @@ -57,7 +57,7 @@ instance All CondenseConstraints xs => Condense (GenTx (HardForkBlock xs)) where condense = defaultCondenseNS (Proxy @GenTx) . coerce instance All CondenseConstraints xs => Condense (TxId (GenTx (HardForkBlock xs))) where - condense = defaultCondenseNS (Proxy @WrapGenTxId) . coerce + condense (HardForkGenTxId (OneEraGenTxId txid)) = show txid {------------------------------------------------------------------------------- Forwarding diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Degenerate.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Degenerate.hs index fcb70b8ed6..5b94c36e7a 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Degenerate.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Degenerate.hs @@ -28,7 +28,6 @@ module Ouroboros.Consensus.HardFork.Combinator.Degenerate ( , LedgerState (DegenLedgerState) , OneEraTipInfo (DegenTipInfo) , TopLevelConfig (DegenTopLevelConfig) - , TxId (DegenGenTxId) ) where import Data.SOP.Strict @@ -61,7 +60,6 @@ import Ouroboros.Consensus.TypeFamilyWrappers {-# COMPLETE DegenBlockConfig #-} {-# COMPLETE DegenCodecConfig #-} {-# COMPLETE DegenGenTx #-} -{-# COMPLETE DegenGenTxId #-} {-# COMPLETE DegenHeader #-} {-# COMPLETE DegenLedgerError #-} {-# COMPLETE DegenLedgerState #-} @@ -94,14 +92,6 @@ pattern DegenGenTx x <- (project -> x) where DegenGenTx x = inject x -pattern DegenGenTxId :: - forall b. NoHardForks b - => GenTxId b - -> GenTxId (HardForkBlock '[b]) -pattern DegenGenTxId x <- (project' (Proxy @(WrapGenTxId b)) -> x) - where - DegenGenTxId x = inject' (Proxy @(WrapGenTxId b)) x - pattern DegenApplyTxErr :: forall b. NoHardForks b => ApplyTxErr b diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs index 6ed0df1002..0bb3d1a13a 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Nary.hs @@ -35,6 +35,8 @@ import qualified Ouroboros.Consensus.HardFork.History as History import Ouroboros.Consensus.HeaderValidation (AnnTip, HeaderState (..), genesisHeaderState) import Ouroboros.Consensus.Ledger.Extended (ExtLedgerState (..)) +import Ouroboros.Consensus.Ledger.SupportsMempool + (ConvertRawTxId (..)) import Ouroboros.Consensus.Storage.Serialisation import Ouroboros.Consensus.TypeFamilyWrappers import Ouroboros.Consensus.Util ((.:)) @@ -135,7 +137,8 @@ instance Inject GenTx where inject _ = injectNS' (Proxy @GenTx) instance Inject WrapGenTxId where - inject _ = injectNS' (Proxy @WrapGenTxId) + inject _ ix w = WrapGenTxId $ HardForkGenTxId $ OneEraGenTxId $ + hcollapse $ hcmap proxySingle (K . toRawTxIdHash . unwrapGenTxId) $ injectNS ix w instance Inject WrapApplyTxErr where inject _ = diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Unary.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Unary.hs index d182dbb22e..c7ef619d16 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Unary.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Embed/Unary.hs @@ -163,10 +163,6 @@ instance Isomorphic WrapIsLeader where project = defaultProjectNS inject = defaultInjectNS -instance Isomorphic WrapGenTxId where - project = defaultProjectNS - inject = defaultInjectNS - instance Isomorphic WrapValidatedGenTx where project = defaultProjectNS inject = defaultInjectNS diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Mempool.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Mempool.hs index a987cb7c32..f11e9d0592 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Mempool.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Mempool.hs @@ -323,9 +323,12 @@ instance Typeable xs => ShowProxy (TxId (GenTx (HardForkBlock xs))) where instance CanHardFork xs => HasTxId (GenTx (HardForkBlock xs)) where txId = HardForkGenTxId . OneEraGenTxId - . hcmap proxySingle (WrapGenTxId . txId) + . hcollapse . hcmap proxySingle (K . toRawTxIdHash . txId) . getOneEraGenTx . getHardForkGenTx +instance CanHardFork xs => ConvertRawTxId (GenTx (HardForkBlock xs)) where + toRawTxIdHash (HardForkGenTxId (OneEraGenTxId txid)) = txid + {------------------------------------------------------------------------------- HasTxs diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation.hs index 578f6001c4..011dbd6e51 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation.hs @@ -7,8 +7,9 @@ import Ouroboros.Consensus.HardFork.Combinator.Serialisation.Common as HardForkNodeToNodeVersion (..), HardForkSpecificNodeToClientVersion (..), HardForkSpecificNodeToNodeVersion (..), - SerialiseConstraintsHFC, SerialiseHFC (..), - isHardForkNodeToClientEnabled, isHardForkNodeToNodeEnabled) + HasBlessedGenTxIdEra (..), SerialiseConstraintsHFC, + SerialiseHFC (..), isHardForkNodeToClientEnabled, + isHardForkNodeToNodeEnabled) import Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk as X () import Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient as X () import Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToNode as X () diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs index bf36dda805..43ee512abb 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs @@ -17,6 +17,7 @@ module Ouroboros.Consensus.HardFork.Combinator.Serialisation.Common ( -- * Conditions required by the HFC to support serialisation HardForkEncoderException (..) + , HasBlessedGenTxIdEra (..) , SerialiseConstraintsHFC , SerialiseHFC (..) , disabledEraException @@ -133,8 +134,12 @@ notFirstEra = hcmap proxySingle aux -- | Versioning of the specific additions made by the HFC to the @NodeToNode@ -- protocols, e.g., the era tag. -data HardForkSpecificNodeToNodeVersion = - HardForkSpecificNodeToNodeVersion1 +data HardForkSpecificNodeToNodeVersion + = HardForkSpecificNodeToNodeVersion1 + + -- | Represent GenTxId as an era-agnostic ShortByteStrings + | HardForkSpecificNodeToNodeVersion2 + deriving (Eq, Ord, Show, Enum, Bounded) -- | Versioning of the specific additions made by the HFC to the @NodeToClient@ @@ -147,6 +152,9 @@ data HardForkSpecificNodeToClientVersion = -- | Include the Genesis window in 'EraParams'. | HardForkSpecificNodeToClientVersion3 + + -- | Represent GenTxId as an era-agnostic ShortByteString + | HardForkSpecificNodeToClientVersion4 deriving (Eq, Ord, Show, Enum, Bounded) data HardForkNodeToNodeVersion xs where @@ -210,6 +218,13 @@ isHardForkNodeToClientEnabled :: HardForkNodeToClientVersion xs -> Bool isHardForkNodeToClientEnabled HardForkNodeToClientEnabled {} = True isHardForkNodeToClientEnabled _ = False + +-- absolutely horrible. should be HasLatestStableGenTxIdEra probably. +-- especially nasty because it's a K () rather than an equivalent (but +-- non-existent) 'Void :: (Type -> Type) -> Type' +class HasBlessedGenTxIdEra (xs :: [Type]) where + blessedGenTxIdEra :: NS (K ()) xs + {------------------------------------------------------------------------------- Conditions required by the HFC to support serialisation -------------------------------------------------------------------------------} @@ -250,6 +265,7 @@ pSHFC = Proxy -- This would then lead to problems with binary streaming, and we do not -- currently provide any provisions to resolve these. class ( CanHardFork xs + , HasBlessedGenTxIdEra xs , All SerialiseConstraintsHFC xs -- Required for HasNetworkProtocolVersion , All (Compose Show EraNodeToClientVersion) xs diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToClient.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToClient.hs index 7eb237f82a..a8d3e57690 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToClient.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToClient.hs @@ -45,6 +45,7 @@ import Ouroboros.Consensus.Node.Serialisation import Ouroboros.Consensus.Util ((.:)) import Ouroboros.Network.Block (Serialised, unwrapCBORinCBOR, wrapCBORinCBOR) +import Data.ByteString.Short (ShortByteString) instance SerialiseHFC xs => SerialiseNodeToClientConstraints (HardForkBlock xs) @@ -164,8 +165,33 @@ instance SerialiseHFC xs instance SerialiseHFC xs => SerialiseNodeToClient (HardForkBlock xs) (GenTxId (HardForkBlock xs)) where - encodeNodeToClient = dispatchEncoder `after` (getOneEraGenTxId . getHardForkGenTxId) - decodeNodeToClient = fmap (HardForkGenTxId . OneEraGenTxId) .: dispatchDecoder + -- This instance can be massively simplified after we drop support for + -- 'NodeToClientVersion's earlier than 'NodeToClientV_19', since we no longer + -- need to handle the cases where 'ShortByteString's are serialised with + -- an era tag ('encodeNS'). + + encodeNodeToClient _cc v (HardForkGenTxId (OneEraGenTxId txid)) = + case v of + HardForkNodeToClientEnabled hfv _ | hfv >= HardForkSpecificNodeToClientVersion4 -> + Serialise.encode txid + HardForkNodeToClientEnabled _ _ -> do + let blessedGenTxId :: NS (K ShortByteString) xs + blessedGenTxId = hmap (pure $ K txid) blessedGenTxIdEra + encodeNS (hpure $ Fn $ K . Serialise.encode . unK) blessedGenTxId + HardForkNodeToClientDisabled _ -> + Serialise.encode txid + decodeNodeToClient _cc v = + fmap (HardForkGenTxId . OneEraGenTxId) $ + case v of + HardForkNodeToClientEnabled hfc _ + | hfc >= HardForkSpecificNodeToClientVersion4 -> do + Serialise.decode + HardForkNodeToClientEnabled _ _ -> do + let eraDecoders :: NP (Decoder s :.: K ShortByteString) xs + eraDecoders = hpure $ Comp $ K <$> Serialise.decode + hcollapse <$> decodeNS eraDecoders + HardForkNodeToClientDisabled _ -> + Serialise.decode instance SerialiseHFC xs => SerialiseNodeToClient (HardForkBlock xs) SlotNo where diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToNode.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToNode.hs index edf78b0051..877a107a3f 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToNode.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/SerialiseNodeToNode.hs @@ -2,6 +2,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE RankNTypes #-} @@ -17,6 +18,7 @@ import Codec.CBOR.Decoding (Decoder) import Codec.CBOR.Encoding (Encoding) import qualified Codec.Serialise as Serialise import Control.Exception (throw) +import Data.ByteString.Short (ShortByteString) import Data.Proxy import Data.SOP.BasicFunctors import Data.SOP.NonEmpty (ProofNonEmpty (..), isNonEmpty) @@ -137,7 +139,32 @@ instance SerialiseHFC xs encodeNodeToNode = dispatchEncoder `after` (getOneEraGenTx . getHardForkGenTx) decodeNodeToNode = fmap (HardForkGenTx . OneEraGenTx) .: dispatchDecoder + instance SerialiseHFC xs => SerialiseNodeToNode (HardForkBlock xs) (GenTxId (HardForkBlock xs)) where - encodeNodeToNode = dispatchEncoder `after` (getOneEraGenTxId . getHardForkGenTxId) - decodeNodeToNode = fmap (HardForkGenTxId . OneEraGenTxId) .: dispatchDecoder + -- This instance can be massively simplified after we drop support for + -- 'NodeToNodeVersion's earlier than 'NodeToNodeV_15', since we no longer + -- need to handle the cases where 'ShortByteString's are serialised with + -- an era tag ('encodeNS'). + + encodeNodeToNode _cc v (HardForkGenTxId (OneEraGenTxId txid)) = do + case v of + HardForkNodeToNodeEnabled hfv _ | hfv >= HardForkSpecificNodeToNodeVersion2 -> + Serialise.encode txid + HardForkNodeToNodeEnabled _ _ -> do + let blessedGenTxId :: NS (K ShortByteString) xs + blessedGenTxId = hmap (pure $ K txid) blessedGenTxIdEra + encodeNS (hpure $ Fn $ K . Serialise.encode . unK) blessedGenTxId + HardForkNodeToNodeDisabled _ -> + Serialise.encode txid + decodeNodeToNode _cc v = + fmap (HardForkGenTxId . OneEraGenTxId) $ + case v of + HardForkNodeToNodeEnabled hfv _ | hfv >= HardForkSpecificNodeToNodeVersion2 -> + Serialise.decode + HardForkNodeToNodeEnabled _ _ -> do + let eraDecoders :: NP (Decoder s :.: K ShortByteString) xs + eraDecoders = hpure $ Comp $ K <$> Serialise.decode + hcollapse <$> decodeNS eraDecoders + HardForkNodeToNodeDisabled _ -> + Serialise.decode diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/SupportsMempool.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/SupportsMempool.hs index 605c66bf00..653956ca7e 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/SupportsMempool.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/SupportsMempool.hs @@ -144,6 +144,8 @@ class HasTxId tx => ConvertRawTxId tx where -- properties as defined in the docs of 'txId'. toRawTxIdHash :: TxId tx -> ShortByteString + -- unsafeFromRawTxIdHash :: ShortByteString -> TxId tx + -- | Shorthand: ID of a generalized transaction type GenTxId blk = TxId (GenTx blk) diff --git a/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/Serialisation/Roundtrip.hs b/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/Serialisation/Roundtrip.hs index 7425098bc0..e8840eb591 100644 --- a/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/Serialisation/Roundtrip.hs +++ b/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/Serialisation/Roundtrip.hs @@ -204,6 +204,7 @@ roundtrip_all , ArbitraryWithVersion (BlockNodeToClientVersion blk) blk , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTx blk) + , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTxId blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (ApplyTxErr blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeSecond BlockQuery blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeResult blk) @@ -252,6 +253,7 @@ roundtrip_all_skipping , ArbitraryWithVersion (BlockNodeToClientVersion blk) blk , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTx blk) + , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTxId blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (ApplyTxErr blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeSecond BlockQuery blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeResult blk) @@ -493,6 +495,7 @@ roundtrip_SerialiseNodeToClient , Show (BlockNodeToClientVersion blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) blk , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTx blk) + , ArbitraryWithVersion (BlockNodeToClientVersion blk) (GenTxId blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (ApplyTxErr blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeSecond BlockQuery blk) , ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeResult blk) @@ -508,6 +511,7 @@ roundtrip_SerialiseNodeToClient roundtrip_SerialiseNodeToClient shouldCheckCBORvalidity ccfg = [ rt (Proxy @blk) "blk" , rt (Proxy @(GenTx blk)) "GenTx" + , rt (Proxy @(GenTxId blk)) "GenTxId" , rt (Proxy @(ApplyTxErr blk)) "ApplyTxErr" , rt (Proxy @(SomeSecond BlockQuery blk)) "BlockQuery" , rtWith