Skip to content

fix: Register validator callbacks on p2p client before starting#17230

Merged
PhilWindle merged 1 commit intonextfrom
palla/register-p2p-handlers-before-starting-it-2
Sep 23, 2025
Merged

fix: Register validator callbacks on p2p client before starting#17230
PhilWindle merged 1 commit intonextfrom
palla/register-p2p-handlers-before-starting-it-2

Conversation

@spalladino
Copy link
Contributor

Second attempt at #17207

The issue was that the start method on p2p client would overwrite all previously registered subprotocol handlers, hence the errors we were seeing on CI:

22:00:04 [22:00:04.697] WARN: p2p:4506:libp2p_service:4506:libp2p_service:4506:reqresp:4506 Unknown stream error while handling the stream, aborting {"protocol":"/aztec/req/auth/1.0.0"}
22:00:04     err: {
22:00:04       "type": "TypeError",
22:00:04       "message": "handler is not a function",
22:00:04       "stack":
22:00:04           TypeError: handler is not a function
22:00:04               at /home/aztec-dev/aztec-packages/yarn-project/p2p/dest/services/reqresp/reqresp.js:452:40
22:00:04               at processTicksAndRejections (node:internal/process/task_queues:105:5)
22:00:04               at duplex.sink (/home/aztec-dev/aztec-packages/yarn-project/node_modules/it-byte-stream/src/index.ts:86:22)
22:00:04     }

The test was also failing locally (it had passed before I submitted due to a build issue I missed), and since it was tagged as flake it was greenlighted by CI on the PR.

@spalladino spalladino force-pushed the palla/register-p2p-handlers-before-starting-it-2 branch from ab200b8 to 52c4cc2 Compare September 23, 2025 15:47
@PhilWindle PhilWindle added this pull request to the merge queue Sep 23, 2025
Merged via the queue into next with commit 4d073eb Sep 23, 2025
14 checks passed
@PhilWindle PhilWindle deleted the palla/register-p2p-handlers-before-starting-it-2 branch September 23, 2025 22:17
spalladino pushed a commit that referenced this pull request Sep 25, 2025
Second attempt at
#17207

The issue was that the `start` method on p2p client would overwrite all
previously registered subprotocol handlers, hence the errors we were
seeing on CI:
```
22:00:04 [22:00:04.697] WARN: p2p:4506:libp2p_service:4506:libp2p_service:4506:reqresp:4506 Unknown stream error while handling the stream, aborting {"protocol":"/aztec/req/auth/1.0.0"}
22:00:04     err: {
22:00:04       "type": "TypeError",
22:00:04       "message": "handler is not a function",
22:00:04       "stack":
22:00:04           TypeError: handler is not a function
22:00:04               at /home/aztec-dev/aztec-packages/yarn-project/p2p/dest/services/reqresp/reqresp.js:452:40
22:00:04               at processTicksAndRejections (node:internal/process/task_queues:105:5)
22:00:04               at duplex.sink (/home/aztec-dev/aztec-packages/yarn-project/node_modules/it-byte-stream/src/index.ts:86:22)
22:00:04     }
```

The test was also failing locally (it had passed before I submitted due
to a build issue I missed), and since it was tagged as flake it was
greenlighted by CI on the PR.
PhilWindle added a commit that referenced this pull request Sep 29, 2025
This PR is a backport of the following into V2.

#17169
#17176 
#17186 
#17178 
#17177
#17130
#17039 
#17230
#17245 
#17273
#17186
#17192
#17194 
#17225 
#17285 
#17312 
#17326

---------

Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: Santiago Palladino <spalladino@gmail.com>
Co-authored-by: alexghr <3816165+alexghr@users.noreply.github.com>
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.

2 participants