File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ import (
88)
99
1010// EdsIDSize defines the byte size of the EdsID.
11- const EdsIDSize = 8
11+ const (
12+ EdsIDSize = 8
13+ EDSName = "eds_v0"
14+ )
1215
1316// ErrOutOfBounds is returned whenever an index is out of bounds.
1417var (
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import (
1111 "github.com/celestiaorg/celestia-node/share/shwap/pb"
1212)
1313
14+ // NamespaceDataName is the name identifier for the namespace data container.
15+ const NamespaceDataName = "nd_v0"
16+
1417// NamespacedData stores collections of RowNamespaceData, each representing shares and their proofs
1518// within a namespace.
1619type NamespacedData []RowNamespaceData
Original file line number Diff line number Diff line change @@ -2,13 +2,14 @@ package shrexeds
22
33import (
44 "fmt"
5+ "github.com/celestiaorg/celestia-node/share/shwap"
56
67 logging "github.com/ipfs/go-log/v2"
78
89 "github.com/celestiaorg/celestia-node/share/shwap/p2p/shrex"
910)
1011
11- const protocolString = "/shrex/eds/ v0.1.0"
12+ const protocolString = "/shrex/v0.1.0/" + shwap . EDSName
1213
1314var log = logging .Logger ("shrex/eds" )
1415
Original file line number Diff line number Diff line change @@ -2,13 +2,14 @@ package shrexnd
22
33import (
44 "fmt"
5+ "github.com/celestiaorg/celestia-node/share/shwap"
56
67 logging "github.com/ipfs/go-log/v2"
78
89 "github.com/celestiaorg/celestia-node/share/shwap/p2p/shrex"
910)
1011
11- const protocolString = "/shrex/nd/ v0.1.0"
12+ const protocolString = "/shrex/v0.1.0" + shwap . NamespaceDataName
1213
1314var log = logging .Logger ("shrex/nd" )
1415
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ import (
1010 "github.com/celestiaorg/celestia-node/share/shwap/pb"
1111)
1212
13+ // RowName is the name identifier for the row container.
14+ const RowName = "row_v0"
15+
1316// RowSide enumerates the possible sides of a row within an Extended Data Square (EDS).
1417type RowSide int
1518
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import (
1313 "github.com/celestiaorg/celestia-node/share/shwap/pb"
1414)
1515
16+ // RowNamespaceDataName is the name identifier for the row namespace data container.
17+ const RowNamespaceDataName = "rnd_v0"
18+
1619// ErrNamespaceOutsideRange is returned by RowNamespaceDataFromShares when the target namespace is
1720// outside of the namespace range for the given row. In this case, the implementation cannot return
1821// the non-inclusion proof and will return ErrNamespaceOutsideRange.
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import (
1313 "github.com/celestiaorg/celestia-node/share/shwap/pb"
1414)
1515
16+ // SampleName is the name identifier for the sample container.
17+ const SampleName = "sample_v0"
18+
1619// ErrFailedVerification is returned when inclusion proof verification fails. It is returned
1720// when the data and the proof do not match trusted data root.
1821var ErrFailedVerification = errors .New ("failed to verify inclusion" )
You can’t perform that action at this time.
0 commit comments