Skip to content

Conversation

@dastansam
Copy link
Contributor

@dastansam dastansam commented Nov 21, 2025

Milestone Delivery Checklist

  • The milestone-delivery-template.md has been copied and updated.
  • This pull request is being made by the same account as the accepted application.
  • I have disclosed any and all sources of reused code in the submitted repositories and have done my due diligence to meet its license requirements.
  • In case of acceptance, invoices must be submitted and payments will be transferred to the Polkadot AssetHub and/or fiat account provided in the application.
  • The delivery is according to the Guidelines for Milestone Deliverables.

Link to the application pull request: w3f/Grants-Program#2292

@semuelle
Copy link
Member

Hey @dastansam, is this PR ready for review?

@dastansam
Copy link
Contributor Author

Hey @dastansam, is this PR ready for review?

Forgot the article again, will make it ready soon. Thanks!

@dastansam dastansam marked this pull request as ready for review December 18, 2025 22:47
@dastansam
Copy link
Contributor Author

Hey @dastansam, is this PR ready for review?

ready for review, thanks!

@github-actions github-actions bot added the stale label Jan 2, 2026
@keeganquigley keeganquigley self-assigned this Jan 7, 2026
@keeganquigley
Copy link
Contributor

Hi @dastansam thanks for the review. Currently there are 4 tests failing. None of them are related to the light client (which you said may fail). Can you take a look? Thanks!

cargo test
warning: unused imports: `SubstrateConfig` and `SubstrateExtrinsicParams`
  --> adapter/src/types.rs:9:38
   |
 9 |     config::substrate::{BlakeTwo256, SubstrateExtrinsicParams, SubstrateHeader},
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^
10 |     Config, PolkadotConfig, SubstrateConfig,
   |                             ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: struct `BlockNotification` is never constructed
  --> adapter/src/server.rs:22:12
   |
