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

p2p restructure #2342

Merged
merged 4 commits into from
Jan 8, 2025
Merged

p2p restructure #2342

merged 4 commits into from
Jan 8, 2025

Conversation

AnkushinDaniil
Copy link
Contributor

@AnkushinDaniil AnkushinDaniil commented Dec 20, 2024

Structure change:

Renamed peers.go to codec.go

-p2p
-├── starknet
-│   ├── p2p
-│   │   └── proto
-│   │       ├── class.proto
-│   │       ├── common.proto
-│   │       ├── event.proto
-│   │       ├── header.proto
-│   │       ├── notes.md
-│   │       ├── receipt.proto
-│   │       ├── state.proto
-│   │       └── transaction.proto
-│   ├── spec
-│   │   ├── class.pb.go
-│   │   ├── common.pb.go
-│   │   ├── event.pb.go
-│   │   ├── header.pb.go
-│   │   ├── receipt.pb.go
-│   │   ├── state.pb.go
-│   │   └── transaction.pb.go
-│   ├── bytereader.go
-│   ├── bytereader_pkg_test.go
-│   ├── client.go
-│   ├── handlers.go
-│   ├── ids.go
-│   ├── iterator.go
-│   └── iterator_test.go
-├── gossip_tracer.go
-├── keypair.go
-├── p2p.go
-├── p2p_test.go
-├── peers.go
-└── sync.go

+p2p
+├── gen
+│   ├── class.pb.go
+│   ├── common.pb.go
+│   ├── event.pb.go
+│   ├── header.pb.go
+│   ├── receipt.pb.go
+│   ├── state.pb.go
+│   └── transaction.pb.go
+├── peers
+│   ├── handlers.go
+│   ├── iterator.go
+│   └── iterator_test.go
+├── spec
+│   ├── class.proto
+│   ├── common.proto
+│   ├── event.proto
+│   ├── header.proto
+│   ├── notes.md
+│   ├── receipt.proto
+│   ├── state.proto
+│   └── transaction.proto
+├── sync
+│   ├── bytereader.go
+│   ├── bytereader_pkg_test.go
+│   ├── client.go
+│   ├── ids.go
+│   └── sync.go
+├── gossip_tracer.go
+├── keypair.go
+├── p2p.go
+├── p2p_test.go
+└── codec.go

Protobuf generation

Changed from protoc to buf
Added generate-buf to Makefile

@AnkushinDaniil AnkushinDaniil added P2P go Pull requests that update Go code labels Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.61%. Comparing base (28e4512) to head (3b693ed).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2342      +/-   ##
==========================================
+ Coverage   74.59%   74.61%   +0.01%     
==========================================
  Files         110      110              
  Lines       11908    11908              
==========================================
+ Hits         8883     8885       +2     
+ Misses       2338     2336       -2     
  Partials      687      687              

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

@weiihann
Copy link
Contributor

weiihann commented Dec 23, 2024

Perhaps we should rename peers.go to something like common.go because it only contains address encoding/decoding. peers.go is slightly misleading because intuitively it should be part of p2p/peers.

@AnkushinDaniil
Copy link
Contributor Author

Perhaps we should rename peers.go to something like common.go because it only contains address encoding/decoding. peers.go is slightly misleading because intuitively it should be part of p2p/peers.

Rename peers.go to codec.go

@AnkushinDaniil AnkushinDaniil force-pushed the daniil/p2p-structure branch 2 times, most recently from 22f28ce to f354107 Compare December 27, 2024 00:57
Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

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

So much renaming 🫠. Could you make sure the PR works correctly with the latest version of main before merging?

@AnkushinDaniil AnkushinDaniil merged commit 2653ae9 into main Jan 8, 2025
13 checks passed
@AnkushinDaniil AnkushinDaniil deleted the daniil/p2p-structure branch January 8, 2025 04:40
@AnkushinDaniil AnkushinDaniil removed the request for review from kirugan January 8, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code P2P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants