Skip to content

side chain spec #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mixmix opened this issue Mar 13, 2025 · 3 comments
Open

side chain spec #3

mixmix opened this issue Mar 13, 2025 · 3 comments

Comments

@mixmix
Copy link
Contributor

mixmix commented Mar 13, 2025

Questions:

  1. Is this being redesigned?
    • where / when?
    • how does one participate?
  2. why do the "side-chain" packets on have a packet_type code (T)?

Here's a design from some earlier spec... no idea if it matches implentations

  <--------------120B packet content---------->
          <------48B payload----->
  +----+-+------------------------+- . . . ---+
  | DMX|T| len | content1 | hptr1 | signature |   log entry
  +----+-+-----+----------+-------+- . . . ---+
                              |
     -------------------------' start of side chain (hash of blob 1)
    /
   v     100B                            20B
  +----------. . . . . . . . . .------+-------+
  | content2                          | hptr2 |   blob 1, identfied by hptr1
  +----------. . . . . . . . . .------+-------+
                                         |
                        - - -------------' continuation of side chain
     -------------- - - -
    /
   v     100B                            20B
  +----------. . . . . . . . . .------+-------+
  | contentN         |  padding       | 0---0 |  last blob N-1
  +----------. . . . . . . . . .------+-------+

@mixmix
Copy link
Contributor Author

mixmix commented Mar 13, 2025

Future Idea: One thing that came up for me reading this was "gosh, I think having a byte at the start of each packet would help identify what it is a lot quicker. i.e.

CFT: the DMX should really stay at the start, this is probably not what we want to do
Mix: Should discuss in a different Issue

  <--------------120B packet content---------->
          <------48B payload----->
  +-+----+------------------------+- . . . ---+
  |T| DMX| len | content1 | hptr1 | signature |  
  +-+----+-----+----------+-------+- . . . ---+
                              |
     -------------------------' 
    /
   v      99B                            20B
  +-+--------. . . . . . . . . .------+-------+
  |T| content2                        | hptr2 |   
  +-+--------. . . . . . . . . .------+-------+

where e.g.
T = 0 : main chain, plain content
T = 1 : main chain, root of blob-chain (+ start of blob content)
T = 2 : blob chain, blob content

@mixmix
Copy link
Contributor Author

mixmix commented Mar 20, 2025

Here's a reference from the python code: https://github.com/tinySSB/python-client/pull/2/files

@mixmix
Copy link
Contributor Author

mixmix commented Apr 7, 2025

Mix: what if the start of some content collides with a DMX of some main chain
CFT: we have other ways of checking/ filtering, e.g. the hash if it's a chunk, or the sig if it's a main-chain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant