1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

liteclient signature check support

1. update liteclient/liteserver. Now liteserver sends signatures of
blocks and liteclient checks them. I.e. liteclient completely checks
received data.
2. validator-engine: more GC options
3. blockchain-explorer: show all block transactions (instead of 256)
4. some bugfixes
This commit is contained in:
ton 2019-09-14 18:14:55 +04:00
parent d8244eff53
commit 9d6853ef24
58 changed files with 1480 additions and 325 deletions

View file

@ -18,11 +18,13 @@
*/
#pragma once
#include "vm/cells/Cell.h"
#include "td/utils/buffer.h"
#include <utility>
#include <functional>
namespace vm {
class MerkleProof {
public:
using IsPrunnedFunction = std::function<bool(const Ref<Cell> &)>;
@ -43,4 +45,21 @@ class MerkleProof {
static Ref<Cell> generate_raw(Ref<Cell> cell, CellUsageTree *usage_tree);
static Ref<Cell> virtualize_raw(Ref<Cell> cell, Cell::VirtualizationParameters virt);
};
class MerkleProofBuilder {
std::shared_ptr<CellUsageTree> usage_tree;
Ref<vm::Cell> orig_root, usage_root;
public:
MerkleProofBuilder(Ref<Cell> root);
void reset(Ref<Cell> root);
void clear();
Ref<Cell> root() const {
return usage_root;
}
Ref<Cell> extract_proof() const;
bool extract_proof_to(Ref<Cell> &proof_root) const;
td::Result<td::BufferSlice> extract_proof_boc() const;
};
} // namespace vm