-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node): Add shwap data types (#169)
* Add shwap data types * Align with celestia protocol updates * Add docs, fix tests * fmt * temp fix * sort out EDS * cleanup * rework a bit after review * cleanup * NamespacedData unittest * Sad return to Vec<u8> * Update types/src/share.rs Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com> Signed-off-by: Mikołaj Florkiewicz <mikolaj@florkiewicz.me> * you got me docs * Last of the Missing Documentations * Final fix tests * fix throwing out half the data * Update types/src/namespaced_data.rs Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com> Signed-off-by: Mikołaj Florkiewicz <mikolaj@florkiewicz.me> * Update types/src/namespaced_data.rs Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com> Signed-off-by: Mikołaj Florkiewicz <mikolaj@florkiewicz.me> * remove leftover, add row unitttest --------- Signed-off-by: Mikołaj Florkiewicz <mikolaj@florkiewicz.me> Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com>
- Loading branch information
Showing
21 changed files
with
1,058 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
|
||
// TODO: current celestia-node PR doesn't specify the package, we might want to align on it | ||
package share.p2p.shwap; | ||
import "pb/proof.proto"; // celestiaorg/nmt/pb/proof.proto | ||
|
||
message Row { | ||
bytes row_id = 1; | ||
repeated bytes row_half = 2; | ||
} | ||
|
||
enum SampleProofType { | ||
RowSampleProofType = 0; | ||
ColSampleProofType = 1; | ||
} | ||
|
||
message Sample { | ||
bytes sample_id = 1; | ||
SampleProofType sample_type = 2; | ||
bytes sample_share = 3; | ||
proof.pb.Proof sample_proof = 4; | ||
} | ||
|
||
message Data { | ||
bytes data_id = 1; | ||
repeated bytes data_shares = 2; | ||
proof.pb.Proof data_proof = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.