Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0a00660
prague initial commit
gurukamath Jan 21, 2025
50c17ac
changes for prague
gurukamath Apr 23, 2024
d35af35
Implement EIP-7702
gurukamath Jan 23, 2025
877f1a5
Implement EIP-2537
gurukamath Jan 23, 2025
f14f9c8
Implement EIP-6110
gurukamath Jan 23, 2025
247fd14
Implement EIP-7002
gurukamath Jan 23, 2025
89d6faf
Implement EIP-7251
gurukamath Jan 23, 2025
b2177e7
Implement EIP-2935
gurukamath Jan 23, 2025
457cb21
Implement EIP-7623
gurukamath Jan 23, 2025
9a5437a
Implement EIP-7691
gurukamath Jan 23, 2025
8892006
run tests
gurukamath Jan 23, 2025
d55ada1
catch invalid signatures
gurukamath Jan 23, 2025
c1d262e
add state test flag
gurukamath Jan 23, 2025
5a32df1
run only prague tests
gurukamath Jan 23, 2025
0c56b70
re-factor validate_transaction
gurukamath Jan 24, 2025
b151dfe
change type of branch node subnodes (#1066) (#1095)
SamWilsn Jan 27, 2025
aa0daf9
update storage trie type (#1070 #1071)
SamWilsn Jan 25, 2025
ad81be4
Merge pull request #1096 from SamWilsn/update-trie-type
gurukamath Jan 29, 2025
33d50c9
update EXTCODE* behavior in 7702 (#1094)
gurukamath Jan 30, 2025
fa33d82
Update EIP-2935, EIP-7002, EIP-7251 system contract addresses (#1100)
marioevz Jan 30, 2025
ef644ed
port #1098 and #1011 to `forks/prague` (#1102)
gurukamath Feb 3, 2025
ad4d15b
run [email protected] tests
gurukamath Feb 5, 2025
a25a8ab
Merge pull request #1110 from gurukamath/run-prague-devnet1.0.0-tests
petertdavies Feb 5, 2025
8b6b2e0
Merge pull request #1111 from ethereum/devnets/prague/6
petertdavies Feb 6, 2025
2c86028
Backport changes from prague (#1113)
gurukamath Feb 11, 2025
8d6093a
Prepare to release
SamWilsn Feb 11, 2025
f739293
fix: check y_parity value (#1107)
SamWilsn Feb 12, 2025
a818bd2
Remove unused file
SamWilsn Feb 13, 2025
891a888
Merge pull request #1120 from SamWilsn/prague-y-parity
petertdavies Feb 13, 2025
6023917
Bump ethash to 1.1.0
SamWilsn Feb 13, 2025
dc76275
Merge remote-tracking branch 'upstream/forks/prague' into prague-rele…
SamWilsn Feb 13, 2025
51f2d6a
Refactor Environment (#1131)
gurukamath Mar 5, 2025
24f8cfb
add state test flag
gurukamath Mar 10, 2025
4509c1d
output traces to correct location
gurukamath Mar 10, 2025
b561af6
Merge pull request #1149 from gurukamath/t8n-fixes
gurukamath Mar 11, 2025
0ae1b11
update ethereum tests to latest
gurukamath Mar 11, 2025
de3c950
Merge pull request #1150 from gurukamath/update-tests
gurukamath Mar 11, 2025
9190303
validate_transaction now raises InvalidTransaction exception (#1138)
Shashwat-Nautiyal Mar 12, 2025
8b92823
default to empty accesslist when unavailable (#1151)
gurukamath Mar 13, 2025
7e3a623
Simplified validate_header func in post-merge forks (#1163)
Antrikshgwal Mar 27, 2025
ef9f068
update to use CodeCov v5 (#1162) (#1174)
SamWilsn Mar 31, 2025
4fd0bdd
pyright fixes (ethash.py)
SamWilsn Mar 29, 2025
33433c8
pyright fixes (fork_criteria.py)
SamWilsn Mar 31, 2025
4223590
pyright fixes (genesis.py)
SamWilsn Mar 31, 2025
75c0570
pyright fixes (*/fork.py)
SamWilsn Apr 1, 2025
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: 3 additions & 2 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Upload Pages Artifact
id: artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: .tox/docs

Expand All @@ -46,6 +46,7 @@ jobs:
permissions:
pages: write
id-token: write
actions: read

environment:
name: github-pages
Expand All @@ -54,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ jobs:
env:
PYPY_GC_MAX: "10G"

- name: Upload coverage to Codecov
- name: Upload coverage reports to Codecov
if: "${{ !startsWith(matrix.py, 'pypy') }}"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
files: .tox/coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
22 changes: 17 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ethereum
description = Ethereum specification, provided as a Python package for tooling and testing
name = ethereum-execution
description = Ethereum execution layer specification, provided as a Python package for tooling and testing
long_description = file: README.md
long_description_content_type = text/markdown
version = attr: ethereum.__version__
Expand All @@ -9,6 +9,12 @@ license_files =
LICENSE.md
classifiers =
License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Programming Language :: Python :: 3
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: PyPy
Programming Language :: Python :: Implementation :: CPython
Intended Audience :: Developers
Natural Language :: English

[options]
packages =
Expand Down Expand Up @@ -104,6 +110,12 @@ packages =
ethereum/cancun/vm
ethereum/cancun/vm/instructions
ethereum/cancun/vm/precompiled_contracts
ethereum/prague
ethereum/prague/utils
ethereum/prague/vm
ethereum/prague/vm/instructions
ethereum/prague/vm/precompiled_contracts
ethereum/prague/vm/precompiled_contracts/bls12_381


package_dir =
Expand All @@ -113,8 +125,8 @@ python_requires = >=3.10
install_requires =
pycryptodome>=3,<4
coincurve>=20,<21
typing_extensions>=4
py_ecc @ git+https://github.com/petertdavies/py_ecc.git@127184f4c57b1812da959586d0fe8f43bb1a2389
typing_extensions>=4.2
py-ecc>=8.0.0b2,<9
ethereum-types>=0.2.1,<0.3
ethereum-rlp>=0.1.1,<0.2

Expand Down Expand Up @@ -179,7 +191,7 @@ doc =

optimized =
rust-pyspec-glue>=0.0.9,<0.1.0
ethash @ git+https://github.com/chfast/ethash.git@e08bd0fadb8785f7ccf1e2fb07b75f54fe47f92e
ethash>=1.1.0,<2

[flake8]
dictionaries=en_US,python,technical
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""
import sys

__version__ = "0.1.0"
__version__ = "1.17.0rc6.dev1"

#
# Ensure we can reach 1024 frames of recursion
Expand Down
31 changes: 30 additions & 1 deletion src/ethereum/arrow_glacier/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@
from dataclasses import dataclass
from typing import Tuple, Union

from ethereum_rlp import rlp
from ethereum_types.bytes import Bytes, Bytes8, Bytes32
from ethereum_types.frozen import slotted_freezable
from ethereum_types.numeric import U256, Uint

from ..crypto.hash import Hash32
from .fork_types import Address, Bloom, Root
from .transactions import LegacyTransaction
from .transactions import (
AccessListTransaction,
FeeMarketTransaction,
LegacyTransaction,
Transaction,
)


@slotted_freezable
Expand Down Expand Up @@ -80,3 +86,26 @@ class Receipt:
cumulative_gas_used: Uint
bloom: Bloom
logs: Tuple[Log, ...]


def encode_receipt(tx: Transaction, receipt: Receipt) -> Union[Bytes, Receipt]:
"""
Encodes a receipt.
"""
if isinstance(tx, AccessListTransaction):
return b"\x01" + rlp.encode(receipt)
elif isinstance(tx, FeeMarketTransaction):
return b"\x02" + rlp.encode(receipt)
else:
return receipt


def decode_receipt(receipt: Union[Bytes, Receipt]) -> Receipt:
"""
Decodes a receipt.
"""
if isinstance(receipt, Bytes):
assert receipt[0] in (1, 2)
return rlp.decode_to(Receipt, receipt[1:])
else:
return receipt
Loading
Loading