Skip to content

test: Add ENS support to functional tests and implement ENS registration test#7358

Merged
at0m1x19 merged 10 commits intodevelopfrom
test/Write-Ens-Registration-Test
Mar 17, 2026
Merged

test: Add ENS support to functional tests and implement ENS registration test#7358
at0m1x19 merged 10 commits intodevelopfrom
test/Write-Ens-Registration-Test

Conversation

@at0m1x19
Copy link
Contributor

  • Integrate ENS for testing, including new services and fixtures.
  • Add deployment and configuration scripts for ENS contracts.
  • Update contract addresses and improve integration with existing setup.
  • Implement ENS registration test

Closes #7356
Closes #7357

@github-actions
Copy link

github-actions bot commented Mar 10, 2026

⚠️ Companion PR Required

Add a link to your status-app PR in this PR's description.

Example: https://github.com/status-im/status-app/pull/123

@at0m1x19 at0m1x19 changed the title Add ENS support to functional tests and implement ENS registration test test: Add ENS support to functional tests and implement ENS registration test Mar 10, 2026
@at0m1x19 at0m1x19 force-pushed the test/Write-Ens-Registration-Test branch from 236e25c to 5bbd72b Compare March 10, 2026 23:45
@status-im-auto
Copy link
Member

status-im-auto commented Mar 10, 2026

Jenkins Builds

Click to see older builds (79)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 236e25c 1 2026-03-10 23:46:32 ~2 min tests 📄log
✔️ 236e25c 1 2026-03-10 23:47:27 ~4 min linux/status-go 📦zip
✔️ 236e25c 1 2026-03-10 23:51:41 ~8 min linux/nwaku 📦zip
✔️ 236e25c 1 2026-03-10 23:53:23 ~9 min windows/status-go 📦zip
✖️ 236e25c 1 2026-03-10 23:58:07 ~14 min tests-rpc 📄log
✖️ 236e25c 1 2026-03-10 23:58:29 ~14 min tests-rpc 📄log
✔️ 236e25c 1 2026-03-11 00:04:00 ~20 min windows/nwaku 📦zip
✔️ 236e25c 1 2026-03-11 00:19:22 ~35 min tests 📄log
✖️ ad2279a 2 2026-03-10 23:49:35 ~2 min tests 📄log
✔️ ad2279a 2 2026-03-10 23:51:36 ~4 min linux/status-go 📦zip
✔️ ad2279a 2 2026-03-10 23:54:41 ~5 min macos/status-go 📦zip
✔️ ad2279a 3 2026-03-10 23:55:24 ~3 min linux/status-go 📦zip
✔️ ad2279a 2 2026-03-10 23:59:26 ~9 min macos/nwaku 📦zip
✔️ ad2279a 2 2026-03-11 00:00:34 ~8 min linux/nwaku 📦zip
✔️ ad2279a 2 2026-03-11 00:04:56 ~11 min windows/status-go 📦zip
✔️ ad2279a 3 2026-03-11 00:11:53 ~11 min linux/nwaku 📦zip
✖️ ad2279a 2 2026-03-11 00:16:59 ~18 min tests-rpc 📄log
✖️ ad2279a 2 2026-03-11 00:18:49 ~20 min tests-rpc 📄log
✔️ ad2279a 2 2026-03-11 00:23:24 ~18 min windows/nwaku 📦zip
✔️ ad2279a 2 2026-03-11 00:54:38 ~35 min tests 📄log
✖️ 335b30b 3 2026-03-11 00:35:47 ~2 min tests 📄log
✔️ 335b30b 4 2026-03-11 00:36:41 ~3 min linux/status-go 📦zip
✔️ 335b30b 4 2026-03-11 00:40:40 ~7 min linux/nwaku 📦zip
✔️ 335b30b 3 2026-03-11 00:43:18 ~10 min windows/status-go 📦zip
✖️ 335b30b 3 2026-03-11 00:46:48 ~13 min tests-rpc 📄log
✔️ 335b30b 3 2026-03-11 00:47:02 ~13 min tests-rpc 📄log
✔️ 335b30b 3 2026-03-11 00:54:06 ~21 min macos/status-go 📦zip
✔️ 335b30b 3 2026-03-11 00:54:51 ~21 min windows/nwaku 📦zip
✔️ 335b30b 3 2026-03-11 01:30:34 ~35 min tests 📄log
✔️ 335b30b 4 2026-03-11 08:43:13 ~14 min tests-rpc 📄log
✖️ dc7ca86 4 2026-03-15 23:11:22 ~2 min tests 📄log
✔️ dc7ca86 5 2026-03-15 23:12:11 ~3 min linux/status-go 📦zip
✔️ dc7ca86 4 2026-03-15 23:13:13 ~4 min macos/status-go 📦zip
✔️ dc7ca86 4 2026-03-15 23:14:37 ~6 min macos/nwaku 📦zip
✔️ dc7ca86 5 2026-03-15 23:16:14 ~7 min linux/nwaku 📦zip
✔️ dc7ca86 4 2026-03-15 23:19:24 ~10 min windows/status-go 📦zip
✖️ dc7ca86 5 2026-03-15 23:23:21 ~14 min tests-rpc 📄log
✖️ dc7ca86 4 2026-03-15 23:23:34 ~15 min tests-rpc 📄log
✔️ dc7ca86 4 2026-03-15 23:29:34 ~20 min windows/nwaku 📦zip
✔️ dc7ca86 4 2026-03-15 23:44:57 ~36 min tests 📄log
✖️ d40cce7 5 2026-03-15 23:20:37 ~2 min tests 📄log
✔️ d40cce7 6 2026-03-15 23:21:39 ~3 min linux/status-go 📦zip
✔️ d40cce7 5 2026-03-15 23:22:16 ~4 min macos/status-go 📦zip
✔️ d40cce7 6 2026-03-15 23:25:53 ~8 min linux/nwaku 📦zip
✔️ d40cce7 5 2026-03-15 23:28:17 ~10 min macos/nwaku 📦zip
✔️ d40cce7 5 2026-03-15 23:30:52 ~11 min windows/status-go 📦zip
✖️ 0252a3c 6 2026-03-15 23:24:43 ~2 min tests 📄log
✔️ 0252a3c 7 2026-03-15 23:25:49 ~4 min linux/status-go 📦zip
✖️ 8017de7 7 2026-03-15 23:27:34 ~2 min tests 📄log
✔️ 8017de7 6 2026-03-15 23:27:47 ~5 min macos/status-go 📦zip
✔️ 8017de7 8 2026-03-15 23:29:50 ~3 min linux/status-go 📦zip
✔️ 8017de7 7 2026-03-15 23:33:56 ~7 min linux/nwaku 📦zip
✔️ 8017de7 6 2026-03-15 23:36:39 ~8 min macos/nwaku 📦zip
✖️ 8017de7 6 2026-03-15 23:37:16 ~13 min tests-rpc 📄log
✔️ 8017de7 6 2026-03-15 23:40:03 ~8 min windows/status-go 📦zip
✖️ 8017de7 5 2026-03-15 23:46:39 ~22 min tests-rpc 📄log
✔️ 8017de7 5 2026-03-15 23:50:17 ~19 min windows/nwaku 📦zip
✔️ 8017de7 5 2026-03-16 00:19:40 ~34 min tests 📄log
✖️ b68a62b 8 2026-03-16 00:04:35 ~2 min tests 📄log
✔️ b68a62b 9 2026-03-16 00:05:24 ~3 min linux/status-go 📦zip
✔️ b68a62b 7 2026-03-16 00:06:09 ~4 min macos/status-go 📦zip
✔️ b68a62b 8 2026-03-16 00:09:22 ~7 min linux/nwaku 📦zip
✔️ b68a62b 7 2026-03-16 00:10:45 ~9 min macos/nwaku 📦zip
✔️ b68a62b 7 2026-03-16 00:12:21 ~10 min windows/status-go 📦zip
✖️ b68a62b 6 2026-03-16 00:16:28 ~14 min tests-rpc 📄log
✖️ b68a62b 7 2026-03-16 00:20:50 ~19 min tests-rpc 📄log
✔️ b68a62b 6 2026-03-16 00:23:16 ~21 min windows/nwaku 📦zip
✔️ b68a62b 6 2026-03-16 00:55:22 ~35 min tests 📄log
✔️ b68a62b 8 2026-03-16 08:38:22 ~14 min tests-rpc 📄log
✔️ 8365473 8 2026-03-17 15:31:31 ~12 min macos/status-go 📦zip
✔️ 8365473 8 2026-03-17 15:35:35 ~16 min macos/nwaku 📦zip
✔️ 8365473 8 2026-03-17 15:37:58 ~18 min windows/status-go 📦zip
✔️ 8365473 7 2026-03-17 15:48:21 ~29 min windows/nwaku 📦zip
✔️ 8365473 10 2026-03-17 15:54:52 ~36 min linux/status-go 📦zip
✖️ 8365473 9 2026-03-17 15:59:45 ~40 min tests 📄log
✔️ 8365473 9 2026-03-17 16:01:54 ~43 min linux/nwaku 📦zip
✖️ 8365473 7 2026-03-17 16:14:36 ~55 min tests-rpc 📄log
✖️ 8365473 9 2026-03-17 16:15:05 ~56 min tests-rpc 📄log
✔️ 8365473 7 2026-03-17 16:33:24 ~1 hr 14 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 7a07133 10 2026-03-17 22:55:10 ~2 min tests 📄log
✔️ 7a07133 11 2026-03-17 22:56:14 ~3 min linux/status-go 📦zip
✔️ 7a07133 9 2026-03-17 22:56:46 ~4 min macos/status-go 📦zip
✔️ 7a07133 10 2026-03-17 23:00:30 ~8 min linux/nwaku 📦zip
✔️ 7a07133 9 2026-03-17 23:02:08 ~9 min windows/status-go 📦zip
✔️ 7a07133 9 2026-03-17 23:05:43 ~13 min macos/nwaku 📦zip
✔️ 7a07133 10 2026-03-17 23:09:02 ~16 min tests-rpc 📄log
✔️ 7a07133 8 2026-03-17 23:09:05 ~16 min tests-rpc 📄log
✔️ 7a07133 8 2026-03-17 23:13:58 ~21 min windows/nwaku 📦zip
✔️ 7a07133 8 2026-03-17 23:28:51 ~36 min tests 📄log

