Commit 8a0ccb7
Rebase ABCI Domain Types onto v0.34.20 branch.
There are two issues to fix:
* The original ABCI domain types work used `chrono`; this temporarily re-adds
`chrono` as a dependency, so that the changes that eliminated it can be
replayed on top of this rebasing.
* The original ABCI domain types work was, for some reason, mixed in with
changes to the RPC test harness for 0.35 compatibility, and that may break
this code. I didn't attempt to fix this, because I didn't touch the RPC tests
when writing the ABCI domain types.
Original concatenation of commit messages follows:
Add domain types (updated) and fix integration tests for Tendermint v0.35.0 (cometbft#1022)
* tendermint: add From<Infallible> for Error
* Use hex for AppHash Debug formatting
* Regenerate protobuf types using tools/proto-compiler.
* Regenerate protos against tendermint v0.35.0-rc3.
* Remove SetOption-related code in tendermint-abci.
* Update imports to reflect protobuf movements.
The BlockParams and ConsensusParams structs moved out of the ABCI
protos.
* Update tendermint-abci to reflect upstream proto changes.
* p2p: treat all non-Ed25519 keys as unsupported
This fixes a compile error introduced by upstream proto changes that add
an Sr25519 variant.
* Improve ABCI response code modeling with NonZeroU32
The previous data modeling allowed a user to construct an `Err(0)` value that
would be serialized and deserialized as `Ok`.
* Use the Bytes type in ABCI protos.
* Add conversions between protobuf and chrono types.
* tendermint: define Serde for Block in terms of RawBlock
This changes the Serialize/Deserialize implementations for Block to convert
to/from the proto-generated `RawBlock`, and use the derived serialization for
that type.
This is much cleaner and more maintainable than keeping Serde annotations for
each sub-member of the data structure, because all of the serialization code is
kept in one place, and there's only one validation path (the TryFrom conversion
from RawBlock to Block) that applies to both kinds of serialization.
* tendermint: simpler transaction modeling in Block
This changes the Block type to hold the transactions as a plain
`Vec<Vec<u8>>`, rather than as a custom `abci::transaction::Data` type
(which is itself a wrapper for an `Option<Vec<Transaction>>`, the
`Transaction` type being a wrapper for a `Vec<u8>`).
This also updates the `Block` getter functions; it's not clear (to me)
why they're there, since they access the public fields and aren't used
anywhere else.
* rpc: take over tendermint::abci
The existing contents of the `tendermint::abci` module note that they're
only for the purpose of implementing the RPC endpoints, not a general
ABCI implementation.
Moving that code from the `tendermint` crate to the `tendermint-rpc`
crate decouples the RPC interface from improvements to the ABCI domain
modeling. Eventually, it would be good to eliminate this code and align
it with the new ABCI domain types.
* tendermint: add ABCI domain types.
These types mirror the generated types in tendermint_proto, but have better
naming.
The documentation for each request type is adapted from the ABCI Methods and
Types spec document. However, the same logical request may appear three
times, as a struct with the request data, as a Request variant, and as a
CategoryRequest variant.
To avoid duplication, this PR uses the `#[doc = include_str!(...)]`
functionality stabilized in Rust 1.54 to keep common definitions of the
documentation.
* tendermint: eliminate &'static str errors in ABCI domain types.
* Merge `abci::params::ConsensusParams` with `consensus::Params`.
The code in the `abci` module had more complete documentation from the ABCI
docs, so I copied it onto the existing structure.
* Add hex encoding Serde attribute to Sr25519 keys.
* Replace integers with `block::Height`, `vote::Power`
* Replace integer with block::Round
* Fix tools build by using correct imports
Signed-off-by: Thane Thomson <[email protected]>
* Fix clippy complaints in tools
Signed-off-by: Thane Thomson <[email protected]>
* Fix clippy warning
Signed-off-by: Thane Thomson <[email protected]>
* Fix clippy lints
Signed-off-by: Thane Thomson <[email protected]>
* Fix more clippy lints
Signed-off-by: Thane Thomson <[email protected]>
* Fix deprecation notices from ed25519 crate
Signed-off-by: Thane Thomson <[email protected]>
* Regenerate protos for Tendermint v0.35.0
Signed-off-by: Thane Thomson <[email protected]>
* Fix raw bytes conversion in tests/docs
Signed-off-by: Thane Thomson <[email protected]>
* Add Tendermint v0.35.0 Docker config
Signed-off-by: Thane Thomson <[email protected]>
* Add Tendermint v0.35.0 Docker image for ABCI integration testing
Signed-off-by: Thane Thomson <[email protected]>
* Remove RPC deserialization tests
The support files for these tests were manually generated some time ago.
We should rather favour testing with the `kvstore_fixtures` tests, whose
fixtures are automatically generated by our rpc-probe tool.
Signed-off-by: Thane Thomson <[email protected]>
* Reformat Docker folder readme
Signed-off-by: Thane Thomson <[email protected]>
* Bump version of Tendermint used in ABCI integration test
Signed-off-by: Thane Thomson <[email protected]>
* Bump version of Tendermint used in rpc probe
Signed-off-by: Thane Thomson <[email protected]>
* Bump version of Tendermint used in kvstore integration test
Signed-off-by: Thane Thomson <[email protected]>
* Bump version of Tendermint used in proto-compiler
Signed-off-by: Thane Thomson <[email protected]>
* Regenerate kvstore fixtures with rpc-probe for Tendermint v0.35.0
Signed-off-by: Thane Thomson <[email protected]>
* Update kvstore integration test to accommodate newly generated fixtures
Signed-off-by: Thane Thomson <[email protected]>
* Update RPC tests and data structures to accommodate Tendermint v0.35.0 changes
Signed-off-by: Thane Thomson <[email protected]>
* Update ABCI encoding scheme to accommodate breaking change in tendermint/tendermint#5783
Signed-off-by: Thane Thomson <[email protected]>
* Bump Tendermint version in GitHub Actions kvstore integration test
Signed-off-by: Thane Thomson <[email protected]>
* Add changelog entries to capture breaking changes
Signed-off-by: Thane Thomson <[email protected]>
* Change tx hash encoding from base64 to hex and update tests
Signed-off-by: Thane Thomson <[email protected]>
* Add changelog entry for /tx endpoint change
Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Henry de Valence <[email protected]>
Co-authored-by: Henry de Valence <[email protected]>1 parent 9b9ed44 commit 8a0ccb7
File tree
218 files changed
+5103
-2626
lines changed- .changelog/unreleased/breaking-changes
- abci
- src
- application
- tests
- config/src
- light-client-verifier/src
- light-client/src
- proto
- src
- prost
- rpc
- src
- abci
- transaction
- client
- bin
- transport
- endpoint
- broadcast
- tests
- kvstore_fixtures
- incoming
- outgoing
- tendermint
- src
- abci
- doc
- request
- response
- block
- consensus
- tools
- abci-test
- src
- docker
- abci-harness-0.35.0
- tendermint-0.35.0
- kvstore-test/tests
- proto-compiler/src
- rpc-probe
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
218 files changed
+5103
-2626
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
| |||
123 | 117 | | |
124 | 118 | | |
125 | 119 | | |
126 | | - | |
127 | 120 | | |
128 | 121 | | |
129 | 122 | | |
| |||
141 | 134 | | |
142 | 135 | | |
143 | 136 | | |
| 137 | + | |
144 | 138 | | |
145 | 139 | | |
146 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
| 210 | + | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
| 215 | + | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
0 commit comments