From e67db0bd6d98cff14b45104b11b7442d3d525f94 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Mon, 15 May 2023 15:52:46 -0400 Subject: [PATCH 1/6] feat!: decrease namespace from 33 to 29 bytes --- pkg/appconsts/appconsts.go | 2 +- pkg/namespace/consts.go | 2 +- pkg/shares/doc.go | 8 ++++---- pkg/shares/share_sequence_test.go | 2 +- pkg/shares/share_splitting_test.go | 26 ++++++++++++------------- pkg/shares/split_compact_shares_test.go | 4 ++-- specs/src/specs/consensus.md | 22 ++++++++++----------- specs/src/specs/data_structures.md | 18 +++++++++-------- 8 files changed, 43 insertions(+), 41 deletions(-) diff --git a/pkg/appconsts/appconsts.go b/pkg/appconsts/appconsts.go index a164f8647b..b4a2ad184c 100644 --- a/pkg/appconsts/appconsts.go +++ b/pkg/appconsts/appconsts.go @@ -12,7 +12,7 @@ const ( NamespaceVersionSize = 1 // NamespaceIDSize is the size of a namespace ID in bytes. - NamespaceIDSize = 32 + NamespaceIDSize = 28 // NamespaceSize is the size of a namespace (version + ID) in bytes. NamespaceSize = NamespaceVersionSize + NamespaceIDSize diff --git a/pkg/namespace/consts.go b/pkg/namespace/consts.go index 4566e01aec..2a71299592 100644 --- a/pkg/namespace/consts.go +++ b/pkg/namespace/consts.go @@ -25,7 +25,7 @@ const ( // NamespaceZeroPrefixSize is the number of `0` bytes that are prefixed to // namespace IDs for version 0. - NamespaceVersionZeroPrefixSize = 22 + NamespaceVersionZeroPrefixSize = 18 // NamespaceVersionZeroIDSize is the number of bytes available for // user-specified namespace ID in a namespace ID for version 0. diff --git a/pkg/shares/doc.go b/pkg/shares/doc.go index 2b5353fa57..c496c2d929 100644 --- a/pkg/shares/doc.go +++ b/pkg/shares/doc.go @@ -33,12 +33,12 @@ // For the first share of a sequence: // // | namespace_version | namespace_id | info_byte | sequence_length | sequence_data | -// | 1 byte | 32 bytes | 1 byte | 4 bytes | remaining bytes of share | +// | 1 byte | 28 bytes | 1 byte | 4 bytes | remaining bytes of share | // // For continuation share of a sequence: // // | namespace_version | namespace_id | info_byte | sequence_data | -// | 1 byte | 32 bytes | 1 byte | remaining bytes of share | +// | 1 byte | 28 bytes | 1 byte | remaining bytes of share | // // The remaining bytes depend on the share type. // @@ -51,12 +51,12 @@ // For the first compact share: // // | namespace_version | namespace_id | info_byte | sequence_length | location_of_first_unit | transactions or intermediate state roots | -// | 1 byte | 32 bytes | 1 byte | 4 bytes | 4 bytes | remaining bytes of share | +// | 1 byte | 28 bytes | 1 byte | 4 bytes | 4 bytes | remaining bytes of share | // // For continuation compact share: // // | namespace_version | namespace_id | info_byte | location_of_first_unit | transactions or intermediate state roots | -// | 1 byte | 32 bytes | 1 byte | 4 bytes | remaining bytes of share | +// | 1 byte | 28 bytes | 1 byte | 4 bytes | remaining bytes of share | // // Notes // - All shares in a reserved namespace belong to one sequence. diff --git a/pkg/shares/share_sequence_test.go b/pkg/shares/share_sequence_test.go index 72e171e825..6a7d85d51b 100644 --- a/pkg/shares/share_sequence_test.go +++ b/pkg/shares/share_sequence_test.go @@ -113,7 +113,7 @@ func Test_sparseSharesNeeded(t *testing.T) { {appconsts.FirstSparseShareContentSize + appconsts.ContinuationCompactShareContentSize*99, 100}, {1000, 3}, {10000, 21}, - {100000, 210}, + {100000, 208}, } for _, tc := range testCases { got := SparseSharesNeeded(tc.sequenceLen) diff --git a/pkg/shares/share_splitting_test.go b/pkg/shares/share_splitting_test.go index 9fb8c24f38..950e3a91c4 100644 --- a/pkg/shares/share_splitting_test.go +++ b/pkg/shares/share_splitting_test.go @@ -38,7 +38,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x0, 0x2, // 1 byte (unit) + 1 byte (unit length) = 2 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 0x1, // unit length of first transaction 0xa, // data of first transaction }..., @@ -57,7 +57,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x0, 0x4, // 2 bytes (first transaction) + 2 bytes (second transaction) = 4 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 0x1, // unit length of first transaction 0xa, // data of first transaction 0x1, // unit length of second transaction @@ -78,7 +78,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x2, 0x2, // 512 (unit) + 2 (unit length) = 514 sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 128, 4, // unit length of transaction is 512 }..., ), @@ -94,7 +94,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { 0x0, 0x0, 0x0, 0x0, // reserved bytes }..., ), - bytes.Repeat([]byte{0xc}, 44)..., // continuation data of transaction + bytes.Repeat([]byte{0xc}, 40)..., // continuation data of transaction ), }, ), @@ -110,7 +110,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x2, 0x4, // 2 bytes (first transaction) + 514 bytes (second transaction) = 516 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 1, // unit length of first transaction 0xa, // data of first transaction 128, 4, // unit length of second transaction is 512 @@ -128,7 +128,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { 0x0, 0x0, 0x0, 0x0, // reserved bytes }..., ), - bytes.Repeat([]byte{0xc}, 46)..., // continuation data of second transaction + bytes.Repeat([]byte{0xc}, 42)..., // continuation data of second transaction ), }, ), @@ -144,7 +144,7 @@ func TestSplitTxs_forTxShares(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x2, 0x4, // 514 bytes (first transaction) + 2 bytes (second transaction) = 516 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 128, 4, // unit length of first transaction is 512 }..., ), @@ -156,10 +156,10 @@ func TestSplitTxs_forTxShares(t *testing.T) { appns.TxNamespace.Bytes(), []byte{ 0x0, // info byte - 0x0, 0x0, 0x0, 0x52, // reserved bytes + 0x0, 0x0, 0x0, 0x4a, // reserved bytes 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, // continuation data of first transaction 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, // continuation data of first transaction - 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, // continuation data of first transaction + 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, // continuation data of first transaction 1, // unit length of second transaction 0xa, // data of second transaction }..., @@ -196,7 +196,7 @@ func TestSplitTxs(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x0, 0x2, // 1 byte (unit) + 1 byte (unit length) = 2 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 0x1, // unit length of first transaction 0xa, // data of first transaction }..., @@ -214,7 +214,7 @@ func TestSplitTxs(t *testing.T) { []uint8{ 0x1, // info byte 0x0, 0x0, 0x0, 13, // 1 byte (unit) + 1 byte (unit length) = 2 bytes sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 12, // unit length of first transaction 0xa, 0x1, 0xb, 0x12, 0x1, 0xa, 0x1a, 0x4, 0x49, 0x4e, 0x44, 0x58, // data of first transaction }..., @@ -230,7 +230,7 @@ func TestSplitTxs(t *testing.T) { []uint8{ 0x1, // info byte 0x0, 0x0, 0x2, 0x2, // 512 (unit) + 2 (unit length) = 514 sequence length - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 128, 4, // unit length of transaction is 512 }..., ), @@ -245,7 +245,7 @@ func TestSplitTxs(t *testing.T) { 0x0, 0x0, 0x0, 0x0, // reserved bytes }..., ), - bytes.Repeat([]byte{0xc}, 44)..., // continuation data of transaction + bytes.Repeat([]byte{0xc}, 40)..., // continuation data of transaction ), }, ), diff --git a/pkg/shares/split_compact_shares_test.go b/pkg/shares/split_compact_shares_test.go index 761f4a04de..8c4e4292cc 100644 --- a/pkg/shares/split_compact_shares_test.go +++ b/pkg/shares/split_compact_shares_test.go @@ -68,7 +68,7 @@ func TestExport_write(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x0, 0x1, // sequence len - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes 0xf, // data }..., ), @@ -79,7 +79,7 @@ func TestExport_write(t *testing.T) { []byte{ 0x1, // info byte 0x0, 0x0, 0x2, 0x0, // sequence len - 0x0, 0x0, 0x0, 0x2a, // reserved bytes + 0x0, 0x0, 0x0, 0x26, // reserved bytes }..., )}, 0xf) diff --git a/specs/src/specs/consensus.md b/specs/src/specs/consensus.md index 1f77344ca4..51093fb255 100644 --- a/specs/src/specs/consensus.md +++ b/specs/src/specs/consensus.md @@ -25,13 +25,13 @@ | `MAX_GRAFFITI_BYTES` | `uint64` | `32` | `byte` | Maximum size of transaction graffiti, in bytes. | | `MAX_VALIDATORS` | `uint16` | `64` | | Maximum number of active validators. | | `NAMESPACE_VERSION_SIZE` | `int` | `1` | `byte` | Size of namespace version in bytes. | -| `NAMESPACE_ID_SIZE` | `int` | `32` | `byte` | Size of namespace ID in bytes. | -| `NAMESPACE_SIZE` | `int` | `33` | `byte` | Size of namespace in bytes. | +| `NAMESPACE_ID_SIZE` | `int` | `28` | `byte` | Size of namespace ID in bytes. | +| `NAMESPACE_SIZE` | `int` | `29` | `byte` | Size of namespace in bytes. | | `NAMESPACE_ID_MAX_RESERVED` | `uint64` | `255` | | Value of maximum reserved namespace (inclusive). 1 byte worth of IDs. | | `SEQUENCE_BYTES` | `uint64` | `4` | `byte` | The number of bytes used to store the sequence length in the first share of a sequence | | `SHARE_INFO_BYTES` | `uint64` | `1` | `byte` | The number of bytes used for [share](data_structures.md#share) information | | `SHARE_RESERVED_BYTES` | `uint64` | `4` | `byte` | The number of bytes used to store the location of the first unit in a compact share. Must be able to represent any integer up to and including `SHARE_SIZE - 1`. | -| `SHARE_SIZE` | `uint64` | `512` | `byte` | Size of transaction and blob [shares](data_structures.md#share), in bytes. | +| `SHARE_SIZE` | `uint64` | `512` | `byte` | Size of transaction and blob [shares](data_structures.md#share), in bytes. | | `STATE_SUBTREE_RESERVED_BYTES` | `uint64` | `1` | `byte` | Number of bytes reserved to identify state subtrees. | | `UNBONDING_DURATION` | `uint32` | | `block` | Duration, in blocks, for unbonding a validator or delegation. | | `VERSION_APP` | `uint64` | `1` | | Version of the Celestia application. Breaking changes (hard forks) must update this parameter. | @@ -39,14 +39,14 @@ ### Reserved Namespaces -| name | type | value | description | -|-------------------------------------|-------------|------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| `TRANSACTION_NAMESPACE` | `Namespace` | `0x000000000000000000000000000000000000000000000000000000000000000001` | Transactions: requests that modify the state. | -| `INTERMEDIATE_STATE_ROOT_NAMESPACE` | `Namespace` | `0x000000000000000000000000000000000000000000000000000000000000000002` | Intermediate state roots, committed after every transaction. | -| `RESERVED_PADDING_NAMESPACE` | `Namespace` | `0x0000000000000000000000000000000000000000000000000000000000000000FF` | Padding after all reserved namespaces but before blobs. | -| `MAX_RESERVED_NAMESPACE` | `Namespace` | `0x0000000000000000000000000000000000000000000000000000000000000000FF` | Max reserved namespace is lexicographically the largest namespace that is reserved for protocol use. | -| `TAIL_PADDING_NAMESPACE` | `Namespace` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` | Tail padding for blobs: padding after all blobs to fill up the original data square. | -| `PARITY_SHARE_NAMESPACE` | `Namespace` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | Parity shares: extended shares in the available data matrix. | +| name | type | value | description | +|-------------------------------------|-------------|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------| +| `TRANSACTION_NAMESPACE` | `Namespace` | `0x0000000000000000000000000000000000000000000000000000000001` | Transactions: requests that modify the state. | +| `INTERMEDIATE_STATE_ROOT_NAMESPACE` | `Namespace` | `0x0000000000000000000000000000000000000000000000000000000002` | Intermediate state roots, committed after every transaction. | +| `RESERVED_PADDING_NAMESPACE` | `Namespace` | `0x00000000000000000000000000000000000000000000000000000000FF` | Padding after all reserved namespaces but before blobs. | +| `MAX_RESERVED_NAMESPACE` | `Namespace` | `0x00000000000000000000000000000000000000000000000000000000FF` | Max reserved namespace is lexicographically the largest namespace that is reserved for protocol use. | +| `TAIL_PADDING_NAMESPACE` | `Namespace` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` | Tail padding for blobs: padding after all blobs to fill up the original data square. | +| `PARITY_SHARE_NAMESPACE` | `Namespace` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | Parity shares: extended shares in the available data matrix. | ### Rewards and Penalties diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index 0cb6514173..3c06c2d638 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -145,20 +145,22 @@ enum CommitFlag : uint8_t { | name | type | description | |-----------|------------|-------------| | `version` | `uint8` | | -| `id` | `byte[32]` | | +| `id` | `byte[28]` | | -The namespace is a 33 byte array. The first byte is the `version`. The remaining 32 bytes are the `id`. The namespace version may enforce constraints on the id. The only supported `version` is `0`. The format for a namespace with `version: 0` is 22 bytes of leading `0`s followed by 10 bytes of significant namespace id. +The namespace is a 29 byte array. The first byte is the `version`. The remaining 28 bytes are the `id`. The namespace version may enforce constraints on the id. The only supported `version` is `0`. The format for a namespace with `version: 0` is 18 bytes of leading `0`s followed by 10 bytes of significant namespace id. + +33 => 29 = -4 ```go // valid namespaces -0x000000000000000000000000000000000000000000000000000000000000000001 -0x000000000000000000000000000000000000000000000001010101010101010101 -0x000000000000000000000000000000000000000000000011111111111111111111 +0x0000000000000000000000000000000000000000000000000000000001 +0x0000000000000000000000000000000000000001010101010101010101 +0x0000000000000000000000000000000000000011111111111111111111 // invalid namespaces -0x000000000000000000000000000000000111111111111111111111111111111111 -0x100000000000000000000000000000000000000000000000000000000000000001 -0x111111111111111111111111111111111111111111111111111111111111111111 +0x0000000000000000000000000111111111111111111111111111111111 +0x1000000000000000000000000000000000000000000000000000000001 +0x1111111111111111111111111111111111111111111111111111111111 ``` ## ConsensusVersion From bb3845a027e15a28e7bd2568f25fb47623df5e92 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 May 2023 13:36:55 -0400 Subject: [PATCH 2/6] fix: TestNewDataAvailabilityHeader --- pkg/da/data_availability_header_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/da/data_availability_header_test.go b/pkg/da/data_availability_header_test.go index e5ee4485df..0023403b64 100644 --- a/pkg/da/data_availability_header_test.go +++ b/pkg/da/data_availability_header_test.go @@ -42,13 +42,13 @@ func TestNewDataAvailabilityHeader(t *testing.T) { tests := []test{ { name: "typical", - expectedHash: []byte{0x5b, 0x27, 0x3e, 0x3a, 0x5d, 0x9e, 0x90, 0x25, 0x58, 0x21, 0xb7, 0xe0, 0x4d, 0x4b, 0xaa, 0xde, 0x37, 0xa6, 0x6f, 0xcc, 0xd, 0x16, 0x6f, 0x9e, 0xe0, 0x7f, 0xbe, 0x8, 0xb4, 0x41, 0xc8, 0xa6}, + expectedHash: []byte{0xb5, 0x6e, 0x4d, 0x25, 0x1a, 0xc2, 0x66, 0xf4, 0xb9, 0x1c, 0xc5, 0x46, 0x4b, 0x3f, 0xc7, 0xef, 0xcb, 0xdc, 0x88, 0x80, 0x64, 0x64, 0x74, 0x96, 0xd1, 0x31, 0x33, 0xf0, 0xdc, 0x65, 0xac, 0x25}, squareSize: 2, shares: generateShares(4), }, { name: "max square size", - expectedHash: []byte{0xce, 0x5c, 0xf3, 0xc9, 0x15, 0xeb, 0xbf, 0xb0, 0x67, 0xe1, 0xa5, 0x97, 0x35, 0xf3, 0x25, 0x7b, 0x1c, 0x47, 0x74, 0x1f, 0xec, 0x6a, 0x33, 0x19, 0x7f, 0x8f, 0xc2, 0x4a, 0xe, 0xe2, 0xbe, 0x73}, + expectedHash: []byte{0xb, 0xd3, 0xab, 0xee, 0xac, 0xfb, 0xb0, 0xb9, 0x2d, 0xfb, 0xda, 0xc4, 0xa1, 0x54, 0x86, 0x8e, 0x3c, 0x4e, 0x79, 0x66, 0x6f, 0x7f, 0xcf, 0x6c, 0x62, 0xb, 0xb9, 0xd, 0xd3, 0xa0, 0xdc, 0xf0}, squareSize: appconsts.MaxSquareSize, shares: generateShares(appconsts.MaxSquareSize * appconsts.MaxSquareSize), }, From 196298148720cbca4be90f61b76ad024dfea5df5 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 May 2023 15:43:23 -0400 Subject: [PATCH 3/6] chore: upgrade to celestia-core v1.20.0-tm-v0.34.27 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ddd0d2393f..f3082fad68 100644 --- a/go.mod +++ b/go.mod @@ -202,5 +202,5 @@ require ( replace ( github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.13.0-sdk-v0.46.11 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.19.0-tm-v0.34.27 + github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.20.0-tm-v0.34.27 ) diff --git a/go.sum b/go.sum index 9c15e3ceed..c4715502d2 100644 --- a/go.sum +++ b/go.sum @@ -169,8 +169,8 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/celestiaorg/celestia-core v1.19.0-tm-v0.34.27 h1:GLdDJRu1fRSMft4IqQz4/x/H1U3eN2TFlYbAycbSiN4= -github.com/celestiaorg/celestia-core v1.19.0-tm-v0.34.27/go.mod h1:8PbX2OIPehldawXWAzNWPxBPnfFtcYtjHecE45b2Beg= +github.com/celestiaorg/celestia-core v1.20.0-tm-v0.34.27 h1:zyAhkcRNsYvt1FglnzOyw3WV9fOn4aXaXUsz87NAunk= +github.com/celestiaorg/celestia-core v1.20.0-tm-v0.34.27/go.mod h1:8PbX2OIPehldawXWAzNWPxBPnfFtcYtjHecE45b2Beg= github.com/celestiaorg/cosmos-sdk v1.13.0-sdk-v0.46.11 h1:Rd5EvJx1nG3KurBspVN51RVmvif0Lp2UVURbG2ad3Cs= github.com/celestiaorg/cosmos-sdk v1.13.0-sdk-v0.46.11/go.mod h1:xCG6OUkJy5KUMEg20Zk010lra9XjkmKS3+bk0wp7bd8= github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 h1:CJdIpo8n5MFP2MwK0gSRcOVlDlFdQJO1p+FqdxYzmvc= From 8d26045d48b25935ca33fa4161f504384d9ca439 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 May 2023 15:49:00 -0400 Subject: [PATCH 4/6] fix: TestCreateCommitment --- x/blob/types/payforblob_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blob/types/payforblob_test.go b/x/blob/types/payforblob_test.go index 7e90473d4d..20c94d5da3 100644 --- a/x/blob/types/payforblob_test.go +++ b/x/blob/types/payforblob_test.go @@ -80,7 +80,7 @@ func TestCreateCommitment(t *testing.T) { name: "blob of 3 shares succeeds", namespace: ns1, blob: bytes.Repeat([]byte{0xFF}, 3*ShareSize), - expected: []byte{0x52, 0xd3, 0x11, 0x76, 0x12, 0xdc, 0x5c, 0x7, 0x6d, 0xa7, 0xc7, 0xe2, 0xdf, 0xd6, 0x4a, 0xa5, 0xfa, 0xbf, 0x37, 0xcd, 0x59, 0xb, 0x59, 0x5f, 0x6a, 0xf2, 0x27, 0xa0, 0x43, 0x34, 0x87, 0xa6}, + expected: []byte{0x3b, 0x9e, 0x78, 0xb6, 0x64, 0x8e, 0xc1, 0xa2, 0x41, 0x92, 0x5b, 0x31, 0xda, 0x2e, 0xcb, 0x50, 0xbf, 0xc6, 0xf4, 0xad, 0x55, 0x2d, 0x32, 0x79, 0x92, 0x8c, 0xa1, 0x3e, 0xbe, 0xba, 0x8c, 0x2b}, shareVersion: appconsts.ShareVersionZero, }, { From b96a5bd1105e879b038b5d18e3edc9887f9bedac Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 May 2023 15:49:34 -0400 Subject: [PATCH 5/6] fix: TestMinDataAvailabilityHeader --- pkg/da/data_availability_header_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/da/data_availability_header_test.go b/pkg/da/data_availability_header_test.go index 0023403b64..144b60a472 100644 --- a/pkg/da/data_availability_header_test.go +++ b/pkg/da/data_availability_header_test.go @@ -26,7 +26,7 @@ func TestNilDataAvailabilityHeaderHashDoesntCrash(t *testing.T) { func TestMinDataAvailabilityHeader(t *testing.T) { dah := MinDataAvailabilityHeader() - expectedHash := []byte{0xe9, 0x5, 0x28, 0x49, 0xf, 0x1d, 0x51, 0x67, 0x29, 0x2c, 0x1f, 0x1b, 0x83, 0xe1, 0x74, 0x2a, 0x27, 0x48, 0x17, 0x34, 0x12, 0xc9, 0x1d, 0xf7, 0xdd, 0x1, 0x96, 0x78, 0xa4, 0x62, 0xb9, 0x77} + expectedHash := []byte{0x3d, 0x96, 0xb7, 0xd2, 0x38, 0xe7, 0xe0, 0x45, 0x6f, 0x6a, 0xf8, 0xe7, 0xcd, 0xf0, 0xa6, 0x7b, 0xd6, 0xcf, 0x9c, 0x20, 0x89, 0xec, 0xb5, 0x59, 0xc6, 0x59, 0xdc, 0xaa, 0x1f, 0x88, 0x3, 0x53} require.Equal(t, expectedHash, dah.hash) require.NoError(t, dah.ValidateBasic()) } From 6a9aea788b180a0697f60adb97805d6c01e584a2 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 May 2023 15:51:25 -0400 Subject: [PATCH 6/6] fix: remove residual line from specs --- specs/src/specs/data_structures.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index 3c06c2d638..cbee8b4138 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -149,8 +149,6 @@ enum CommitFlag : uint8_t { The namespace is a 29 byte array. The first byte is the `version`. The remaining 28 bytes are the `id`. The namespace version may enforce constraints on the id. The only supported `version` is `0`. The format for a namespace with `version: 0` is 18 bytes of leading `0`s followed by 10 bytes of significant namespace id. -33 => 29 = -4 - ```go // valid namespaces 0x0000000000000000000000000000000000000000000000000000000001