forked from rooch-network/rooch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rooch-network:main' into main
- Loading branch information
Showing
177 changed files
with
473 additions
and
8,385 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DA Stream | ||
==== | ||
|
||
DA Stream is a continuous flow of data from sequencer to verifier. It is a sequence of DA Batch. | ||
|
||
## Batch | ||
|
||
A batch is a collection of transactions. It is the unit of data flow in DA Stream. | ||
|
||
Each batch maps to a L2 block. | ||
|
||
## Chunk | ||
|
||
A chunk is a collection of DA Batch for better compression ratio. | ||
|
||
Components: | ||
|
||
- Chunk Header: Version, Chunk Number, Chunk Checksum | ||
- Chunk Body: One or more DA batch after compression | ||
|
||
Version of chunk determines: | ||
|
||
1. chunk format: serialization/deserialization, compression algorithm of chunk body | ||
2. segment format | ||
|
||
### Segment | ||
|
||
Segment consists of chunk bytes split by a certain size. | ||
|
||
Segment is the unit submitted to DA backend, designed to comply with the block size restrictions of the DA backend. | ||
|
||
Version of segment inherits from chunk version. |
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,21 @@ | ||
TODO | ||
=== | ||
|
||
## Chunk Builder | ||
|
||
Chunk Builder is a component to build chunks from batches, avoiding burst I/O to DA backend. | ||
|
||
1. Persist batch into buffer(local persistence layer or other faster media) first, then return ok(if high-performance is | ||
preferred). | ||
2. Split chunk into segments and submit segments to DA backend asynchronously. | ||
3. Clean up batch buffer after segments being submitted to DA backend schedule. | ||
|
||
## DA Proxy | ||
|
||
### Get API | ||
|
||
1. get by block number | ||
2. get by batch hash | ||
3. pull by stream | ||
|
||
add FEC for SDC protection (wrong response attacks) |
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.