1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Communication boundary between server and client.
//!
//! The [`TreeSyncApi`] trait defines the contract for fetching tree data.
//! In the POC: in-process trait object.
//! In production: maps to Cosmos SDK gRPC/REST endpoints.
use Fp;
use crateMerkleHashVote;
// ---------------------------------------------------------------------------
// Types
// ---------------------------------------------------------------------------
/// Response from `get_block_commitments`: leaves appended in a single block.
/// Current state of the server tree.
// ---------------------------------------------------------------------------
// TreeSyncApi trait
// ---------------------------------------------------------------------------
/// The contract between server and client.
///
/// In the POC: in-process (server implements this directly).
/// In production: maps to Cosmos SDK gRPC/REST endpoints:
/// - `get_block_commitments` → custom compact-block endpoint or Tendermint block queries
/// - `get_root_at_height` → `GET /zally/v1/commitment-tree/{height}`
/// - `get_tree_state` → `GET /zally/v1/commitment-tree/latest`