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

Accelerator, part 1 (#1119)

This commit contains some parts of https://github.com/ton-blockchain/ton/tree/accelerator
This is auxiliary code that mostly does not change node behavior.

1) Semiprivate overlays and other improvements in overlays code
2) Rename actual_min_split -> monitor_min_split, fix building shard overlays
3) Loading block candidates by block id from DB, fix accept_block after validator restart
4) Cells: ProofStorageStat and changes in CellUsageTree
5) Remove some unused code, other minor changes
This commit is contained in:
SpyCheese 2024-08-23 11:46:40 +03:00 committed by GitHub
parent 9a10f79fba
commit 908415d00b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 2221 additions and 638 deletions

View file

@ -278,6 +278,38 @@ class Candidate {
FileHash collated_data_file_hash;
};
class CandidateRefShort {
public:
FileHash hash() const {
return hashv;
}
ShardIdFull shard() const {
return block_id.shard_full();
}
std::string filename_short() const;
BlockId block_id;
FileHash hashv;
};
class CandidateRef {
public:
tl_object_ptr<ton_api::db_filedb_Key> tl() const {
return create_tl_object<ton_api::db_filedb_key_candidateRef>(create_tl_block_id(block_id));
}
FileHash hash() const {
return create_hash_tl_object<ton_api::db_filedb_key_candidateRef>(create_tl_block_id(block_id));
}
ShardIdFull shard() const {
return block_id.shard_full();
}
CandidateRefShort shortref() const;
std::string filename() const;
std::string filename_short() const;
BlockIdExt block_id;
};
class BlockInfoShort {
public:
FileHash hash() const {
@ -316,7 +348,7 @@ class FileReferenceShort {
private:
td::Variant<fileref::Empty, fileref::BlockShort, fileref::ZeroStateShort, fileref::PersistentStateShort,
fileref::ProofShort, fileref::ProofShort, fileref::ProofLinkShort, fileref::SignaturesShort,
fileref::CandidateShort, fileref::BlockInfoShort>
fileref::CandidateShort, fileref::CandidateRefShort, fileref::BlockInfoShort>
ref_;
public:
@ -340,7 +372,8 @@ class FileReferenceShort {
class FileReference {
private:
td::Variant<fileref::Empty, fileref::Block, fileref::ZeroState, fileref::PersistentState, fileref::Proof,
fileref::Proof, fileref::ProofLink, fileref::Signatures, fileref::Candidate, fileref::BlockInfo>
fileref::Proof, fileref::ProofLink, fileref::Signatures, fileref::Candidate, fileref::CandidateRef,
fileref::BlockInfo>
ref_;
public: