Skip to content
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
2 changes: 1 addition & 1 deletion .github/actions/build-benchmark-genesis/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
uses: ./.github/actions/start-hive-dev
with:
clients: besu,go-ethereum,nethermind
client-file: .github/configs/hive/latest.yaml
client-file: .github/configs/hive/master.yaml
hive-path: hive

- name: Extract genesis configs
Expand Down
43 changes: 37 additions & 6 deletions .github/workflows/hive-consume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,31 @@ on:
description: "Space-separated list of Docker images to cache"
required: false
default: "docker.io/ethereum/client-go:latest docker.io/alpine:latest docker.io/library/golang:1-alpine"
client:
description: "Hive client to test (e.g., go-ethereum, besu)"
required: false
default: "go-ethereum"
client_file:
description: "Client config file name under .github/configs/hive/ (e.g., latest.yaml, master.yaml)"
required: false
default: "latest.yaml"
workflow_call:
inputs:
docker_images:
description: "Space-separated list of Docker images to cache"
required: false
type: string
default: "docker.io/ethereum/client-go:latest docker.io/alpine:latest docker.io/library/golang:1-alpine"
client:
description: "Hive client to test (e.g., go-ethereum, besu)"
required: false
type: string
default: "go-ethereum"
client_file:
description: "Client config file name under .github/configs/hive/ (e.g., latest.yaml, master.yaml)"
required: false
type: string
default: "latest.yaml"

concurrency:
group: hive-consume-${{ github.workflow }}-${{ github.ref || github.run_id }}
Expand All @@ -64,6 +82,9 @@ jobs:
name: ${{ matrix.name }}
needs: cache-docker-images
runs-on: [self-hosted-ghr, size-l-x64]
env:
CLIENT: ${{ inputs.client || 'go-ethereum' }}
CLIENT_FILE: ${{ inputs.client_file || 'latest.yaml' }}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -133,19 +154,21 @@ jobs:
cd hive
./hive --sim '${{ matrix.simulator }}' \
--sim.parallelism=1 \
--client go-ethereum \
--client-file ../execution-specs/.github/configs/hive/latest.yaml \
--client ${{ env.CLIENT }} \
--client-file ../execution-specs/.github/configs/hive/${{ env.CLIENT_FILE }} \
--sim.buildarg fixtures=${{ env.FIXTURES_URL }} \
--sim.limit="${{ matrix.sim_limit }}" \
--sim.loglevel=5 \
--docker.buildoutput \
--docker.output

- name: Build Hive client images
if: matrix.mode == 'dev'
run: |
cd hive
./hive \
--client go-ethereum \
--client-file ../execution-specs/.github/configs/hive/latest.yaml \
--client ${{ env.CLIENT }} \
--client-file ../execution-specs/.github/configs/hive/${{ env.CLIENT_FILE }} \
--docker.buildoutput
timeout-minutes: 10

Expand All @@ -154,8 +177,8 @@ jobs:
id: start-hive
uses: ./execution-specs/.github/actions/start-hive-dev
with:
clients: go-ethereum
client-file: execution-specs/.github/configs/hive/latest.yaml
clients: ${{ env.CLIENT }}
client-file: execution-specs/.github/configs/hive/${{ env.CLIENT_FILE }}
hive-path: hive
timeout: "30"

Expand All @@ -167,3 +190,11 @@ jobs:
run: |
uv sync --all-extras
uv run consume ${{ matrix.consume_command }} --input ${{ env.FIXTURES_URL }} -k "${{ matrix.test_filter }}"

- name: Upload Hive logs
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: hive-logs-${{ matrix.name }}
path: hive/workspace/
retention-days: 7
17 changes: 6 additions & 11 deletions src/ethereum/forks/amsterdam/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -148,7 +139,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -342,6 +335,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
6 changes: 4 additions & 2 deletions src/ethereum/forks/arrow_glacier/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
)
)

Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | None
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -179,7 +179,7 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, U256)):
elif isinstance(node, (LegacyTransaction, Receipt, U256, Uint)):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -373,6 +373,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
6 changes: 4 additions & 2 deletions src/ethereum/forks/berlin/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
)
)

Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | None
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -179,7 +179,7 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, U256)):
elif isinstance(node, (LegacyTransaction, Receipt, U256, Uint)):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -373,6 +373,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
17 changes: 6 additions & 11 deletions src/ethereum/forks/bpo1/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -190,7 +181,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -384,6 +377,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
17 changes: 6 additions & 11 deletions src/ethereum/forks/bpo2/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -190,7 +181,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -384,6 +377,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
17 changes: 6 additions & 11 deletions src/ethereum/forks/bpo3/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -190,7 +181,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -384,6 +377,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
17 changes: 6 additions & 11 deletions src/ethereum/forks/bpo4/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -190,7 +181,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -384,6 +377,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
17 changes: 6 additions & 11 deletions src/ethereum/forks/bpo5/trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@
)
)

Node = (
Account
| Bytes
| LegacyTransaction
| Receipt
| Uint
| U256
| Withdrawal
| None
)
Node = Account | Bytes | LegacyTransaction | Receipt | Uint | U256 | Withdrawal
K = TypeVar("K", bound=Bytes)
V = TypeVar(
"V",
Expand Down Expand Up @@ -190,7 +181,9 @@ def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes:
if isinstance(node, Account):
assert storage_root is not None
return encode_account(node, storage_root)
elif isinstance(node, (LegacyTransaction, Receipt, Withdrawal, U256)):
elif isinstance(
node, (LegacyTransaction, Receipt, Withdrawal, U256, Uint)
):
return rlp.encode(node)
elif isinstance(node, Bytes):
return node
Expand Down Expand Up @@ -384,6 +377,8 @@ def _prepare_trie(
assert get_storage_root is not None
address = Address(preimage)
encoded_value = encode_node(value, get_storage_root(address))
elif value is None:
raise AssertionError("cannot encode `None`")
else:
encoded_value = encode_node(value)
if encoded_value == b"":
Expand Down
Loading
Loading