mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into block-generation
This commit is contained in:
commit
d082ac36b0
261 changed files with 24449 additions and 1791 deletions
|
@ -44,6 +44,7 @@ liteServer.transactionList ids:(vector tonNode.blockIdExt) transactions:bytes =
|
|||
liteServer.transactionId mode:# account:mode.0?int256 lt:mode.1?long hash:mode.2?int256 = liteServer.TransactionId;
|
||||
liteServer.transactionId3 account:int256 lt:long = liteServer.TransactionId3;
|
||||
liteServer.blockTransactions id:tonNode.blockIdExt req_count:# incomplete:Bool ids:(vector liteServer.transactionId) proof:bytes = liteServer.BlockTransactions;
|
||||
liteServer.blockTransactionsExt id:tonNode.blockIdExt req_count:# incomplete:Bool transactions:bytes proof:bytes = liteServer.BlockTransactionsExt;
|
||||
liteServer.signature node_id_short:int256 signature:bytes = liteServer.Signature;
|
||||
liteServer.signatureSet validator_set_hash:int catchain_seqno:int signatures:(vector liteServer.signature) = liteServer.SignatureSet;
|
||||
liteServer.blockLinkBack to_key_block:Bool from:tonNode.blockIdExt to:tonNode.blockIdExt dest_proof:bytes proof:bytes state_proof:bytes = liteServer.BlockLink;
|
||||
|
@ -76,6 +77,7 @@ liteServer.getOneTransaction id:tonNode.blockIdExt account:liteServer.accountId
|
|||
liteServer.getTransactions count:# account:liteServer.accountId lt:long hash:int256 = liteServer.TransactionList;
|
||||
liteServer.lookupBlock mode:# id:tonNode.blockId lt:mode.1?long utime:mode.2?int = liteServer.BlockHeader;
|
||||
liteServer.listBlockTransactions id:tonNode.blockIdExt mode:# count:# after:mode.7?liteServer.transactionId3 reverse_order:mode.6?true want_proof:mode.5?true = liteServer.BlockTransactions;
|
||||
liteServer.listBlockTransactionsExt id:tonNode.blockIdExt mode:# count:# after:mode.7?liteServer.transactionId3 reverse_order:mode.6?true want_proof:mode.5?true = liteServer.BlockTransactionsExt;
|
||||
liteServer.getBlockProof mode:# known_block:tonNode.blockIdExt target_block:mode.0?tonNode.blockIdExt = liteServer.PartialBlockProof;
|
||||
liteServer.getConfigAll mode:# id:tonNode.blockIdExt = liteServer.ConfigInfo;
|
||||
liteServer.getConfigParams mode:# id:tonNode.blockIdExt param_list:(vector int) = liteServer.ConfigInfo;
|
||||
|
|
Binary file not shown.
|
@ -606,12 +606,14 @@ engine.gc ids:(vector int256) = engine.Gc;
|
|||
engine.dht.config dht:(vector engine.dht) gc:engine.gc = engine.dht.Config;
|
||||
engine.validator.fullNodeMaster port:int adnl:int256 = engine.validator.FullNodeMaster;
|
||||
engine.validator.fullNodeSlave ip:int port:int adnl:PublicKey = engine.validator.FullNodeSlave;
|
||||
engine.validator.fullNodeConfig ext_messages_broadcast_disabled:Bool = engine.validator.FullNodeConfig;
|
||||
|
||||
engine.validator.config out_port:int addrs:(vector engine.Addr) adnl:(vector engine.adnl)
|
||||
dht:(vector engine.dht)
|
||||
validators:(vector engine.validator) collators:(vector engine.collator)
|
||||
fullnode:int256 fullnodeslaves:(vector engine.validator.fullNodeSlave)
|
||||
fullnodemasters:(vector engine.validator.fullNodeMaster)
|
||||
fullnodeconfig:engine.validator.fullNodeConfig
|
||||
liteservers:(vector engine.liteServer) control:(vector engine.controlInterface)
|
||||
shards_to_monitor:(vector tonNode.shardId)
|
||||
gc:engine.gc = engine.validator.Config;
|
||||
|
@ -663,6 +665,8 @@ engine.validator.onePerfTimerStat time:int min:double avg:double max:double = en
|
|||
engine.validator.perfTimerStatsByName name:string stats:(vector engine.validator.OnePerfTimerStat) = engine.validator.PerfTimerStatsByName;
|
||||
engine.validator.perfTimerStats stats:(vector engine.validator.PerfTimerStatsByName) = engine.validator.PerfTimerStats;
|
||||
|
||||
engine.validator.shardOutQueueSize size:int = engine.validator.ShardOutQueueSize;
|
||||
|
||||
engine.validator.validatorSessionInfo current_block:tonNode.blockId self:int256 current_round:int next_producers:(vector int256) = engine.validator.ValidatorSessionInfo;
|
||||
engine.validator.validatorSessionsInfo sessions:(vector engine.validator.validatorSessionInfo) = engine.validator.ValidatorSessionsInfo;
|
||||
|
||||
|
@ -718,6 +722,8 @@ engine.validator.signShardOverlayCertificate workchain:int shard:long signed_key
|
|||
engine.validator.importShardOverlayCertificate workchain:int shard:long signed_key:engine.validator.KeyHash cert:overlay.Certificate = engine.validator.Success;
|
||||
|
||||
engine.validator.getPerfTimerStats name:string = engine.validator.PerfTimerStats;
|
||||
engine.validator.getShardOutQueueSize flags:# block_id:tonNode.blockId dest_wc:flags.0?int dest_shard:flags.0?long = engine.validator.ShardOutQueueSize;
|
||||
engine.validator.setExtMessagesBroadcastDisabled disabled:Bool = engine.validator.Success;
|
||||
|
||||
engine.validator.getValidatorSessionsInfo = engine.validator.ValidatorSessionsInfo;
|
||||
|
||||
|
@ -752,11 +758,13 @@ storage.getPiece piece_id:int = storage.Piece;
|
|||
http.header name:string value:string = http.Header;
|
||||
http.payloadPart data:bytes trailer:(vector http.header) last:Bool = http.PayloadPart;
|
||||
http.response http_version:string status_code:int reason:string headers:(vector http.header) no_payload:Bool = http.Response;
|
||||
http.proxy.capabilities capabilities:long = http.proxy.Capabilities;
|
||||
|
||||
---functions---
|
||||
|
||||
http.request id:int256 method:string url:string http_version:string headers:(vector http.header) = http.Response;
|
||||
http.getNextPayloadPart id:int256 seqno:int max_chunk_size:int = http.PayloadPart;
|
||||
http.proxy.getCapabilities capabilities:long = http.proxy.Capabilities;
|
||||
|
||||
---types---
|
||||
|
||||
|
|
Binary file not shown.
|
@ -52,7 +52,7 @@ ton.blockIdExt workchain:int32 shard:int64 seqno:int32 root_hash:bytes file_hash
|
|||
|
||||
raw.fullAccountState balance:int64 code:bytes data:bytes last_transaction_id:internal.transactionId block_id:ton.blockIdExt frozen_hash:bytes sync_utime:int53 = raw.FullAccountState;
|
||||
raw.message source:accountAddress destination:accountAddress value:int64 fwd_fee:int64 ihr_fee:int64 created_lt:int64 body_hash:bytes msg_data:msg.Data = raw.Message;
|
||||
raw.transaction utime:int53 data:bytes transaction_id:internal.transactionId fee:int64 storage_fee:int64 other_fee:int64 in_msg:raw.message out_msgs:vector<raw.message> = raw.Transaction;
|
||||
raw.transaction address:accountAddress utime:int53 data:bytes transaction_id:internal.transactionId fee:int64 storage_fee:int64 other_fee:int64 in_msg:raw.message out_msgs:vector<raw.message> = raw.Transaction;
|
||||
raw.transactions transactions:vector<raw.transaction> previous_transaction_id:internal.transactionId = raw.Transactions;
|
||||
|
||||
raw.extMessageInfo hash:bytes = raw.ExtMessageInfo;
|
||||
|
@ -215,6 +215,7 @@ blocks.shards shards:vector<ton.BlockIdExt> = blocks.Shards;
|
|||
blocks.accountTransactionId account:bytes lt:int64 = blocks.AccountTransactionId;
|
||||
blocks.shortTxId mode:# account:mode.0?bytes lt:mode.1?int64 hash:mode.2?bytes = liteServer.TransactionId;
|
||||
blocks.transactions id:ton.blockIdExt req_count:int32 incomplete:Bool transactions:vector<blocks.shortTxId> = blocks.Transactions;
|
||||
blocks.transactionsExt id:ton.blockIdExt req_count:int32 incomplete:Bool transactions:vector<raw.transaction> = blocks.TransactionsExt;
|
||||
blocks.header id:ton.blockIdExt global_id:int32 version:int32 flags:# after_merge:Bool after_split:Bool before_split:Bool want_merge:Bool want_split:Bool validator_list_hash_short:int32 catchain_seqno:int32 min_ref_mc_seqno:int32 is_key_block:Bool prev_key_block_seqno:int32 start_lt:int64 end_lt:int64 gen_utime:int53 vert_seqno:# prev_blocks:vector<ton.blockIdExt> = blocks.Header;
|
||||
//blocks.shortData header:blocks.Header transactions:blocks.Header = blocks.BlockData;
|
||||
|
||||
|
@ -257,6 +258,7 @@ getBip39Hints prefix:string = Bip39Hints;
|
|||
|
||||
//raw.init initial_account_state:raw.initialAccountState = Ok;
|
||||
raw.getAccountState account_address:accountAddress = raw.FullAccountState;
|
||||
raw.getAccountStateByTransaction account_address:accountAddress transaction_id:internal.transactionId = raw.FullAccountState;
|
||||
raw.getTransactions private_key:InputKey account_address:accountAddress from_transaction_id:internal.transactionId = raw.Transactions;
|
||||
raw.getTransactionsV2 private_key:InputKey account_address:accountAddress from_transaction_id:internal.transactionId count:# try_decode_messages:Bool = raw.Transactions;
|
||||
raw.sendMessage body:bytes = Ok;
|
||||
|
@ -278,9 +280,13 @@ guessAccountRevision initial_account_state:InitialAccountState workchain_id:int3
|
|||
guessAccount public_key:string rwallet_init_public_key:string = AccountRevisionList;
|
||||
|
||||
getAccountState account_address:accountAddress = FullAccountState;
|
||||
getAccountStateByTransaction account_address:accountAddress transaction_id:internal.transactionId = FullAccountState;
|
||||
getShardAccountCell account_address:accountAddress = tvm.Cell;
|
||||
getShardAccountCellByTransaction account_address:accountAddress transaction_id:internal.transactionId = tvm.Cell;
|
||||
createQuery private_key:InputKey address:accountAddress timeout:int32 action:Action initial_account_state:InitialAccountState = query.Info;
|
||||
|
||||
getConfigParam mode:# id:ton.blockIdExt param:# = ConfigInfo;
|
||||
getConfigParam mode:# param:# = ConfigInfo;
|
||||
getConfigAll mode:# = ConfigInfo;
|
||||
|
||||
msg.decrypt input_key:InputKey data:msg.dataEncryptedArray = msg.DataDecryptedArray;
|
||||
msg.decryptWithProof proof:bytes data:msg.dataEncrypted = msg.Data;
|
||||
|
@ -292,6 +298,7 @@ query.estimateFees id:int53 ignore_chksig:Bool = query.Fees;
|
|||
query.getInfo id:int53 = query.Info;
|
||||
|
||||
smc.load account_address:accountAddress = smc.Info;
|
||||
smc.loadByTransaction account_address:accountAddress transaction_id:internal.transactionId = smc.Info;
|
||||
smc.forget id:int53 = Ok;
|
||||
smc.getCode id:int53 = tvm.Cell;
|
||||
smc.getData id:int53 = tvm.Cell;
|
||||
|
@ -313,6 +320,7 @@ blocks.getMasterchainInfo = blocks.MasterchainInfo;
|
|||
blocks.getShards id:ton.blockIdExt = blocks.Shards;
|
||||
blocks.lookupBlock mode:int32 id:ton.blockId lt:int64 utime:int32 = ton.BlockIdExt;
|
||||
blocks.getTransactions id:ton.blockIdExt mode:# count:# after:blocks.accountTransactionId = blocks.Transactions;
|
||||
blocks.getTransactionsExt id:ton.blockIdExt mode:# count:# after:blocks.accountTransactionId = blocks.TransactionsExt;
|
||||
blocks.getBlockHeader id:ton.blockIdExt = blocks.Header;
|
||||
blocks.getMasterchainBlockSignatures seqno:int32 = blocks.BlockSignatures;
|
||||
blocks.getShardBlockProof id:ton.blockIdExt mode:# from:mode.0?ton.blockIdExt = blocks.ShardBlockProof;
|
||||
|
|
Binary file not shown.
|
@ -27,13 +27,14 @@ bool TD_TL_writer_hpp::is_documentation_generated() const {
|
|||
}
|
||||
|
||||
int TD_TL_writer_hpp::get_additional_function_type(const std::string &additional_function_name) const {
|
||||
assert(additional_function_name == "downcast_call");
|
||||
assert(additional_function_name == "downcast_call" || additional_function_name == "downcast_construct");
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::vector<std::string> TD_TL_writer_hpp::get_additional_functions() const {
|
||||
std::vector<std::string> additional_functions;
|
||||
additional_functions.push_back("downcast_call");
|
||||
additional_functions.push_back("downcast_construct");
|
||||
return additional_functions;
|
||||
}
|
||||
|
||||
|
@ -194,7 +195,7 @@ std::string TD_TL_writer_hpp::gen_fetch_switch_end() const {
|
|||
|
||||
std::string TD_TL_writer_hpp::gen_additional_function(const std::string &function_name, const tl::tl_combinator *t,
|
||||
bool is_function) const {
|
||||
assert(function_name == "downcast_call");
|
||||
assert(function_name == "downcast_call" || function_name == "downcast_construct");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -202,24 +203,40 @@ std::string TD_TL_writer_hpp::gen_additional_proxy_function_begin(const std::str
|
|||
const tl::tl_type *type,
|
||||
const std::string &class_name, int arity,
|
||||
bool is_function) const {
|
||||
assert(function_name == "downcast_call");
|
||||
return "/**\n"
|
||||
" * Calls specified function object with the specified object downcasted to the most-derived type.\n"
|
||||
" * \\param[in] obj Object to pass as an argument to the function object.\n"
|
||||
" * \\param[in] func Function object to which the object will be passed.\n"
|
||||
" * \\returns whether function object call has happened. Should always return true for correct parameters.\n"
|
||||
" */\n"
|
||||
"template <class T>\n"
|
||||
"bool downcast_call(" +
|
||||
class_name +
|
||||
" &obj, const T &func) {\n"
|
||||
" switch (obj.get_id()) {\n";
|
||||
if (function_name == "downcast_call") {
|
||||
return "/**\n"
|
||||
" * Calls specified function object with the specified object downcasted to the most-derived type.\n"
|
||||
" * \\param[in] obj Object to pass as an argument to the function object.\n"
|
||||
" * \\param[in] func Function object to which the object will be passed.\n"
|
||||
" * \\returns whether function object call has happened. Should always return true for correct parameters.\n"
|
||||
" */\n"
|
||||
"template <class T>\n"
|
||||
"bool downcast_call(" +
|
||||
class_name +
|
||||
" &obj, const T &func) {\n"
|
||||
" switch (obj.get_id()) {\n";
|
||||
}
|
||||
if (function_name == "downcast_construct") {
|
||||
return "/**\n"
|
||||
"* Constructs tl_object_ptr with the object of the same type as the specified object, calls the specified "
|
||||
"function.\n"
|
||||
" * \\param[in] obj Object to get the type from.\n"
|
||||
" * \\param[in] func Function object to which the new object will be passed.\n"
|
||||
" * \\returns whether function object call has happened. Should always return true for correct parameters.\n"
|
||||
"*/"
|
||||
"template <class T>\n"
|
||||
"bool downcast_construct(" +
|
||||
class_name +
|
||||
" &obj, const T &func) {\n"
|
||||
"switch (obj.get_id()) {";
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
std::string TD_TL_writer_hpp::gen_additional_proxy_function_case(const std::string &function_name,
|
||||
const tl::tl_type *type, const std::string &class_name,
|
||||
int arity) const {
|
||||
assert(function_name == "downcast_call");
|
||||
//assert(function_name == "downcast_call");
|
||||
assert(false);
|
||||
return "";
|
||||
}
|
||||
|
@ -227,18 +244,28 @@ std::string TD_TL_writer_hpp::gen_additional_proxy_function_case(const std::stri
|
|||
std::string TD_TL_writer_hpp::gen_additional_proxy_function_case(const std::string &function_name,
|
||||
const tl::tl_type *type, const tl::tl_combinator *t,
|
||||
int arity, bool is_function) const {
|
||||
assert(function_name == "downcast_call");
|
||||
return " case " + gen_class_name(t->name) +
|
||||
"::ID:\n"
|
||||
" func(static_cast<" +
|
||||
gen_class_name(t->name) +
|
||||
" &>(obj));\n"
|
||||
" return true;\n";
|
||||
if (function_name == "downcast_call") {
|
||||
return " case " + gen_class_name(t->name) +
|
||||
"::ID:\n"
|
||||
" func(static_cast<" +
|
||||
gen_class_name(t->name) +
|
||||
" &>(obj));\n"
|
||||
" return true;\n";
|
||||
}
|
||||
if (function_name == "downcast_construct") {
|
||||
return " case " + gen_class_name(t->name) +
|
||||
"::ID:\n"
|
||||
" func(create_tl_object<" +
|
||||
gen_class_name(t->name) +
|
||||
">());\n"
|
||||
" return true;\n";
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
std::string TD_TL_writer_hpp::gen_additional_proxy_function_end(const std::string &function_name,
|
||||
const tl::tl_type *type, bool is_function) const {
|
||||
assert(function_name == "downcast_call");
|
||||
assert(function_name == "downcast_call" || function_name == "downcast_construct");
|
||||
return " default:\n"
|
||||
" return false;\n"
|
||||
" }\n"
|
||||
|
|
|
@ -277,8 +277,7 @@ std::enable_if_t<!std::is_constructible<T>::value, Status> from_json(ton::tl_obj
|
|||
|
||||
DowncastHelper<T> helper(constructor);
|
||||
Status status;
|
||||
bool ok = downcast_call(static_cast<T &>(helper), [&](auto &dummy) {
|
||||
auto result = ton::create_tl_object<std::decay_t<decltype(dummy)>>();
|
||||
bool ok = downcast_construct(static_cast<T &>(helper), [&](auto result) {
|
||||
status = from_json(*result, object);
|
||||
to = std::move(result);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue