Skip to content
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

Enforce the order of MSC data-packages #78

Closed
dexX7 opened this issue Mar 11, 2014 · 0 comments
Closed

Enforce the order of MSC data-packages #78

dexX7 opened this issue Mar 11, 2014 · 0 comments

Comments

@dexX7
Copy link
Member

dexX7 commented Mar 11, 2014

I suggest to temporarily insert a line in the spec that Mastercoin data packages should be in order within an output:

Sender's pubKey
Mastercoin data-package 1
Mastercoin data-package 2

It appears that data-packages are only parsed correctly, if this order is given and allowing unordered data packages is probably not trivial. See the discussion here: https://bitcointalk.org/index.php?topic=292628.msg5646781#msg5646781 (and a few posts earlier)

Edit: to cover transactions that are already out which don't fit exactly in the schema "sender-pubKey, data 1, data 2", I suggest to specify the handling of data-packages with something like "use the longest sequence of MSC data-packages within a transaction's output with ascending sequence numbers, starting from 01 and in the case that multiple multisig outputs are available, the same should apply, but starting from last-seq-num + 1", example:

Output 1:

Pos 0: junk
Pos 1: junk, seq num 01 (appearingly)
Pos 2: junk
Pos 3: Mastercoin data-package, seq num 01
Pos 4: Mastercoin data-package, seq num 02
Pos 5: junk

Longest sequence is pos 3 + pos 4, so take them.

Output 2:

Pos 6: junk
Pos 7: Mastercoin data-package, seq num 03
Pos 8: Mastercoin data-package, seq num 04
Pos 9: Mastercoin data-package, seq num 05

The longest sequence starting with a sequence number of 2 + 1 = 03 starts at pos 7 and ends with pos 9. So the actual data-stream is within pos 3, 4, 7, 8, 9. Of course it's a somewhat unrealistic example, but to give you an idea.

Edit 2: more or less done, see: https://bitcointalk.org/index.php?topic=292628.msg5652293#msg5652293 for the minimal changes.

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

2 participants