Skip to content

Commit

Permalink
Merge pull request #234 from tonlabs/smft
Browse files Browse the repository at this point in the history
Shadow SMFT for first deployment test on a network
  • Loading branch information
bvscd committed Apr 10, 2024
2 parents ac41562 + 1a55f62 commit 3dba9a9
Show file tree
Hide file tree
Showing 40 changed files with 5,650 additions and 135 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## Version 0.57.0

- Shadow SMFT is prepared for first deployment

## Version 0.56.8

- `./configs/ton-global.config.json` renamed to `./configs/ton-global-config-sample.json` because
Expand Down
11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build = 'common/build/build.rs'
edition = '2021'
name = 'ton_node'
version = '0.56.8'
version = '0.57.0'

[workspace]
members = [ 'storage' ]
Expand Down Expand Up @@ -54,13 +54,15 @@ colored = '1.9.3'
crossbeam-channel = '0.4.2'
ctrlc = { features = [ 'termination' ], version = '3.4.0' }
dashmap = '5.4.0'
deflate = '1.0.0'
dirs = '2.0.2'
enum-as-inner = '=0.5.1'
env_logger = '0.7.1'
failure = '0.1'
futures = '0.3.1'
futures-timer = '3.0.1'
hex = '0.4'
inflate = '0.4.5'
lazy_static = '1.4.0'
log = '0.4'
log4rs = '1.2'
Expand Down Expand Up @@ -88,7 +90,7 @@ adnl = { features = [ 'client', 'node', 'server' ], git = 'https://github.com/to
catchain = { path = 'catchain' }
lockfree = { git = 'https://github.com/tonlabs/lockfree.git' }
storage = { path = 'storage' }
ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', optional = true, tag = '2.4.25' }
ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', tag = '2.4.25' }
ton_api = { git = 'https://github.com/tonlabs/ever-tl.git', package = 'ton_api', tag = '0.3.72' }
ton_block = { git = 'https://github.com/tonlabs/ever-block.git', tag = '1.9.141' }
ton_block_json = { git = 'https://github.com/tonlabs/ever-block-json.git', tag = '0.7.231' }
Expand All @@ -106,19 +108,20 @@ pretty_assertions = '1.3'
tokio = { features = [ 'macros' ], version = '1.5' }

[features]
default = [ 'telemetry' ]
default = [ 'telemetry', 'ton_types/export_key' ]
export_key = [ 'catchain/export_key', 'ton_types/export_key' ]
external_db = [ 'rdkafka' ]
fast_finality_extra = [ ]
gosh = [ 'ton_block/gosh', 'ton_vm/gosh' ]
log_metrics = [ ]
prometheus = [ 'metrics-exporter-prometheus', 'log_metrics' ]
signature_with_id = [ 'ton_block/signature_with_id', 'ton_vm/signature_with_id', 'ton_executor/signature_with_id' ]
slashing = [ 'ton_abi', 'validator_session/slashing' ]
slashing = [ 'validator_session/slashing' ]
statsd = [ 'metrics-exporter-statsd', 'log_metrics', 'dep:statsd' ]
telemetry = [ 'adnl/telemetry', 'storage/telemetry' ]
trace_alloc = [ ]
trace_alloc_detail = [ 'trace_alloc' ]
verification = [ 'ton_types/export_key' ]

[profile]

Expand Down
224 changes: 224 additions & 0 deletions bin/Elector.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
{
"ABI version": 2,
"version": "2.3",
"header": ["time"],
"functions": [
{
"name": "constructor",
"inputs": [
],
"outputs": [
]
},
{
"name": "process_new_stake",
"id": "0x4E73744B",
"inputs": [
{"name":"query_id","type":"uint64"},
{"name":"validator_pubkey","type":"uint256"},
{"name":"stake_at","type":"uint32"},
{"name":"max_factor","type":"uint32"},
{"name":"adnl_addr","type":"uint256"},
{"name":"bls_key1","type":"uint256"},
{"name":"bls_key2","type":"uint128"},
{"name":"signature","type":"bytes"}
],
"outputs": [
]
},
{
"name": "config_set_confirmed_ok",
"id": "0xEE764F4B",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "config_set_confirmed_err",
"id": "0xEE764F6F",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "config_slash_confirmed_ok",
"id": "0xEE764F4C",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "config_slash_confirmed_err",
"id": "0xEE764F70",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "grant",
"id": "0x4772616E",
"inputs": [
],
"outputs": [
]
},
{
"name": "take_change",
"inputs": [
],
"outputs": [
]
},
{
"name": "recover_stake",
"id": "0x47657424",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "recover_stake_gracefully",
"id": "0x47657425",
"inputs": [
{"name":"query_id","type":"uint64"},
{"name":"elect_id","type":"uint32"}
],
"outputs": [
]
},
{
"name": "get_elect_at",
"id": "0x47657426",
"inputs": [
{"name":"query_id","type":"uint64"}
],
"outputs": [
]
},
{
"name": "upgrade_code",
"id": "0x4E436F64",
"inputs": [
{"name":"query_id","type":"uint64"},
{"name":"code","type":"cell"},
{"name":"data","type":"cell"}
],
"outputs": [
]
},
{
"name": "proceed_register_vote",
"id": "0x56744370",
"inputs": [
{"name":"query_id","type":"uint64"},
{"name":"signature_hi","type":"uint256"},
{"name":"signature_lo","type":"uint256"},
{"name":"sign_tag","type":"uint32"},
{"name":"idx","type":"uint16"},
{"name":"elect_id","type":"uint32"},
{"name":"chash","type":"uint256"}
],
"outputs": [
]
},
{
"name": "report",
"inputs": [
{"name":"signature_hi","type":"uint256"},
{"name":"signature_lo","type":"uint256"},
{"name":"reporter_pubkey","type":"uint256"},
{"name":"victim_pubkey","type":"uint256"},
{"name":"metric_id","type":"uint8"}
],
"outputs": [
]
},
{
"name": "get",
"inputs": [
],
"outputs": [
{"name":"election_open","type":"bool"},
{"components":[{"name":"elect_at","type":"uint32"},{"name":"elect_close","type":"uint32"},{"name":"min_stake","type":"varuint16"},{"name":"total_stake","type":"varuint16"},{"components":[{"name":"stake","type":"varuint16"},{"name":"time","type":"uint32"},{"name":"max_factor","type":"uint32"},{"name":"addr","type":"uint256"},{"name":"adnl_addr","type":"uint256"},{"name":"bls_key1","type":"uint256"},{"name":"bls_key2","type":"uint128"}],"name":"members","type":"map(uint256,tuple)"},{"name":"failed","type":"bool"},{"name":"finished","type":"bool"}],"name":"cur_elect","type":"tuple"},
{"name":"credits","type":"map(uint256,varuint16)"},
{"components":[{"name":"unfreeze_at","type":"uint32"},{"name":"stake_held","type":"uint32"},{"name":"vset_hash","type":"uint256"},{"components":[{"name":"addr","type":"uint256"},{"name":"weight","type":"uint64"},{"name":"stake","type":"varuint16"},{"name":"banned","type":"bool"}],"name":"frozen_dict","type":"map(uint256,tuple)"},{"name":"total_stake","type":"varuint16"},{"name":"bonuses","type":"varuint16"},{"components":[{"name":"tag","type":"uint8"},{"name":"complaint","type":"cell"},{"name":"voters","type":"map(uint16,uint32)"},{"name":"vset_id","type":"uint256"},{"name":"weight_remaining","type":"int64"}],"name":"complaints","type":"map(uint256,tuple)"}],"name":"past_elections","type":"map(uint32,tuple)"},
{"name":"grams","type":"uint128"},
{"name":"active_id","type":"uint32"},
{"name":"active_hash","type":"uint256"}
]
},
{
"name": "get_banned",
"inputs": [
],
"outputs": [
{"name":"value0","type":"map(uint256,bool)"}
]
},
{
"name": "get_buckets",
"inputs": [
{"name":"victim_pubkey","type":"uint256"}
],
"outputs": [
{"components":[{"name":"weight","type":"uint64"},{"name":"reports","type":"map(uint256,uint64)"}],"name":"value0","type":"map(uint8,tuple)"}
]
},
{
"name": "get_buckets_workchain",
"inputs": [
{"name":"victim_pubkey","type":"uint256"}
],
"outputs": [
{"components":[{"name":"weight","type":"uint64"},{"name":"reports","type":"map(uint256,uint64)"}],"name":"value0","type":"map(uint8,tuple)"}
]
},
{
"name": "active_election_id",
"inputs": [
],
"outputs": [
{"name":"value0","type":"uint32"}
]
},
{
"name": "compute_returned_stake",
"inputs": [
{"name":"wallet_addr","type":"uint256"}
],
"outputs": [
{"name":"value0","type":"uint256"}
]
}
],
"data": [
],
"events": [
],
"fields": [
{"name":"_pubkey","type":"uint256"},
{"name":"_constructorFlag","type":"bool"},
{"name":"m_election_open","type":"bool"},
{"components":[{"name":"elect_at","type":"uint32"},{"name":"elect_close","type":"uint32"},{"name":"min_stake","type":"varuint16"},{"name":"total_stake","type":"varuint16"},{"components":[{"name":"stake","type":"varuint16"},{"name":"time","type":"uint32"},{"name":"max_factor","type":"uint32"},{"name":"addr","type":"uint256"},{"name":"adnl_addr","type":"uint256"},{"name":"bls_key1","type":"uint256"},{"name":"bls_key2","type":"uint128"}],"name":"members","type":"map(uint256,tuple)"},{"name":"failed","type":"bool"},{"name":"finished","type":"bool"}],"name":"m_cur_elect","type":"tuple"},
{"name":"m_credits","type":"map(uint256,varuint16)"},
{"components":[{"name":"unfreeze_at","type":"uint32"},{"name":"stake_held","type":"uint32"},{"name":"vset_hash","type":"uint256"},{"components":[{"name":"addr","type":"uint256"},{"name":"weight","type":"uint64"},{"name":"stake","type":"varuint16"},{"name":"banned","type":"bool"}],"name":"frozen_dict","type":"map(uint256,tuple)"},{"name":"total_stake","type":"varuint16"},{"name":"bonuses","type":"varuint16"},{"components":[{"name":"tag","type":"uint8"},{"name":"complaint","type":"cell"},{"name":"voters","type":"map(uint16,uint32)"},{"name":"vset_id","type":"uint256"},{"name":"weight_remaining","type":"int64"}],"name":"complaints","type":"map(uint256,tuple)"}],"name":"m_past_elections","type":"map(uint32,tuple)"},
{"name":"m_grams","type":"varuint16"},
{"name":"m_active_id","type":"uint32"},
{"name":"m_active_hash","type":"uint256"},
{"name":"m_masterchain_vtors_weight","type":"uint64"},
{"name":"m_workchain_vtors_weight","type":"uint64"},
{"name":"m_banned","type":"map(uint256,bool)"},
{"components":[{"name":"weight","type":"uint64"},{"name":"reports","type":"map(uint256,uint64)"}],"name":"m_reports","type":"map(uint256,map(uint8,tuple))"},
{"components":[{"name":"weight","type":"uint64"},{"name":"reports","type":"map(uint256,uint64)"}],"name":"m_reports_workchain","type":"map(uint256,map(uint8,tuple))"}
]
}
Loading

0 comments on commit 3dba9a9

Please sign in to comment.