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

Formalize Double-spend Validation #383

Merged
merged 1 commit into from
Jul 4, 2022
Merged
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion specs/protocol/tx_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ Transaction is invalid if:
- `inputsCount > MAX_INPUTS`
- `outputsCount > MAX_OUTPUTS`
- `witnessesCount > MAX_WITNESSES`
- No inputs are of type `InputType.Coin`
- No inputs are of type `InputType.Coin` or `InputType.Message`
- More than one output is of type `OutputType.Change` for any asset ID in the input set
- Any output is of type `OutputType.Change` for any asset ID not in the input set
- More than one input of type `InputType.Coin` for any [Coin ID](./identifiers.md#coin-id) in the input set
- More than one input of type `InputType.Contract` for any [Contract ID](./identifiers.md#contract-id) in the input set
- More than one input of type `InputType.Message` for any [Input Message ID](./identifiers.md#input-message-id) in the input set

When serializing a transaction, fields are serialized as follows (with inner structs serialized recursively):

Expand Down