@at0m1x19 at0m1x19 requested a review from a team as a code owner March 11, 2026 00:32
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 53.84615% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.15%. Comparing base (de9a5d6) to head (7a07133).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...let/router/pathprocessor/processor_ens_register.go 43.75% 6 Missing and 3 partials ⚠️
...llet/router/pathprocessor/processor_ens_release.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7358      +/-   ##
===========================================
+ Coverage    60.98%   61.15%   +0.17%     
===========================================
  Files          822      822              
  Lines       115168   115084      -84     
===========================================
+ Hits         70239    70384     +145     
+ Misses       37759    37493     -266     
- Partials      7170     7207      +37     
Flag Coverage Δ
functional 40.00% <53.84%> (+0.23%) ⬆️
unit 55.30% <3.84%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
services/ens/ensresolver/resolver.go 32.51% <100.00%> (+27.42%) ⬆️
services/wallet/requests/router_input_params.go 14.89% <100.00%> (+4.51%) ⬆️
services/wallet/router/sendtype/send_type.go 100.00% <100.00%> (ø)
...llet/router/pathprocessor/processor_ens_release.go 13.63% <0.00%> (+2.92%) ⬆️
...let/router/pathprocessor/processor_ens_register.go 52.04% <43.75%> (+44.47%) ⬆️

