Compare Sapling and Orchard commitment-tree checkpoints
Two light-client backends can agree on the block height while differing on the commitment tree they have serialized. Anchor both queries to one exact Zcash block.
Read pool-specific roots
Use a hash from a block at which the pools under examination are active. Query each backend with that same hash, retain the returned block identity and compare roots within each named pool.
zcash-cli z_gettreestate "$BLOCK_HASH" | jq '{height, hash, sapling: .sapling.commitments.finalRoot, orchard: .orchard.commitments.finalRoot}'
Diagnose encoding before declaring divergence
A Sapling root cannot be compared with an Orchard root. Check for missing commitment information and a reported skipHash before comparing fields. Older zcashd releases through 5.2.0 had a documented byte-order difference for the Sapling root relative to getrawtransaction; account for producer version when auditing legacy exports.