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

New messaging specification (replacing old deposit/withdrawal spec) #318

Merged
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
485e72f
Replaced deposit ID concept with message ID
pixelcircuits May 20, 2022
13324bf
Update message ID generation
pixelcircuits May 23, 2022
0a1eaa7
Added owner and amount to messageID
pixelcircuits May 24, 2022
8e5ebfb
Added InputMessage and OutputMessage
pixelcircuits May 24, 2022
5259dc5
Updated with MessageInput/Output
pixelcircuits May 24, 2022
e06bcb5
fixed markdown link
pixelcircuits May 24, 2022
53dead2
fixed typo
pixelcircuits May 24, 2022
54a63db
Added InputMessage and OutputMessage
pixelcircuits May 24, 2022
31610f9
Fixed markdown links
pixelcircuits May 24, 2022
8065d96
Added SMO opcode
pixelcircuits May 25, 2022
d473743
Added notes to OutputMessage
pixelcircuits May 25, 2022
1e83cf8
reworded abi to data
pixelcircuits Jun 3, 2022
addfe76
Reworded abi to data
pixelcircuits Jun 3, 2022
d6d896a
Added dataLength to messages
pixelcircuits Jun 3, 2022
0993005
Merge branch 'master' into pixelcircuits-refactor-depositwithdraw-to-…
pixelcircuits Jun 6, 2022
e2d4423
Apply suggestions from code review
pixelcircuits Jun 7, 2022
36108d0
Messaging feedback updates
pixelcircuits Jun 7, 2022
9ee74f2
Make message data easier to parse
pixelcircuits Jun 7, 2022
e528991
Updated orders
pixelcircuits Jun 8, 2022
76cba5f
Updated OutputMessage
pixelcircuits Jun 11, 2022
978df96
Fixed link
pixelcircuits Jun 11, 2022
3a5b96e
Spec review changes
pixelcircuits Jun 11, 2022
206635a
Spec changes from feedback
pixelcircuits Jun 12, 2022
142fe9f
Merge branch 'master' into pixelcircuits-refactor-depositwithdraw-to-…
pixelcircuits Jun 12, 2022
d895e1d
Added extra panic scenario
pixelcircuits Jun 14, 2022
d86b788
Apply suggestions from code review
pixelcircuits Jun 14, 2022
64e1801
Added message nonce definition
pixelcircuits Jun 14, 2022
27c55a5
split message id to input and output
pixelcircuits Jun 15, 2022
8e83d05
updated message hash order
pixelcircuits Jun 15, 2022
eba0b42
Update specs/protocol/identifiers.md
pixelcircuits Jun 16, 2022
5ad5b9e
Corrected panic case
pixelcircuits Jun 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions specs/protocol/tx_validity.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ For each asset ID `asset_id` in the input and output set:
def sum_inputs(tx, col) -> int:
total: int = 0
for input in tx.inputs:
if input.type == InputType.Coin and input.asset_id == col:
if (input.type == InputType.Coin and input.asset_id == col) or (input.type == InputType.Message and col == 0):
adlerjohn marked this conversation as resolved.
Show resolved Hide resolved
total += input.amount
return total

def sum_outputs(tx, col) -> int:
total: int = 0
for output in tx.outputs:
if (output.type == OutputType.Coin or output.type == OutputType.Withdrawal) and output.asset_id == col:
if (output.type == OutputType.Coin and output.asset_id == col) or (output.type == OutputType.Message and col == 0):
Voxelot marked this conversation as resolved.
Show resolved Hide resolved
total += output.amount
return total

Expand Down