22 | pub struct BlockNotification {
   |            ^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: field `executor` is never read
  --> adapter/src/server.rs:34:5
   |
28 | pub struct EthAdapter {
   |            ---------- field in this struct
...
34 |     executor: SubscriptionTaskExecutor,
   |     ^^^^^^^^

warning: field `symbol` is never read
  --> adapter/src/sub_client.rs:31:5
   |
27 | pub struct Properties {
   |            ---------- field in this struct
...
31 |     symbol: String,
   |     ^^^^^^
   |
   = note: `Properties` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

warning: method `subscribe_new_blocks` is never used
   --> adapter/src/sub_client.rs:436:14
    |
107 | impl SubLightClient {
    | ------------------- method in this implementation
...
436 |     async fn subscribe_new_blocks(
    |              ^^^^^^^^^^^^^^^^^^^^

warning: function `handle_accepted_subscription` is never used
   --> adapter/src/sub_client.rs:462:14
    |
462 | pub async fn handle_accepted_subscription(
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `subeth` (bin "subeth" test) generated 6 warnings (run `cargo fix --bin "subeth" --tests` to apply 1 suggestion)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.70s
warning: the following packages contain code that will be rejected by a future version of Rust: trie-db v0.29.1
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running unittests src/main.rs (target/debug/deps/subeth-6dbc030e5ff58475)

running 18 tests
test adapter::tests::test_pallet_mapping_works ... ok
test adapter::tests::test_hash_and_truncate ... ok
test adapter::tests::test_storage_key_works ... ok
test cache::tests::test_capacity_limit ... ok
test cache::tests::test_insert_and_retrieve ... ok
test tests::test_call_data_encoding_various_amounts ... ok
test cache::tests::test_latest_block ... ok
test tests::test_ethereum_transaction_encoding ... ok
test tests::test_fetch_local_metadata ... FAILED
Subeth RPC adapter!
Subeth RPC adapter!
Subeth RPC adapter!
[INFO ] Logger initialized
[INFO ] Logger initialized
[INFO ] Logger initialized
Error: RPC error: Error when opening the TCP socket: Connection refused (os error 111)
test tests::test_generic_scale_encoded_call_dispatch ... ok
[INFO ] Loading chain spec from: ../specs/polkadot.json
test tests::test_integration_flow_documentation ... ok
test tests::test_pallet_address_encoding ... ok
test tests::test_signature_format ... ok
test tests::test_transaction_message_hash ... ok
test tests::test_transfer_transaction_construction ... ok
[INFO ] Connected to chain: 42
[INFO ] RPC port: 8545
[INFO ] Launching RPC server at: Some([RpcEndpoint { listen_addr: 127.0.0.1:8545, batch_config: Unlimited, max_connections: 100, max_payload_in_mb: 15, max_payload_out_mb: 15, max_subscriptions_per_connection: 1024, max_buffer_capacity_per_connection: 64, rate_limit: None, rate_limit_trust_proxy_headers: false, rate_limit_whitelisted_ips: [], cors: Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]), rpc_methods: Auto, is_optional: false, retry_random_port: true }, RpcEndpoint { listen_addr: [::1]:8545, batch_config: Unlimited, max_connections: 100, max_payload_in_mb: 15, max_payload_out_mb: 15, max_subscriptions_per_connection: 1024, max_buffer_capacity_per_connection: 64, rate_limit: None, rate_limit_trust_proxy_headers: false, rate_limit_whitelisted_ips: [], cors: Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]), rpc_methods: Auto, is_optional: true, retry_random_port: true }])
[WARN ] Running in --dev mode, RPC CORS has been disabled.
[INFO ] Running JSON-RPC server: addr=127.0.0.1:8545,[::1]:8545
[INFO ] Chain initialization complete for polkadot. Name: "Polkadot". Genesis hash: 0x91b190c3. Chain specification starting at: 0xaf968407 (#14442869)
[INFO ] Chain specification of polkadot contains a `genesis.raw` item. It is possible to significantly improve the initialization time by replacing the `"raw": ...` field with `"stateRootHash": "0x29d0d972cd27cbc511e9589fcb7a4506d5eb6a9e8df205f00472e5ab354a4e17"`
[WARN ] Chain specification of polkadot contains a non-empty `telemetryEndpoints` field. Smoldot doesn't support telemetry endpoints and as such this field is unused.
[WARN ] The JSON-RPC client has just called a JSON-RPC function from the legacy JSON-RPC API (chain_getFinalizedHead). Legacy JSON-RPC functions have loose semantics and cannot be properly implemented on a light client. You are encouraged to use the new JSON-RPC API <https://github.com/paritytech/json-rpc-interface-spec/> instead. The legacy JSON-RPC API functions will be deprecated and removed in the distant future.
test tests::test_e2e_balance_transfer ... FAILED
[ERROR] subxt error: Metadata(IncompatibleCodegen)
test tests::test_eth_rpc_url ... FAILED
[INFO ] Successfully compiled runtime. Spec version: 9360. Size of `:code`: 1.3 MiB.
[INFO ] Connected to chain: 42
[INFO ] RPC port: 8546
[INFO ] Launching RPC server at: Some([RpcEndpoint { listen_addr: 127.0.0.1:8546, batch_config: Unlimited, max_connections: 100, max_payload_in_mb: 15, max_payload_out_mb: 15, max_subscriptions_per_connection: 1024, max_buffer_capacity_per_connection: 64, rate_limit: None, rate_limit_trust_proxy_headers: false, rate_limit_whitelisted_ips: [], cors: Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]), rpc_methods: Auto, is_optional: false, retry_random_port: true }, RpcEndpoint { listen_addr: [::1]:8546, batch_config: Unlimited, max_connections: 100, max_payload_in_mb: 15, max_payload_out_mb: 15, max_subscriptions_per_connection: 1024, max_buffer_capacity_per_connection: 64, rate_limit: None, rate_limit_trust_proxy_headers: false, rate_limit_whitelisted_ips: [], cors: Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]), rpc_methods: Auto, is_optional: true, retry_random_port: true }])
[WARN ] Running in --dev mode, RPC CORS has been disabled.
[INFO ] Running JSON-RPC server: addr=127.0.0.1:8546,[::1]:8546
test tests::test_eth_rpc_light_client ... ok

failures:

---- tests::test_fetch_local_metadata stdout ----
Error: RPC error: Error when opening the TCP socket: Connection refused (os error 111)

---- tests::test_e2e_balance_transfer stdout ----
Error: Client exited with status: exit status: 0