... and 32 files with indirect coverage changes

Copy link
Contributor

@fbarbu15 fbarbu15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment on lines +104 to +105
// No NameWrapper on this chain — name can't be wrapped, return registry owner
return &owner, nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure of the consequences of this change.
@saledjenic is this safe?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename it to sync_ens_registry.sh for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to sync_ens_registry.sh and updated all references

Comment on lines +106 to +116
@pytest.fixture(autouse=True)
def setup(self, backend_new_profile, foundry_client, ens_addresses, multicall3_deployer):
self.foundry = foundry_client
self.ens_addresses = ens_addresses
self.rpc_client = backend_new_profile(
name="ens_user",
multicall_contract_address=multicall3_deployer.contract_address,
)

def test_ens_register_and_verify(self):
public_key = self.rpc_client.public_key
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thoght we've stopped using autouse fixtures and self.backend. But it's up to you

Suggested change
@pytest.fixture(autouse=True)
def setup(self, backend_new_profile, foundry_client, ens_addresses, multicall3_deployer):
self.foundry = foundry_client
self.ens_addresses = ens_addresses
self.rpc_client = backend_new_profile(
name="ens_user",
multicall_contract_address=multicall3_deployer.contract_address,
)
def test_ens_register_and_verify(self):
public_key = self.rpc_client.public_key
def backend(self, backend_new_profile, foundry_client, ens_addresses, multicall3_deployer):
self.foundry = foundry_client
self.ens_addresses = ens_addresses
return backend_new_profile(
name="ens_user",
multicall_contract_address=multicall3_deployer.contract_address,
)
def test_ens_register_and_verify(self, backend):
public_key = backend.public_key

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we've stopped using autouse fixtures and self.backend. But it's up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right. Fixed

logger = logging.getLogger(__name__)

ANVIL_RPC_URL = "http://anvil:8545"
ENS_USERNAME = "testuser"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's generate a random name each time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed hardcoded ENS_USERNAME/ENS_FULL_NAME constants, added random_ens_username() that generates test{uuid[:8]} per test run

registrar_addr == self.ens_addresses["registrar"]
), f"Registrar mismatch: RPC={registrar_addr}, deployed={self.ens_addresses['registrar']}"

register_ens_name(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so it's not exactly test_ens_register_and_verify, because registration is happening outside status-go API. So it's rather test_ens_verify.

We should distinguish 2 tests:

  1. Register an ENS name fully with status-go API (as it is possible to do from status-app).
  2. Register an ENS name externally, then add (link) it to Status profile with status-go API.

Both tests are valid and useful, just make sure to implement (1) too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Implemented both:

  1. test_ens_register_via_router (new class TestEnsRouterRegistration) — registers ENS name through the wallet router flow (getSuggestedRoutes → buildTransactionsFromRoute → sign → sendRouterTransactionsWithSignatures), matching the production path used by status-app.
  2. test_ens_add_external_registration (renamed from test_ens_register_and_verify) — registers externally via cast, then links to Status profile via ens_service.add.

For (1), added Go changes to support Anvil (chainID 31337) in the wallet router ENS processors — this is Phase 2 from ENS_FUNCTIONAL_TESTS_PLAN.md. Token address is resolved dynamically via registrar.Token() with fallback to snt.ContractAddress().

@igor-sirotin
Copy link
Collaborator

👏 👏 👏

@at0m1x19 at0m1x19 merged commit cc7df45 into develop Mar 17, 2026
26 of 28 checks passed
@at0m1x19 at0m1x19 deleted the test/Write-Ens-Registration-Test branch March 17, 2026 23:56
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.

Write Ens Registration Test Deploy ENS contracts on Anvil and enable ens_* RPC for chainID 31337

5 participants