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
54 changes: 12 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install nightly toolchain with rustfmt available
uses: actions-rs/toolchain@v1
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check

- run: cargo +nightly fmt --all --check
clippy:
name: Lint
name: Lint check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain with clippy available
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --all -- -D warnings
tests:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --verbose
uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
10 changes: 5 additions & 5 deletions crates/common/src/pbs/types/beacon_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ mod tests {
},
"execution_payload_header": {
"parent_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"fee_recipient": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
"fee_recipient": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
"state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"receipts_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"logs_bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
Expand All @@ -237,7 +237,7 @@ mod tests {
"message": {
"validator_index": "1",
"from_bls_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
"to_execution_address": "0xabcf8e0d4e9587369b2301d0790347320302cc09"
"to_execution_address": "0xAbcF8e0d4e9587369b2301D0790347320302cc09"
},
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
Expand Down Expand Up @@ -537,7 +537,7 @@ mod tests {
},
"execution_payload_header": {
"parent_hash": "0xa330251430b91a6fb5342f30a1f527dc76499c03a411464235951dbd51b94d9f",
"fee_recipient": "0xf97e180c050e5ab072211ad2c213eb5aee4df134",
"fee_recipient": "0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134",
"state_root": "0x079f2cc22a29388fd4fc20f451cbaa3ff39845d68b2c368ff7be314617418e38",
"receipts_root": "0xed980a4cf6df8ba330c14ed9fe0597ec20515f44e5a9adfd2f7b72aa14890996",
"logs_bloom": "0x0000000400000008000008000040000000000000000000001000104880000200000004000000400000000204000020002000000000000000000000000022000800000004000000000002000c000000000000000000000100000000000000000000000000000000000000000000000040000000000040000001000014000000010002104000000000000000000000000000000000000000000000000000000080020000000000000000002400000000000001000000000002000200102000000040100002000000000000000000000000000000000000000800000000000000000010000000000000000000000000000000000400002000000000000000200000",
Expand Down Expand Up @@ -579,7 +579,7 @@ mod tests {
"execution_payload": {
"parent_hash":
"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"fee_recipient": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
"fee_recipient": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
"state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"receipts_root":
"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
Expand All @@ -603,7 +603,7 @@ mod tests {
{
"index": "1",
"validator_index": "1",
"address": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
"address": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
"amount": "32000000000"
}
]
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/pbs/types/execution_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ mod tests {
fn test_execution_payload_header() {
let data = r#"{
"parent_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"fee_recipient": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
"fee_recipient": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
"state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"receipts_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"logs_bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/pbs/types/get_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mod tests {
"message": {
"header": {
"parent_hash": "0x114d1897fefa402a01a653c21a7f1f1db049d1373a5e73a2d25d7a8045dc02a1",
"fee_recipient": "0x1268ad189526ac0b386faf06effc46779c340ee6",
"fee_recipient": "0x1268AD189526AC0b386faF06eFfC46779c340eE6",
"state_root": "0x53ffe6d7d4bbcc5ef71429ce82b3d7bbfffddaed89d53979bf4dca7af0dbe94c",
"receipts_root": "0x3d67a1bb141379c352c95126c4dd06a4fe086efdc00b6e919b050c84d79f4df2",
"logs_bloom": "0x05440404082f80182749948b189406732c7da48ce83013f11c02562c0d10cc714002025f21c1c64b21293e4c40c5b58e5404aed7922104002008019258ad7020097424e0b01d41eb474dc0cd26c0c9298c640692260452e27104ac808a050a0dc47187f40386108058b301007229b82f0d30bb082c72410043005e32a42c841841184260c0d744a4a9a190840048a4590011e00084ca62a8ce3a030d640350214fbedf09f041823266c491b128800802a200eb1048341000fa810323c4825804643b68ca2301c559881c0e944334c843016e0874010c81009100348a1900e0546014239b02e956940d1408c1824847516850d8de4a110495f3d9a4d8c00808a0",
Expand Down
4 changes: 2 additions & 2 deletions docker/pbs.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
FROM lukemathwalker/cargo-chef:0.1.68-rust-bookworm AS chef
WORKDIR /app

FROM chef AS planner
Expand All @@ -14,7 +14,7 @@ COPY . .
RUN cargo build --release --bin commit-boost-pbs


FROM debian:bookworm-slim AS runtime
FROM debian:bookworm-20240904-slim AS runtime
WORKDIR /app

RUN apt-get update && apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions docker/signer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
FROM lukemathwalker/cargo-chef:0.1.68-rust-bookworm AS chef
WORKDIR /app

FROM chef AS planner
Expand All @@ -14,7 +14,7 @@ COPY . .
RUN cargo build --release --bin commit-boost-signer


FROM debian:bookworm-slim AS runtime
FROM debian:bookworm-20240904-slim AS runtime
WORKDIR /app

RUN apt-get update && apt-get install -y \
Expand Down
34 changes: 17 additions & 17 deletions tests/data/registration_holesky.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"message": {
"fee_recipient": "0x4770b19c113cbc07e220d51e6a9fbc4ed30fa51a",
"fee_recipient": "0x4770B19C113cbC07e220d51E6A9fBC4ED30Fa51a",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x874564874fc4cb9ce548ce09b2e1614be8ed4be7b7882cef413a09e2b48b9c6e11c67d0e95b5945ace53424c4c2dc70e"
Expand All @@ -10,7 +10,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x964fbfc9d5de5723b5e7386c37638f369e23d9df7d1b57ff427935257738518508199652339abd7c9e4cc05f2aa65ca3"
Expand All @@ -19,7 +19,7 @@
},
{
"message": {
"fee_recipient": "0x4b7c65194f8144c930079e6171e4a2c4dc46206e",
"fee_recipient": "0x4b7c65194f8144c930079e6171E4a2c4DC46206e",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x93a7da94a32c25f8d26d07f4444b59c2534657be319d891515d215bd05ac9acbf8315496d755db38a3ebeec39c761f79"
Expand All @@ -28,7 +28,7 @@
},
{
"message": {
"fee_recipient": "0x4b7c65194f8144c930079e6171e4a2c4dc46206e",
"fee_recipient": "0x4b7c65194f8144c930079e6171E4a2c4DC46206e",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xa75c8ecc47b74f06ed176506de9bc7b0be16286b88760c53dad3f384858a7411dd9f17659cf0e0b242e9b01bc2c1ec3e"
Expand All @@ -37,7 +37,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xb0c82175cf48f0e66dd18ee214447246d8f17050a85a7aaa1d54437110be2d8ce653f27279e759103546134ece5024e1"
Expand All @@ -46,7 +46,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xae728adbf92d2543f52d185db6f42e379ae495db5b6c3ea69fd629d35169834d622534bf73ab6f0c081f1b80e6568cd2"
Expand All @@ -55,7 +55,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xad95c2ae134f81ef344d101c741aba4f74709d49e8812576606898b9592dfd28b8b56875f9227eb9653532a9fbbf2af9"
Expand All @@ -64,7 +64,7 @@
},
{
"message": {
"fee_recipient": "0x4b7c65194f8144c930079e6171e4a2c4dc46206e",
"fee_recipient": "0x4b7c65194f8144c930079e6171E4a2c4DC46206e",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x93455720ed2c9d5978fa1ef70499708fe05ce8105a1e1e3fe38b96b9b44cbda407d4b379e5199b5b033c1e448f3a0aee"
Expand All @@ -73,7 +73,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xa4401ba2aad5f89230a7031185a96bf442f3d5a8656bf71b26726538d08a6a10e06b401135c06c848160e4fc19af5e85"
Expand All @@ -82,7 +82,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x830a2e821aa7e3eef052ea9234cdf8c3318e53fa2362d53de89518ceb38ad406dbc5df758cdc7fc0f5e9cb43856a0c2f"
Expand All @@ -91,7 +91,7 @@
},
{
"message": {
"fee_recipient": "0x4770b19c113cbc07e220d51e6a9fbc4ed30fa51a",
"fee_recipient": "0x4770B19C113cbC07e220d51E6A9fBC4ED30Fa51a",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x874ac8ddd0bc03aab76387033796ecc35a9eee08e0dd5edbef86fbde9908dc2afdb2d52da6e4a9c2a849b81c717d7370"
Expand All @@ -100,7 +100,7 @@
},
{
"message": {
"fee_recipient": "0x4770b19c113cbc07e220d51e6a9fbc4ed30fa51a",
"fee_recipient": "0x4770B19C113cbC07e220d51E6A9fBC4ED30Fa51a",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xa525b2c31e0d02f13eecac5886cfd07317dc40db322b686db11df3650ace655edff908a678e15bd61adbeb52f7090396"
Expand All @@ -109,7 +109,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xa0c0e2d0caf4e671e1924bad74296595f992210cfb534fff332a99f2911279b2d40a9f9723c9a07a4fb23d7d2b64abb2"
Expand All @@ -118,7 +118,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xb5661b161e50bef696f2f0275ef0f67008480e890ae4505b7401e311ee0e0acd0e13aee072aff65e6bd5db1473231d40"
Expand All @@ -127,7 +127,7 @@
},
{
"message": {
"fee_recipient": "0x4770b19c113cbc07e220d51e6a9fbc4ed30fa51a",
"fee_recipient": "0x4770B19C113cbC07e220d51E6A9fBC4ED30Fa51a",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x913e7a010ac919517c86bf1ec19a86b63c3fb8a0cea9ada5f7a27f0331e07de818cfe84126f36f4a8bf3b6f7e8d56d78"
Expand All @@ -136,7 +136,7 @@
},
{
"message": {
"fee_recipient": "0x4770b19c113cbc07e220d51e6a9fbc4ed30fa51a",
"fee_recipient": "0x4770B19C113cbC07e220d51E6A9fBC4ED30Fa51a",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0x96ceab797644db83f6bfcb0749db5208cbe9870f6b6d17dced68cb6b3f1335b097faeadc68180a9fc3e75f0c2bde4357"
Expand All @@ -145,7 +145,7 @@
},
{
"message": {
"fee_recipient": "0x02a9d3637126923de9369557cd9673aae46666fd",
"fee_recipient": "0x02a9d3637126923De9369557CD9673aae46666Fd",
"gas_limit": "30000000",
"timestamp": "1716391930",
"pubkey": "0xaced93f48c587d7ca64e6013f6398d8adac2f424e981bd85fbed18ca67a4738465d1a56bf10cdc9e4b523c555fe12bdf"
Expand Down
2 changes: 1 addition & 1 deletion tests/data/signed_blinded_block_holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -2200,7 +2200,7 @@
},
"execution_payload_header": {
"parent_hash": "0x114d1897fefa402a01a653c21a7f1f1db049d1373a5e73a2d25d7a8045dc02a1",
"fee_recipient": "0x477cc10a5b54aed5c88544c2e71ea0581cf64593",
"fee_recipient": "0x477cc10a5b54aeD5C88544C2e71eA0581cf64593",
"state_root": "0x6724be16ef8e65681cb66f9c144da67347b8983aa5e3f4662c9b5dba90ab5bc6",
"receipts_root": "0xf2f6d2fe6960e4dedad18cca0c7881e6509d551d3e04c1879a627fb8aba30272",
"logs_bloom": "0x00000400000000000000848008100000000000000000000004000000010080000000000100000400000000000000000000000000020100000000000000000000080004000000000800008008000000000000000020004000000400000000000000000000000400000000000000000000000000000010000002000010000000000000000000800000200100000000000000004000000000200002000004000000000800000000000000000000000000008000000000000000800000008000000400012002000000000000000000000000000200000000000000000000000000040000000000000000000000000000000000408000000000040000000000000000",
Expand Down
Loading