---- tests::test_eth_rpc_url stdout ----
Transaction: Some(Transaction { inner: Eip1559(Signed { tx: TxEip1559 { chain_id: 0, nonce: 0, gas_limit: 21000000, max_fee_per_gas: 340282366920938463463374607431768211455, max_priority_fee_per_gas: 0, to: Call(0x54696d657374616d000000000000000000000000), value: 0, access_list: AccessList([]), input: 0x03000b508cc3c29b01 }, signature: PrimitiveSignature { y_parity: false, r: 0, s: 0 }, hash: 0xfc1e79631a311925e1a8be2c85bbbaa0b0d4d2c24cacb4c088341f7c204a2362 }), block_hash: Some(0x8990b2b52497eee3bca09fd118af0afb4f588df76814a5fbcc084284645aa4c3), block_number: Some(29526172), transaction_index: Some(0), effective_gas_price: None, from: 0x0000000000000000000000000000000000000000 })
Error: ErrorObject { code: ServerError(500), message: "Adapter error", data: Some(RawValue("Subxt err: Metadata(IncompatibleCodegen)")) }

Caused by:
    ErrorObject { code: ServerError(500), message: "Adapter error", data: Some(RawValue("Subxt err: Metadata(IncompatibleCodegen)")) }


failures:
    tests::test_e2e_balance_transfer
    tests::test_eth_rpc_url
    tests::test_fetch_local_metadata

test result: FAILED. 15 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 51.39s

@keeganquigley
Copy link
Contributor

The Docker file also fails seemingly due to an issue with the COPY command:

docker build -t subeth-rpc-adapter .

[+] Building 1.7s (11/16)                                                                                   docker:default
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => => transferring dockerfile: 1.46kB                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:bookworm-slim                                               1.2s
 => [internal] load metadata for docker.io/library/rust:1.86-bookworm                                                 1.4s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 2B                                                                                       0.0s
 => CANCELED [builder 1/8] FROM docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3  0.1s
 => => resolve docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19  0.0s
 => => sha256:bd61dd236c8c07f0df92e942662dad942685ce613fd95d06032ffc80974cee0c 4.36kB / 4.36kB                        0.0s
 => => sha256:cf05a52c02353f0b2b6f9be0549ac916c3fb1dc8d4bacd405eac7f28562ec9f2 0B / 48.49MB                           0.2s
 => => sha256:63964a8518f54dc31f8df89d7f06714c7a793aa1aa08a64ae3d7f4f4f30b4ac8 0B / 24.01MB                           0.2s
 => => sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19f754081 7.75kB / 7.75kB                        0.0s
 => => sha256:878ca0e8df1305dcbbfffac5bb908cce6a4bc5f6b629c518e7112645ee8851d4 1.94kB / 1.94kB                        0.0s
 => CANCELED [stage-1 1/3] FROM docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b  0.2s
 => => resolve docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850  0.0s
 => => sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850ce7a418ee 8.56kB / 8.56kB                        0.0s
 => => sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe 1.02kB / 1.02kB                        0.0s
 => => sha256:d60e93accd5dee9e1da6d56e24335c31aa2819ac5befc47e4e314809cd5dc2c7 453B / 453B                            0.0s
 => => sha256:c02d17997ce3d2c82e082235ea0b5152d06ee659c4e2fabcf1e0079312f1bcde 0B / 28.23MB                           0.2s
 => [internal] load build context                                                                                     0.1s
 => => transferring context: 9.85MB                                                                                   0.1s
 => CACHED [builder 2/8] WORKDIR /usr/src/subeth-rpc-adapter                                                          0.0s
 => CACHED [builder 3/8] RUN apt-get update && apt-get install -y     libssl-dev     ca-certificates     protobuf-co  0.0s
 => CACHED [builder 4/8] COPY Cargo.toml Cargo.lock ./                                                                0.0s
 => ERROR [builder 5/8] COPY src ./src                                                                                0.0s
------
 > [builder 5/8] COPY src ./src:
------
Dockerfile:18
--------------------
  16 |     
  17 |     COPY Cargo.toml Cargo.lock ./
  18 | >>> COPY src ./src
  19 |     COPY artifacts ./artifacts
  20 |     COPY specs ./specs
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b785416-72dd-423f-8121-7cae594f4729::nbtgilkwjrmcm699him9wxo2v: "/src": not found

@dastansam
Copy link
Contributor Author

