Skip to content

Commit

Permalink
Make Amount >= Staked Amount check syntactic
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Nov 20, 2023
1 parent 073d807 commit 2db67ba
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tips/TIP-0042/tip-0042.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ account is locked to that account.
</tr>
</table>

### Additional syntactic transaction validation rule
### Additional Transaction Syntactic Validation Rules

- The following conditions must all hold:
- `Block Issuer Key Count >= 1`.
Expand All @@ -230,7 +230,7 @@ account is locked to that account.
- Each key in `Block Issuer Keys` must be lexicographically ordered based on the concatenation of its
`Public Key Type` and `Public Key`.

### Additional semantic transaction validation rule
### Additional Transaction Semantic Validation Rules

- Let `Past Bounded Slot Index` be given by `Commitment Index + Max Committable Age` where `Commitment Index` is the
slot index of the commitment input.
Expand Down Expand Up @@ -344,7 +344,11 @@ which they were selected to participate in the validator committee.
</tr>
</table>

### Additional semantic transaction validation rule
### Additional Transaction Syntactic Validation Rules

- The `Amount` in the containing account output satisfies `Amount >= Staked Amount`.

### Additional Transaction Semantic Validation Rules

- Let `Future Bounded Epoch Index` be the epoch index corresponding to the slot index given by
`Commitment Index + Min Committable Age` where `Commitment Index` is the slot index of the commitment input.
Expand All @@ -359,14 +363,12 @@ which they were selected to participate in the validator committee.
- When a _Staking Feature_ is present in an account output on the output side of a transaction and it was not present on
the input side, the transaction that contains this output is valid, if and only if all of the following conditions
hold:
- The `Amount` in the containing account output satisfies `Amount >= Staked Amount`.
- `Start Epoch` must be set to `Past Bounded Epoch Index`.
- `End Epoch` satisfies `End Epoch >= Past Bounded Epoch Index + Staking Unbonding Period`.
- When a _Staking Feature_ is present in an account output on the input side of a transaction, the transaction that
contains this input is valid, if and only if all of the following conditions hold:
- If `Future Bounded Epoch Index <= End Epoch`, all of the following conditions must hold:
- A _Staking Feature_ must be present on the corresponding account on the output side of the transaction.
- The `Amount` in the containing account output satisfies `Amount >= Staked Amount`.
- The fields `Staked Amount`, `Start Epoch` and `Fixed Cost` on the feature on the input and the feature on the
output side match.
- One of the following conditions hold:
Expand All @@ -384,7 +386,6 @@ which they were selected to participate in the validator committee.
[TIP-40 (Validator Rewards)](../TIP-0040/tip-0040.md#validator-rewards).
- All of the following conditions hold:
- A _Staking Feature_ must be present on the corresponding account on the output side of the transaction.
- The `Amount` in the containing account output satisfies `Amount >= Staked Amount`.
- `Start Epoch` is set to `Past Bounded Epoch Index`.
- `End Epoch` satisfies `End Epoch >= Past Bounded Epoch Index + Staking Unbonding Period`.
- A _Reward Input_ must be present whose `Index` references the account input.
Expand Down

0 comments on commit 2db67ba

Please sign in to comment.