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

bugfixed + crypto update

- compiles vs BoringSSL
- config proposal/vote fift code
- bugfixes in catchain
- other small fixes
This commit is contained in:
ton 2020-03-27 18:59:00 +04:00
parent 606e970ed5
commit a31f8d4424
39 changed files with 722 additions and 132 deletions

View file

@ -40,6 +40,9 @@
{ <b x{c4} s, rot 32 u, swap 64 u, b> 8 config! } : config.version!
1 constant capIhr
2 constant capCreateStats
4 constant capBounceMsgBody
8 constant capReportVersion
16 constant capSplitMergeTransactions
// max-validators masterchain-validators min-validators --
{ swap rot <b swap 16 u, swap 16 u, swap 16 u, b> 16 config! } : config.validator_num!
@ -54,21 +57,24 @@
variable validator-dict
dictnew 0 validator-dict 2!
variable validators-weight
validators-weight 0!
{ validator-dict @ second } : validator#
// val-pubkey weight --
{ dup 0<= abort"validator weight must be non-negative"
dup 64 ufits not abort"validator weight must fit into 64 bits"
over Blen 32 <> abort"validator public key must be 32 bytes long"
<b x{538e81278a} s, rot B, swap 64 u, b> <s
tuck <b x{538e81278a} s, rot B, swap 64 u, b> <s
validator-dict 2@ dup 1+ 3 -roll swap
16 udict!+ 0= abort"cannot add validator"
swap validator-dict 2!
swap validator-dict 2! validators-weight +!
} : add-validator
// since-ut until-ut main-val-cnt-or-0 --
{ ?dup 0= { validator# } if
validator# 0= abort"no initial validators defined"
rot <b x{11} s, swap 32 u, rot 32 u, validator# 16 u, swap 16 u,
validator-dict @ first <s s, b>
rot <b x{12} s, swap 32 u, rot 32 u, validator# 16 u, swap 16 u,
validators-weight @ 64 u, validator-dict @ first dict, b>
34 config!
} : config.validators!