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

Remove byte price. #333

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions specs/protocol/tx_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ enum ReceiptType : uint8 {
|--------------------|-------------------------|------------------------------------------|
| `gasPrice` | `uint64` | Gas price for transaction. |
| `gasLimit` | `uint64` | Gas limit for transaction. |
| `bytePrice` | `uint64` | Price per transaction byte. |
| `maturity` | `uint32` | Block until which tx cannot be included. |
| `scriptLength` | `uint16` | Script length, in instructions. |
| `scriptDataLength` | `uint16` | Length of script input data, in bytes. |
Expand All @@ -112,7 +111,6 @@ Transaction is invalid if:
- Any output is of type `OutputType.ContractCreated`
- `scriptLength > MAX_SCRIPT_LENGTH`
- `scriptDataLength > MAX_SCRIPT_DATA_LENGTH`
- `bytePrice != gasPrice * GAS_PER_BYTE`

Note: when signing a transaction, `receiptsRoot` is set to zero.

Expand All @@ -128,7 +126,6 @@ The receipts root `receiptsRoot` is the root of the [binary Merkle tree](./crypt
|------------------------|---------------------------|---------------------------------------------------|
| `gasPrice` | `uint64` | Gas price for transaction. |
| `gasLimit` | `uint64` | Gas limit for transaction. |
| `bytePrice` | `uint64` | Price per transaction byte. |
| `maturity` | `uint32` | Block until which tx cannot be included. |
| `bytecodeLength` | `uint16` | Contract bytecode length, in instructions. |
| `bytecodeWitnessIndex` | `uint8` | Witness index of contract bytecode to create. |
Expand Down Expand Up @@ -160,7 +157,6 @@ Transaction is invalid if:
- The computed contract ID (see below) is not equal to the `contractID` of the one `OutputType.ContractCreated` output
- `storageSlotsCount > MAX_STORAGE_SLOTS`
- The [Sparse Merkle tree](./cryptographic_primitives.md#sparse-merkle-tree) root of `storageSlots` is not equal to the `stateRoot` of the one `OutputType.ContractCreated` output
- `bytePrice != gasPrice * GAS_PER_BYTE`

Creates a contract with contract ID as computed [here](./identifiers.md#contract-id).

Expand Down
2 changes: 1 addition & 1 deletion specs/protocol/tx_validity.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def unavailable_balance(tx, col) -> int:
sentBalance = sum_outputs(tx, col)
gasBalance = gasPrice * gasLimit
# Size excludes witness data as it is malleable (even by third parties!)
bytesBalance = size(tx) * bytePrice
bytesBalance = size(tx) * gasPrice * GAS_PER_BYTE
# Only native coin can be used to pay for gas
if col != 0:
return sentBalance
Expand Down