Commit 744150f
committed
feat: separate proto files into standalone crate
Extract protocol buffer definitions into a separate `snapchain-proto`
crate so consumers can import protos without depending on the entire
snapchain project.
Changes:
- Create `proto/` workspace member with its own Cargo.toml and build.rs
- Move proto definitions from `src/proto/` to `proto/definitions/`
- Move proto-only impls (Height, ShardHash, Message, etc.) to proto crate
- Add extension traits for methods requiring main crate types:
- CommitsExt for commit certificate conversion
- FullProposalExt for proposer address
- HubEventExt for event construction
- HubEventStorageExt for storage operations
- Update imports throughout codebase to use extension traits
- Rename HubEvent::from() to HubEvent::new_event() to avoid trait conflict1 parent dc71155 commit 744150f
File tree
40 files changed
+434
-309
lines changed- proto
- definitions
- src
- src
- consensus
- malachite
- core
- mempool
- network
- storage/store
- account
40 files changed
+434
-309
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| 14 | + | |
10 | 15 | | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
| |||
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | | - | |
102 | | - | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| 115 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments