-
Notifications
You must be signed in to change notification settings - Fork 86
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
CAD-3444 snocket changes from p2p-master #3369
Conversation
coot
commented
Sep 20, 2021
- Snocket.Accept
- Use a counter to provide a unique remote addr
- snockets - monadic toBearer
- snocket: support getLocalName for named pipes (Windows)
- snocket: store local and remote path
- snocket: make Window's LocalSocket strict
Rescue Alex Vieth's 'Accept' modification. I couldn't cherry-pick the commit since it was burried inside a merge commit. There's no proper way to fix `Ouroboros.Network.Soocket.fromSnocket`, but this is ok, as it will be removed in a later commit.
The inbound governor requires all clients to have a unique address. UNIX sockets and windows named pipes lack this so we use a counter to generate remote addresses for local clients.
Running monadic actions inside toBearer is useful when using file descriptors of a simulation environment.
On Windows there's no way of getting path of the named pipe. Unfortunatelly, `GetFinalNameByHandle` does not support named pipes. This patch alters Snocket interface which allows to store the path within 'LocalSnocket'. For Window's named pipes `getLocalAddr` and `getRemoteAddr` return the same path.
This will match the semantics of LocalSocket on other platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think that the last 3 commits could be turned into one commit.
The first one of these three fixes a snocket api issue: one does not need any more a local address when creating a bors merge |
Build succeeded: |
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
3258: Update dependencies. r=nc6 a=nc6 - cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix. Co-authored-by: Nicholas Clarke <[email protected]>
3258: Update dependencies. r=nc6 a=nc6 - cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix. Co-authored-by: Nicholas Clarke <[email protected]>
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
3258: Update dependencies. r=nc6 a=nc6 - cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix. Co-authored-by: Nicholas Clarke <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some review changes.
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
3408: P2P review of merged PRs r=coot a=coot * #3369 * #3370 - snocket: move bang patterns to the top of the recursive call - snocket: fixed some typos - snocket: remote path for local sockets - handshake: renamed MsgProposeVersions' as MsgReplyVersions - handshake: test that acceptOrRefuse is symmetric - handshake: fixed some typos - handshake: implement more properties - handshake: updated documentation 3414: [CAD-3383] Show progress of --store-ledger every 1000 blocks r=EncodePanda a=EncodePanda Co-authored-by: Marcin Szamotulski <[email protected]> Co-authored-by: EncodePanda <[email protected]>
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
3258: Update dependencies. r=nc6 a=nc6 - cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix. Co-authored-by: Nicholas Clarke <[email protected]>
- cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix.
3258: Update dependencies. r=nc6 a=nc6 - cardano-ledger-specs has been reorganised for sanity. (IntersectMBO/cardano-ledger#2483) This entails a number of refactorings: - The package 'shelley-spec-ledger' is now deprecated in favour of 'cardano-ledger-shelley'. - Shelley.Spec.NonIntegral -> Cardano.Ledger.NonIntegral - Shelley.Spec.Ledger -> Cardano.Ledger.Shelley - *.STS -> *.Rules - Test.Shelley.Spec.Ledger -> Test.Cardano.Ledger.Shelley - As per IntersectMBO/ouroboros-network#3369, there is now no 'FilePath' argument to 'localSnocket'. - Bump base to include a potential memory leak fix. Co-authored-by: Nicholas Clarke <[email protected]>