Skip to content

expected_responses remains after challenge has been completed #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

ackintosh
Copy link
Member

@ackintosh ackintosh commented Aug 12, 2023

Description

sequenceDiagram
    participant Node1
    participant Node2
    Node1 ->> Node2: Random packet
    Note over Node2: send_challenge()<br> expected_response: 1

    Node2 -->> Node1: WHOAREYOU
    Node1 ->> Node2: Handshake Message(FINDNODE)
    Node2 -->> Node1: NODES

    rect rgb(100, 0, 0)
    Note over Node2: expected_response remains 1
    end
Loading

Notes & open questions

I've enhanced multiple_messages test:

  • replaced Handler::spawn() with build_handler() and Handler::start()
  • added assertions to test handler's states

Change checklist

  • Self-review
  • Documentation updates if relevant
  • Tests if relevant

@ackintosh ackintosh changed the title WIP: expected_responses remains after challenge has been completed expected_responses remains after challenge has been completed Aug 13, 2023
@ackintosh ackintosh marked this pull request as ready for review August 13, 2023 06:17
@ackintosh
Copy link
Member Author

@AgeManning @divagant-martian ping for review.

Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

Yep, nice find. Thanks

@AgeManning AgeManning merged commit d2e30e0 into sigp:master Aug 21, 2023
@ackintosh ackintosh deleted the handler-state branch August 21, 2023 08:35
AgeManning added a commit that referenced this pull request Feb 21, 2024
* Version bump to v0.3.1 (#203)

* fix docs (#204)

* refactor for removing `Discv5` prefix (#206)

* goodbye prefix

* adjust docs

* fix rpc decoding to reject extra data (#208)

* reject extra data

* reduce diff

* expected_responses remains after challenge has been completed (#210)

* Replace `Handler::spawn` with `build_handler()` and `Handler::start()`

* Test the handler's states after the handler has been terminated

* Remove expected response on handle_auth_message()

* Rename variables for readability

* Expose local ENR Arc (#214)

* Use zero ports in tests (#216)

* update dependencies (#219)

* Changing port of ReponseBody::Pong to NonZeroU16 (#220)

* Change `port` from u16 to NonZeroU16

* Fix tests

* Fix test: the PONG port can't be zero

* Fix clippy warnings

* Update 'enr' dependency (#223)

* Add support for concurrent requests to a single peer. (#200)

Co-authored-by: ackintosh <[email protected]>
Co-authored-by: Diva M <[email protected]>
Co-authored-by: Age Manning <[email protected]>

* Adjust some logs (#225)

* remove log for timed out query. This is always informed in the callback

* expand common logs, unify info on startup

* adjust auth header log

* Update src/service.rs

* Appease clippy

* Realised I was wrong. Don't need this log, my bad

* fmt

---------

Co-authored-by: Age Manning <[email protected]>

* Version bump to v0.4.0

* make tracing-subscriber a dev dep (#226)

* Fix warnings and bump libp2p (#232)

* Update session_cache_capacity from usize to NonZeroUsize

since the argument of LruCache::new is NonZeroUsize.

* Fix rustdoc

* cargo fmt

* Fix a merging mistake: lost validation in Message::decode

---------

Co-authored-by: Age Manning <[email protected]>
Co-authored-by: Divma <[email protected]>
Co-authored-by: Jack McPherson <[email protected]>
Co-authored-by: João Oliveira <[email protected]>
Co-authored-by: Milos Stankovic <[email protected]>
Co-authored-by: Nick Gheorghita <[email protected]>
Co-authored-by: Diva M <[email protected]>
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