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

Change Transaction nonce to U64 #995

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions src/ethereum/arrow_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/berlin/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/byzantium/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
8 changes: 4 additions & 4 deletions src/ethereum/cancun/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand All @@ -94,7 +94,7 @@ class BlobTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/constantinople/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/dao_fork/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/frontier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -21,7 +21,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
6 changes: 3 additions & 3 deletions src/ethereum/gray_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/homestead/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/istanbul/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
6 changes: 3 additions & 3 deletions src/ethereum/london/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/muir_glacier/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
6 changes: 3 additions & 3 deletions src/ethereum/paris/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
6 changes: 3 additions & 3 deletions src/ethereum/shanghai/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LegacyTransaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -53,7 +53,7 @@ class AccessListTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand All @@ -73,7 +73,7 @@ class FeeMarketTransaction:
"""

chain_id: U64
nonce: U256
nonce: U64
max_priority_fee_per_gas: Uint
max_fee_per_gas: Uint
gas: Uint
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/spurious_dragon/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions src/ethereum/tangerine_whistle/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import Union

from ..base_types import U256, Bytes, Bytes0, Uint, slotted_freezable
from ..base_types import U64, U256, Bytes, Bytes0, Uint, slotted_freezable
from .fork_types import Address

TX_BASE_COST = 21000
Expand All @@ -22,7 +22,7 @@ class Transaction:
Atomic operation performed on the block chain.
"""

nonce: U256
nonce: U64
gas_price: Uint
gas: Uint
to: Union[Bytes0, Address]
Expand Down
4 changes: 2 additions & 2 deletions tests/berlin/test_rlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
)

legacy_transaction = LegacyTransaction(
U256(1),
U64(1),
Uint(2),
Uint(3),
Bytes0(),
Expand All @@ -52,7 +52,7 @@

access_list_transaction = AccessListTransaction(
U64(1),
U256(1),
U64(1),
Uint(2),
Uint(3),
Bytes0(),
Expand Down
6 changes: 3 additions & 3 deletions tests/byzantium/test_rlp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

import ethereum.rlp as rlp
from ethereum.base_types import U256, Bytes, Bytes0, Bytes8, Uint
from ethereum.base_types import U64, U256, Bytes, Bytes0, Bytes8, Uint
from ethereum.byzantium.blocks import Block, Header, Log, Receipt
from ethereum.byzantium.transactions import Transaction
from ethereum.byzantium.utils.hexadecimal import hex_to_address
Expand Down Expand Up @@ -33,7 +33,7 @@
)

transaction1 = Transaction(
U256(1),
U64(1),
Uint(2),
Uint(3),
Bytes0(),
Expand All @@ -45,7 +45,7 @@
)

transaction2 = Transaction(
U256(1),
U64(1),
Uint(2),
Uint(3),
Bytes0(),
Expand Down
Loading
Loading