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

Ensure p2p protocol matches new Starknet spec #2291

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wojciechos
Copy link
Contributor

@wojciechos wojciechos commented Nov 28, 2024

Changes

  • Updated protocol paths to include chain_ID and /sync segment
  • All protocol paths now follow the format: /starknet/<chain_id>/sync/...
  • Added tests to verify protocol paths

Protocol Path Changes:

Before:

  • /starknet/headers/0.1.0-rc.0
  • /starknet/events/0.1.0-rc.0

After:

  • /starknet/SN_MAIN/sync/headers/0.1.0-rc.0
  • /starknet/SN_SEPOLIA/sync/events/0.1.0-rc.0

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.43%. Comparing base (ec24744) to head (586824e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2291      +/-   ##
==========================================
+ Coverage   75.32%   75.43%   +0.11%     
==========================================
  Files         107      107              
  Lines       11406    11406              
==========================================
+ Hits         8591     8604      +13     
+ Misses       2158     2149       -9     
+ Partials      657      653       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wojciechos wojciechos force-pushed the wojciechos/p2p-protocol-name branch 4 times, most recently from ee1b5ee to ff56ae3 Compare November 29, 2024 08:07
@kirugan kirugan force-pushed the wojciechos/p2p-protocol-name branch from ff56ae3 to 586824e Compare December 3, 2024 12:46
@wojciechos wojciechos force-pushed the wojciechos/p2p-protocol-name branch from 586824e to ff3cdc2 Compare December 12, 2024 09:10
@wojciechos wojciechos changed the title Ensure DHT protocol ID matches Starknet spec Ensure p2p protocol matches new Starknet spec Dec 12, 2024
@wojciechos wojciechos marked this pull request as draft December 12, 2024 09:22
@wojciechos wojciechos force-pushed the wojciechos/p2p-protocol-name branch 3 times, most recently from 426e56d to df1ed30 Compare December 12, 2024 10:29
@wojciechos wojciechos force-pushed the wojciechos/p2p-protocol-name branch 7 times, most recently from 629f346 to cf17942 Compare December 13, 2024 17:04
Use dht.ProtocolExtension to set chainID in  protocol ID format for DHT.
Add test to verify protocol ID format for different networks:
- /starknet/SN_SEPOLIA/kad/1.0.0 for Sepolia
- /starknet/SN_MAIN/kad/1.0.0 for Mainnet

The change ensures that DHT protocol follow latest Starknet
specification.
@wojciechos wojciechos force-pushed the wojciechos/p2p-protocol-name branch from cf17942 to 02d963d Compare December 13, 2024 17:11
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