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

CAD-3444 snocket changes from p2p-master #3369

Merged
merged 6 commits into from
Sep 20, 2021
Merged

CAD-3444 snocket changes from p2p-master #3369

merged 6 commits into from
Sep 20, 2021

Conversation

coot
Copy link
Contributor

@coot 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

coot and others added 6 commits September 20, 2021 15:12
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.
@coot coot requested a review from karknu as a code owner September 20, 2021 13:23
@coot coot added networking Snocket Issues / PRs related Snockets labels Sep 20, 2021
@coot coot requested a review from dcoutts September 20, 2021 13:23
@coot coot changed the title CAD-34444 snocket changes from p2p-master CAD-3444 snocket changes from p2p-master Sep 20, 2021
Copy link
Contributor

@karknu karknu left a 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.

@coot
Copy link
Contributor Author

coot commented Sep 20, 2021

The first one of these three fixes a snocket api issue: one does not need any more a local address when creating a Snocket, the second one make remote address unique, third is an unrelated change which does not fit either purpose. All in all I prefer to keep them separate.

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 20, 2021

@iohk-bors iohk-bors bot merged commit 29869a5 into master Sep 20, 2021
@iohk-bors iohk-bors bot deleted the coot/p2p-snocket branch September 20, 2021 22:01
nc6 added a commit to IntersectMBO/cardano-node that referenced this pull request Sep 28, 2021
- 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.
nc6 added a commit to IntersectMBO/cardano-node that referenced this pull request Sep 28, 2021
- 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.
nc6 added a commit to IntersectMBO/cardano-node that referenced this pull request Sep 28, 2021
- 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.
nc6 added a commit to IntersectMBO/cardano-node that referenced this pull request Sep 29, 2021
- 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.
iohk-bors bot added a commit to IntersectMBO/cardano-node that referenced this pull request Sep 30, 2021
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]>
iohk-bors bot added a commit to IntersectMBO/cardano-node that referenced this pull request Oct 1, 2021
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]>
newhoggy pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 3, 2021
- 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.
newhoggy pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 3, 2021
- 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.
nc6 added a commit to IntersectMBO/cardano-node that referenced this pull request Oct 4, 2021
- 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.
iohk-bors bot added a commit to IntersectMBO/cardano-node that referenced this pull request Oct 4, 2021
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]>
Copy link
Contributor Author

@coot coot left a comment

Choose a reason for hiding this comment

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

Some review changes.

@coot coot mentioned this pull request Oct 5, 2021
Jimbo4350 pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 6, 2021
- 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.
iohk-bors bot added a commit that referenced this pull request Oct 7, 2021
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]>
newhoggy pushed a commit to IntersectMBO/cardano-api that referenced this pull request May 23, 2023
- 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.
newhoggy pushed a commit to IntersectMBO/cardano-api that referenced this pull request May 23, 2023
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]>
newhoggy pushed a commit to IntersectMBO/cardano-cli that referenced this pull request May 24, 2023
- 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.
newhoggy pushed a commit to IntersectMBO/cardano-cli that referenced this pull request May 24, 2023
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Snocket Issues / PRs related Snockets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants