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

perf(comms)!: optimise connection establishment #3658

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Dec 14, 2021

Description

Optimise connection establishment:

  • perform identity protocol before yamux upgrade
  • identity protocol uses socket rather than yamux
  • trim down bytes sent for identity protocol

Additional: remove tokio-tungstonite dependency from base node (part of warp default-features for websockets)

Motivation and Context

By performing identity protocol before yamux upgrade, we can send the identity message without incurring the header cost of yamux and also avoids having to close a substream after identities are exchanged. It is important that the identity protocol is as trim as possible, so a manual framing implementation is used rather than the tokio length-delimited framing codec.

This is a network breaking change, nodes upgraded to this will not be able to communicate with older nodes and vice-versa.

How Has This Been Tested?

Existing tests pass, manually between two upgraded nodes

@stringhandler stringhandler merged commit aeeefbb into tari-project:development Jan 3, 2022
@sdbondi sdbondi deleted the comms-switch-identity-and-yamux-upgrade branch January 3, 2022 13:12
sdbondi added a commit to sdbondi/tari that referenced this pull request Jan 5, 2022
* development:
  fix: allow 0-conf in blockchain db (tari-project#3680)
  test: fix cucumber WalletQuery.feature (tari-project#3677)
  test: fix `wait for` step (tari-project#3673)
  perf(comms)!: optimise connection establishment (tari-project#3658)
  fix: remove noise negotiation for debugging on bad wire mode (tari-project#3657)
  feat: add follow on checkpoint (tari-project#3676)
  ci: fix tari collectibles build (tari-project#3670)
  feat: example to generate vanity node_ids (tari-project#3654)
  fix: prefer configured seeds over dns seeds (tari-project#3662)
  docs: update RFC-0230_HTLC to use TariScript (tari-project#3622)
  feat: add invoke write method to proxy (tari-project#3667)
  ci: add tauri build (tari-project#3669)
  test: fix cucumber metadata signature (tari-project#3665)
  feat: add asset proxy (tari-project#3659)
  test: fix cucumber (tari-project#3660)
sdbondi added a commit to sdbondi/tari that referenced this pull request Jan 5, 2022
* development:
  fix: allow 0-conf in blockchain db (tari-project#3680)
  test: fix cucumber WalletQuery.feature (tari-project#3677)
  test: fix `wait for` step (tari-project#3673)
  perf(comms)!: optimise connection establishment (tari-project#3658)
  fix: remove noise negotiation for debugging on bad wire mode (tari-project#3657)
  feat: add follow on checkpoint (tari-project#3676)
  ci: fix tari collectibles build (tari-project#3670)
  feat: example to generate vanity node_ids (tari-project#3654)
  fix: prefer configured seeds over dns seeds (tari-project#3662)
  docs: update RFC-0230_HTLC to use TariScript (tari-project#3622)
  feat: add invoke write method to proxy (tari-project#3667)
  ci: add tauri build (tari-project#3669)
  test: fix cucumber metadata signature (tari-project#3665)
  feat: add asset proxy (tari-project#3659)
  test: fix cucumber (tari-project#3660)
sdbondi added a commit to sdbondi/tari that referenced this pull request Jan 11, 2022
* development: (28 commits)
  feat: covenants implementation (tari-project#3656)
  ci: add tor script to binaries bundle (tari-project#3689)
  chore: remove testnet reset todo in wallet (tari-project#3685)
  feat: dibbler new genesis block with faucet utxos (tari-project#3688)
  ci: fix clippy warning on generated proto module (tari-project#3690)
  test: fix metadata signature cucumber (tari-project#3687)
  refactor!: clean up #testnet reset TODOs (tari-project#3682)
  feat(comms)!: add signature to peer identity to allow third party identity updates (tari-project#3629)
  chore: remove moving lock.mdb (tari-project#3674)
  chore: merge weatherwax
  feat!: provide a compact form of TransactionInput (tari-project#3460)
  fix: allow 0-conf in blockchain db (tari-project#3680)
  v0.22.1.1
  v0.22.1
  ci: add build step (tari-project#3678)
  test: fix cucumber WalletQuery.feature (tari-project#3677)
  test: fix `wait for` step (tari-project#3673)
  fix: edge cases causing bans during header/block sync (tari-project#3661)
  perf(comms)!: optimise connection establishment (tari-project#3658)
  fix: end stale outbound queue immediately on disconnect, retry outbound messages (tari-project#3664)
  ...
@sdbondi sdbondi restored the comms-switch-identity-and-yamux-upgrade branch February 3, 2022 05:33
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