The Docker file also fails seemingly due to an issue with the COPY command:

docker build -t subeth-rpc-adapter .

[+] Building 1.7s (11/16)                                                                                   docker:default
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => => transferring dockerfile: 1.46kB                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:bookworm-slim                                               1.2s
 => [internal] load metadata for docker.io/library/rust:1.86-bookworm                                                 1.4s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 2B                                                                                       0.0s
 => CANCELED [builder 1/8] FROM docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3  0.1s
 => => resolve docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19  0.0s
 => => sha256:bd61dd236c8c07f0df92e942662dad942685ce613fd95d06032ffc80974cee0c 4.36kB / 4.36kB                        0.0s
 => => sha256:cf05a52c02353f0b2b6f9be0549ac916c3fb1dc8d4bacd405eac7f28562ec9f2 0B / 48.49MB                           0.2s
 => => sha256:63964a8518f54dc31f8df89d7f06714c7a793aa1aa08a64ae3d7f4f4f30b4ac8 0B / 24.01MB                           0.2s
 => => sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19f754081 7.75kB / 7.75kB                        0.0s
 => => sha256:878ca0e8df1305dcbbfffac5bb908cce6a4bc5f6b629c518e7112645ee8851d4 1.94kB / 1.94kB                        0.0s
 => CANCELED [stage-1 1/3] FROM docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b  0.2s
 => => resolve docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850  0.0s
 => => sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850ce7a418ee 8.56kB / 8.56kB                        0.0s
 => => sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe 1.02kB / 1.02kB                        0.0s
 => => sha256:d60e93accd5dee9e1da6d56e24335c31aa2819ac5befc47e4e314809cd5dc2c7 453B / 453B                            0.0s
 => => sha256:c02d17997ce3d2c82e082235ea0b5152d06ee659c4e2fabcf1e0079312f1bcde 0B / 28.23MB                           0.2s
 => [internal] load build context                                                                                     0.1s
 => => transferring context: 9.85MB                                                                                   0.1s
 => CACHED [builder 2/8] WORKDIR /usr/src/subeth-rpc-adapter                                                          0.0s
 => CACHED [builder 3/8] RUN apt-get update && apt-get install -y     libssl-dev     ca-certificates     protobuf-co  0.0s
 => CACHED [builder 4/8] COPY Cargo.toml Cargo.lock ./                                                                0.0s
 => ERROR [builder 5/8] COPY src ./src                                                                                0.0s
------
 > [builder 5/8] COPY src ./src:
------
Dockerfile:18
--------------------
  16 |     
  17 |     COPY Cargo.toml Cargo.lock ./
  18 | >>> COPY src ./src
  19 |     COPY artifacts ./artifacts
  20 |     COPY specs ./specs
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b785416-72dd-423f-8121-7cae594f4729::nbtgilkwjrmcm699him9wxo2v: "/src": not found

thanks for the review, will be addressing it this weekend

@dastansam
Copy link
Contributor Author

dastansam commented Jan 20, 2026

The Docker file also fails seemingly due to an issue with the COPY command:

docker build -t subeth-rpc-adapter .

[+] Building 1.7s (11/16)                                                                                   docker:default
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => => transferring dockerfile: 1.46kB                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:bookworm-slim                                               1.2s
 => [internal] load metadata for docker.io/library/rust:1.86-bookworm                                                 1.4s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 2B                                                                                       0.0s
 => CANCELED [builder 1/8] FROM docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3  0.1s
 => => resolve docker.io/library/rust:1.86-bookworm@sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19  0.0s
 => => sha256:bd61dd236c8c07f0df92e942662dad942685ce613fd95d06032ffc80974cee0c 4.36kB / 4.36kB                        0.0s
 => => sha256:cf05a52c02353f0b2b6f9be0549ac916c3fb1dc8d4bacd405eac7f28562ec9f2 0B / 48.49MB                           0.2s
 => => sha256:63964a8518f54dc31f8df89d7f06714c7a793aa1aa08a64ae3d7f4f4f30b4ac8 0B / 24.01MB                           0.2s
 => => sha256:300ec56abce8cc9448ddea2172747d048ed902a3090e6b57babb2bf19f754081 7.75kB / 7.75kB                        0.0s
 => => sha256:878ca0e8df1305dcbbfffac5bb908cce6a4bc5f6b629c518e7112645ee8851d4 1.94kB / 1.94kB                        0.0s
 => CANCELED [stage-1 1/3] FROM docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b  0.2s
 => => resolve docker.io/library/debian:bookworm-slim@sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850  0.0s
 => => sha256:56ff6d36d4eb3db13a741b342ec466f121480b5edded42e4b7ee850ce7a418ee 8.56kB / 8.56kB                        0.0s
 => => sha256:09c53e50b5110eb26e0932ab77934481ce9c0068069d4f28e3e7493e51323bfe 1.02kB / 1.02kB                        0.0s
 => => sha256:d60e93accd5dee9e1da6d56e24335c31aa2819ac5befc47e4e314809cd5dc2c7 453B / 453B                            0.0s
 => => sha256:c02d17997ce3d2c82e082235ea0b5152d06ee659c4e2fabcf1e0079312f1bcde 0B / 28.23MB                           0.2s
 => [internal] load build context                                                                                     0.1s
 => => transferring context: 9.85MB                                                                                   0.1s
 => CACHED [builder 2/8] WORKDIR /usr/src/subeth-rpc-adapter                                                          0.0s
 => CACHED [builder 3/8] RUN apt-get update && apt-get install -y     libssl-dev     ca-certificates     protobuf-co  0.0s
 => CACHED [builder 4/8] COPY Cargo.toml Cargo.lock ./                                                                0.0s
 => ERROR [builder 5/8] COPY src ./src                                                                                0.0s
------
 > [builder 5/8] COPY src ./src:
------
Dockerfile:18
--------------------
  16 |     
  17 |     COPY Cargo.toml Cargo.lock ./
  18 | >>> COPY src ./src
  19 |     COPY artifacts ./artifacts
  20 |     COPY specs ./specs
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b785416-72dd-423f-8121-7cae594f4729::nbtgilkwjrmcm699him9wxo2v: "/src": not found

thanks for the review, will be addressing it this weekend

addressed the comments in this commit @keeganquigley

@keeganquigley
Copy link
Contributor

keeganquigley commented Jan 21, 2026

Thanks @dastansam for the fixes. All tests are now passing. The Docker Compose file is working now but there is a minor issue where the health check is trying to use curl which isn't available in the chain container. So the chain runs fine but the health check fails.

Could you either install curl in the chain container, or, a simpler fix might be to change the condition in the docker-compose.yml file from service_healthy to service_started?

@dastansam
Copy link
Contributor Author

Thanks @dastansam for the fixes. All tests are now passing. The Docker Compose file is working now but there is a minor issue where the health check is trying to use curl which isn't available in the chain container. So the chain runs fine but the health check fails.

Could you either install curl in the chain container, or, a simpler fix might be to change the condition in the docker-compose.yml file from service_healthy to service_started?

thanks, just pushed the fix for this

@keeganquigley
Copy link
Contributor

Thanks for the fixes @dastansam I'm now willing to accept M2. Here is my final evaluation. Congrats and was nice working with you through the process.

@keeganquigley keeganquigley merged commit eacbe3c into w3f:master Jan 21, 2026
2 of 3 checks passed
@github-actions
Copy link

🪙 Please fill out the invoice form in order to initiate the payment process. Please make sure that you follow the instructions and requirements as laid out in the form as well as our Terms & Conditions. Thank you!

@github-actions
Copy link

Congratulations on completing the first milestone of this grant! As part of the Grants Program, we want to help grant recipients acknowledge their grants publicly. To that end, we've created a badge for projects that successfully deliver their first milestone. Please use the badge only in reference to the work that has been completed as part of this grant, so please do not display it on your team or project's homepage unless accompanied by a short description of the grant. Furthermore, you're now welcome to announce the grant publicly. Please remember to observe the foundation's guidelines in doing so. If you haven't already, reach out to [email protected] for feedback on your announcement and cross-promotion.

Thank you for your contribution, and good luck! If you have any remaining milestone, let us know if you encounter any delays by leaving a comment on the application PR or submitting an amendment.

@dastansam
Copy link
Contributor Author

Thanks for the fixes @dastansam I'm now willing to accept M2. Here is my final evaluation. Congrats and was nice working with you through the process.

likewise, was nice working with you, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants