Skip to content
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

WIP: manager: Improve address handling and refactor PeerState #248

Closed
wants to merge 66 commits into from

Commits on Sep 17, 2024

  1. manager/address: Fix typo

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    22d6b48 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. manager/address: Store addresses using a HashMap

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    86e017f View commit details
    Browse the repository at this point in the history
  2. manager: Keep dial addresses around even if the peer is connected

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    8ec9e54 View commit details
    Browse the repository at this point in the history
  3. manager: Update dial failure address scores

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    83b9361 View commit details
    Browse the repository at this point in the history
  4. manager: Clean up the disconnected dial record on failure

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    b28a234 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. manager: Bump addresses to 64

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    68e3328 View commit details
    Browse the repository at this point in the history
  2. manager: Make add_known_address more robust to track multiple peer addrs

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    4ad526f View commit details
    Browse the repository at this point in the history
  3. manager: Construct the store with dialing address present

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    a924fa2 View commit details
    Browse the repository at this point in the history
  4. manager: Track dial failure addresses regardless of peer states

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    445ca74 View commit details
    Browse the repository at this point in the history
  5. manager: Update addresses only in dedicated function

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    7220f7a View commit details
    Browse the repository at this point in the history
  6. manager: Remove unneeded methods

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    f56e8c0 View commit details
    Browse the repository at this point in the history
  7. manager: Keep track of the latest connection ID

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    a0fb0c9 View commit details
    Browse the repository at this point in the history
  8. manager: Better constants for scoring

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    40e149b View commit details
    Browse the repository at this point in the history
  9. manager: Update addresses on connection established

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    7e15747 View commit details
    Browse the repository at this point in the history
  10. manager: Replace AddressRecord with DialRecord

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    9ce8a20 View commit details
    Browse the repository at this point in the history
  11. manager: Remove AddressRecord from the Opening state

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    47f97b5 View commit details
    Browse the repository at this point in the history
  12. manager: Remove assert

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    7f3147d View commit details
    Browse the repository at this point in the history
  13. manager: Rename DialRecord to ConnectionRecord

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    d6e2d4d View commit details
    Browse the repository at this point in the history
  14. manager/address: Remove connection ID from address store

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    1eda8a7 View commit details
    Browse the repository at this point in the history
  15. manager/types: Add wrappers for consturcting connection records

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    526244b View commit details
    Browse the repository at this point in the history
  16. manager/address: Implement eviction algorithm

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    dcac138 View commit details
    Browse the repository at this point in the history
  17. manager: Rename recrod to address record

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    fc35762 View commit details
    Browse the repository at this point in the history
  18. manager/handle: Keep WriteLock for a shorter time

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    250c289 View commit details
    Browse the repository at this point in the history
  19. manager/peer_state: Implement on_dial state advancing

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    6da7acf View commit details
    Browse the repository at this point in the history
  20. manager: Type safe state transition and trransports more modular

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    b26dbd1 View commit details
    Browse the repository at this point in the history
  21. manager/peer_state: Implement on_dial_failure state advancing

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    90e5b45 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. manager/peer_state: Merge secondary connection with PeerState

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    5cd7949 View commit details
    Browse the repository at this point in the history
  2. manager/peer_state: Handle connection closed transition

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    3804db4 View commit details
    Browse the repository at this point in the history
  3. manager/peer_state: Adjust connection established return

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6912dda View commit details
    Browse the repository at this point in the history
  4. manger: Use new peer state

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    900ff49 View commit details
    Browse the repository at this point in the history
  5. manager/tests: Adjust tests to compile

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    e206588 View commit details
    Browse the repository at this point in the history
  6. manager: Remove secondary connection from PeerContext

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    d6dec2c View commit details
    Browse the repository at this point in the history
  7. manager/addresses: Configure address capacity from tests

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    28aa178 View commit details
    Browse the repository at this point in the history
  8. manager/address: Move scores to the address from manager

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    4249410 View commit details
    Browse the repository at this point in the history
  9. manager/address: Evict entries with score below threshold

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    42adc4a View commit details
    Browse the repository at this point in the history
  10. manager/addresses/tests: Evict on capacity

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    91d1e90 View commit details
    Browse the repository at this point in the history
  11. manager/tests: Test no longer panics on invalid peerIDs

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    8248ba7 View commit details
    Browse the repository at this point in the history
  12. manager/tests: Persist dial addresses even if dial is not initiatied

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    a698a00 View commit details
    Browse the repository at this point in the history
  13. manager/tests: Check dial attempt populated address

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    a273531 View commit details
    Browse the repository at this point in the history
  14. manager/tests: Check track of addresses

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    354f40a View commit details
    Browse the repository at this point in the history
  15. manager: Keep connection record on secondary upgrades

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    1eea678 View commit details
    Browse the repository at this point in the history
  16. manager: Handle dial initiation result friendlier

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    b684142 View commit details
    Browse the repository at this point in the history
  17. manager: Simplify dial on single and multiaddresses

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    461eb65 View commit details
    Browse the repository at this point in the history
  18. manager/handle: Use state transitions

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    a1dfe2e View commit details
    Browse the repository at this point in the history
  19. manager/peer_state: Add documentation

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6d455d0 View commit details
    Browse the repository at this point in the history
  20. manager: Document possible race

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    808793c View commit details
    Browse the repository at this point in the history
  21. manager/peer_state: Ensure disconnects are reported properly

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    dc6073d View commit details
    Browse the repository at this point in the history
  22. transport/tests: Connections are reported properly now

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    0c36972 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. transport/manager: Move error to score to the address store

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    ecff792 View commit details
    Browse the repository at this point in the history
  2. transport/maanager: Update address score on open failure

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    8a95ba8 View commit details
    Browse the repository at this point in the history
  3. peer_state: Move open failure transitions to dedicated module

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    cd8ffb1 View commit details
    Browse the repository at this point in the history
  4. transport/manager: Move to dedicated module

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    bda30df View commit details
    Browse the repository at this point in the history
  5. peer_state/tests: Check can dial states

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    b2c51db View commit details
    Browse the repository at this point in the history
  6. peer_state/tests: Check disconnected -> dialing

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    a6d8684 View commit details
    Browse the repository at this point in the history
  7. peer_state/tests: Check Disconnected -> Opening

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    5959e4e View commit details
    Browse the repository at this point in the history
  8. peer_state/tests: Check on dial failure

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    6a613d8 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. peer_state/tests: Check connection established

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    966cd18 View commit details
    Browse the repository at this point in the history
  2. peer_state/tests: Check connection established for Dialing

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    6751581 View commit details
    Browse the repository at this point in the history
  3. peer_state/tests: Check connection closed

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    fc9a848 View commit details
    Browse the repository at this point in the history
  4. peer_state/tests: Check open failure state

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    fa03738 View commit details
    Browse the repository at this point in the history
  5. peer_state/tests: Check full lifecycle of a connection

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    dd3714f View commit details
    Browse the repository at this point in the history
  6. manager: Remove pending connection state after success

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    6050e96 View commit details
    Browse the repository at this point in the history
  7. peer_state: Handle connection opening

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    1555437 View commit details
    Browse the repository at this point in the history
  8. peer_state/tests: Check opening of connections

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    3c8058e View commit details
    Browse the repository at this point in the history
  9. manager: Better tracking of addresses for opening

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    de5354b View commit details
    Browse the repository at this point in the history
  10. peer_state: Return bool when dial failure was handled

    Signed-off-by: Alexandru Vasile <[email protected]>
    lexnv committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9869283 View commit details
    Browse the repository at this point in the history