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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

p2p restructure #2342

wants to merge 4 commits into from

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.44%. Comparing base (4b9d3c2) to head (f354107).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2342      +/-   ##
==========================================
- Coverage   74.48%   74.44%   -0.05%     
==========================================
  Files         110      110              
  Lines       11771    11771              
==========================================
- Hits         8768     8763       -5     
- Misses       2324     2328       +4     
- Partials      679      680       +1     

☔ 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

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.

2 participants