Skip to content

Commit ef5d279

Browse files
committed
Automatic project update
1 parent dc8a924 commit ef5d279

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+449
-3039
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## Version: 0.50.3
6+
7+
### New
8+
9+
10+

Cargo.toml

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = '2018'
33
name = 'ton_node'
4-
version = '0.49.4'
4+
version = '0.50.3'
55

66

77
[workspace]
@@ -31,7 +31,7 @@ lazy_static = '1.4.0'
3131
log = '0.4'
3232
log4rs = '1'
3333
log4rs-rolling-file = '0.2.0'
34-
num-bigint = '0.2.2'
34+
num-bigint = '0.4'
3535
openssl = '0.10.35'
3636
rand = '0.7'
3737
regex = '^1.3.0'
@@ -42,24 +42,25 @@ sha2 = '0.9'
4242
spin = '0.7.1'
4343
stream-cancel = '0.8.0'
4444
string-builder = '^0.2.0'
45-
adnl = { features = [ 'client', 'node', 'server' ], git = 'https://github.com/tonlabs/ton-labs-adnl', tag = '0.7.66' }
45+
adnl = { features = [ 'client', 'node', 'server' ], git = 'https://github.com/tonlabs/ton-labs-adnl', tag = '0.7.67' }
4646
catchain = { path = 'catchain' }
47-
dht = { git = 'https://github.com/tonlabs/ton-labs-dht', tag = '0.5.61' }
47+
dht = { git = 'https://github.com/tonlabs/ton-labs-dht', tag = '0.5.62' }
48+
ever-crypto = { git = 'https://github.com/tonlabs/ever-labs-crypto', tag = '0.1.7' }
4849
lockfree = { git = 'https://github.com/tonlabs/lockfree.git' }
49-
overlay = { git = 'https://github.com/tonlabs/ton-labs-overlay', tag = '0.6.49' }
50-
rldp = { git = 'https://github.com/tonlabs/ton-labs-rldp', tag = '0.7.60' }
50+
overlay = { git = 'https://github.com/tonlabs/ton-labs-overlay', tag = '0.6.50' }
51+
rldp = { git = 'https://github.com/tonlabs/ton-labs-rldp', tag = '0.7.61' }
5152
rustracing = { optional = true, version = '0.4.0' }
5253
rustracing_jaeger = { optional = true, version = '0.4.1' }
5354
statsd = { optional = true, version = '0.14.0' }
5455
storage = { path = 'storage' }
5556
tokio = { features = [ 'rt-multi-thread' ], version = '1.5' }
56-
ton_abi = { git = 'https://github.com/tonlabs/ton-labs-abi.git', tag = '2.1.7' }
57+
ton_abi = { git = 'https://github.com/tonlabs/ton-labs-abi.git', tag = '2.1.14' }
5758
ton_api = { git = 'https://github.com/tonlabs/ton-labs-tl', package = 'ton_api', tag = '0.2.120' }
58-
ton_block = { git = 'https://github.com/tonlabs/ton-labs-block', tag = '1.7.37' }
59-
ton_block_json = { git = 'https://github.com/tonlabs/ton-labs-block-json.git', tag = '0.7.2' }
60-
ton_executor = { git = 'https://github.com/tonlabs/ton-labs-executor', tag = '1.15.52' }
59+
ton_block = { git = 'https://github.com/tonlabs/ton-labs-block', tag = '1.7.39' }
60+
ton_block_json = { git = 'https://github.com/tonlabs/ton-labs-block-json.git', tag = '0.7.5' }
61+
ton_executor = { git = 'https://github.com/tonlabs/ton-labs-executor', tag = '1.15.56' }
6162
ton_types = { git = 'https://github.com/tonlabs/ton-labs-types', tag = '1.10.12' }
62-
ton_vm = { git = 'https://github.com/tonlabs/ton-labs-vm', tag = '1.8.30' }
63+
ton_vm = { git = 'https://github.com/tonlabs/ton-labs-vm', tag = '1.8.32' }
6364
validator_session = { path = 'validator-session' }
6465

6566
[target.'cfg(unix)'.dependencies.rdkafka]
@@ -75,12 +76,9 @@ version = '0.26.0'
7576

7677
[features]
7778
default = [ 'telemetry' ]
78-
validator = [ 'async_collator', 'async_validator' ]
7979
external_db = [ 'rdkafka' ]
80-
async_collator = [ ]
81-
async_validator = [ ]
8280
ci_run = [ 'storage/ci_run' ]
83-
compression = [ 'overlay/compression', 'rldp/compression' ]
81+
export_key = [ 'catchain/export_key', 'ever-crypto/export_key' ]
8482
metrics = [ 'statsd' ]
8583
slashing = [ ]
8684
telemetry = [

catchain/Cargo.toml

+8-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ regex = '1.3.1'
2222
sha2 = '0.9'
2323
tokio = { features = [ 'rt-multi-thread' ], version = '1.5' }
2424

25-
adnl = { features = [ 'node' ], git = 'https://github.com/tonlabs/ton-labs-adnl', tag = '0.7.66' }
26-
overlay = { git = 'https://github.com/tonlabs/ton-labs-overlay', tag = '0.6.49' }
27-
rldp = { git = 'https://github.com/tonlabs/ton-labs-rldp', tag = '0.7.60' }
25+
adnl = { features = [ 'node' ], git = 'https://github.com/tonlabs/ton-labs-adnl', tag = '0.7.67' }
26+
ever-crypto = { git = 'https://github.com/tonlabs/ever-labs-crypto', tag = '0.1.7' }
27+
overlay = { git = 'https://github.com/tonlabs/ton-labs-overlay', tag = '0.6.50' }
28+
rldp = { git = 'https://github.com/tonlabs/ton-labs-rldp', tag = '0.7.61' }
2829
storage = { path = '../storage' }
2930
ton_api = { git = 'https://github.com/tonlabs/ton-labs-tl', package = 'ton_api', tag = '0.2.120' }
3031
ton_types = { git = 'https://github.com/tonlabs/ton-labs-types', tag = '1.10.12' }
@@ -39,3 +40,7 @@ git = 'https://github.com/rust-rocksdb/rust-rocksdb.git'
3940
[target.'cfg(unix)'.dev-dependencies.rocksdb]
4041
git = 'https://github.com/rust-rocksdb/rust-rocksdb.git'
4142
features = [ 'jemalloc' ]
43+
44+
[features]
45+
default = [ ]
46+
export_key = [ 'ever-crypto/export_key' ]

catchain/src/lib.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ mod receiver;
4444
mod receiver_source;
4545
pub mod utils;
4646

47-
use adnl::{
48-
common::{KeyId, KeyOption},
49-
node::AdnlNode,
50-
};
47+
use adnl::node::AdnlNode;
48+
use ever_crypto::{KeyId, KeyOption};
5149
use failure::err_msg;
5250
pub use overlay::PrivateOverlayShortId;
5351
pub use profiling::{InstanceCounter, ResultStatusCounter};
@@ -63,13 +61,13 @@ use std::{
6361
use ton_types::types::UInt256;
6462

6563
/// Public key
66-
pub type PublicKey = Arc<KeyOption>;
64+
pub type PublicKey = Arc<dyn KeyOption>;
6765

6866
/// Public key hash
6967
pub type PublicKeyHash = Arc<KeyId>;
7068

7169
/// Private key
72-
pub type PrivateKey = Arc<KeyOption>;
70+
pub type PrivateKey = Arc<dyn KeyOption>;
7371

7472
/// Result for operations
7573
pub type Result<T> = ton_types::Result<T>;

catchain/src/log_player.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ impl LogPlayerImpl {
827827

828828
assert!(session_desc.node_ids.len() == session_desc.weights.len());
829829
assert!(session_desc.local_key.is_some());
830-
assert!(session_desc.local_key.as_ref().unwrap().pvt_key().is_ok());
830+
assert!(session_desc.local_key.as_ref().unwrap().pub_key().is_err());
831831

832832
//create player
833833

@@ -870,7 +870,7 @@ impl LogPlayerImpl {
870870
for session_desc in log_header.session_descs {
871871
if session_desc.node_ids.len() != session_desc.weights.len()
872872
|| session_desc.local_key.is_none()
873-
|| !session_desc.local_key.as_ref().unwrap().pvt_key().is_ok()
873+
|| !session_desc.local_key.as_ref().unwrap().pub_key().is_err()
874874
{
875875
continue;
876876
}

catchain/src/receiver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::profiling::check_execution_time;
1717
use crate::profiling::instrument;
1818
use crate::profiling::ResultStatusCounter;
1919
use crate::ton_api::IntoBoxed;
20+
use ever_crypto::Ed25519KeyOption;
2021
use rand::Rng;
2122
use std::collections::HashMap;
2223
use std::collections::VecDeque;
@@ -2538,8 +2539,7 @@ impl ReceiverImpl {
25382539
}
25392540

25402541
pub(crate) fn create_dummy(path: String) -> Result<ReceiverPtr> {
2541-
let (_, public_key) = KeyOption::with_type_id(KeyOption::KEY_ED25519)?;
2542-
let public_key = Arc::new(public_key);
2542+
let public_key = Ed25519KeyOption::generate()?;
25432543
let ids = vec![CatchainNode {
25442544
public_key: public_key.clone(),
25452545
adnl_id: public_key.id().clone(),

catchain/src/utils.rs

+8-13
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ extern crate hex;
1515

1616
/// Imports
1717
pub use super::*;
18+
use ever_crypto::{Ed25519KeyOption, KeyId};
1819
use crate::ton_api::IntoBoxed;
1920
use std::collections::BTreeMap;
2021
use std::collections::HashMap;
2122
use std::collections::HashSet;
23+
use std::convert::TryInto;
2224

2325
/*
2426
to string conversions
@@ -109,24 +111,21 @@ pub fn parse_hex_as_public_key(hex_asm: &str) -> PublicKey {
109111
let mut key_slice = vec![0; hex_asm.len() / 2];
110112
parse_hex_to_array(hex_asm, &mut key_slice[..]);
111113
//TODO: errors processing for key creation
112-
Arc::new(adnl::common::KeyOption::from_tl_serialized_public_key(&key_slice).unwrap())
114+
Ed25519KeyOption::from_public_key_tl_serialized(&key_slice).unwrap()
113115
}
114116

115117
pub fn parse_hex_as_public_key_raw(hex_asm: &str) -> PublicKey {
116118
assert!(hex_asm.len() == 64);
117119
let mut key_slice = [0u8; 32];
118120
parse_hex_to_array(hex_asm, &mut key_slice[..]);
119121
//TODO: errors processing for key creation
120-
Arc::new(adnl::common::KeyOption::from_type_and_public_key(
121-
adnl::common::KeyOption::KEY_ED25519,
122-
&key_slice,
123-
))
122+
Ed25519KeyOption::from_public_key(&key_slice)
124123
}
125124

126125
pub fn parse_hex_as_public_key_hash(hex_asm: &str) -> PublicKeyHash {
127126
let mut key_slice: [u8; 32] = [0; 32];
128127
parse_hex_to_array(hex_asm, &mut key_slice);
129-
adnl::common::KeyId::from_data(key_slice)
128+
KeyId::from_data(key_slice)
130129
}
131130

132131
pub fn parse_hex_as_session_id(hex_asm: &str) -> SessionId {
@@ -139,8 +138,7 @@ pub fn parse_hex_as_private_key(hex_asm: &str) -> PrivateKey {
139138
parse_hex_to_array(hex_asm, &mut key_slice[..]);
140139
//TODO: errors processing for key creation
141140
assert!(key_slice.len() == 32);
142-
let private_key = ed25519_dalek::SecretKey::from_bytes(&key_slice).unwrap();
143-
Arc::new(adnl::common::KeyOption::from_ed25519_secret_key(private_key).unwrap())
141+
Ed25519KeyOption::from_private_key(key_slice.as_slice().try_into().unwrap()).unwrap()
144142
}
145143

146144
pub fn parse_hex_as_expanded_private_key(hex_asm: &str) -> PrivateKey {
@@ -149,10 +147,7 @@ pub fn parse_hex_as_expanded_private_key(hex_asm: &str) -> PrivateKey {
149147
parse_hex_to_array(hex_asm, &mut key_slice[..]);
150148
//TODO: errors processing for key creation
151149
assert!(key_slice.len() == 64);
152-
let expanded_private_key = ed25519_dalek::ExpandedSecretKey::from_bytes(&key_slice).unwrap();
153-
Arc::new(
154-
adnl::common::KeyOption::from_ed25519_expanded_secret_key(expanded_private_key).unwrap(),
155-
)
150+
Ed25519KeyOption::from_expanded_key(key_slice.as_slice().try_into().unwrap()).unwrap()
156151
}
157152

158153
pub fn get_hash(data: &::ton_api::ton::bytes) -> BlockHash {
@@ -164,7 +159,7 @@ pub fn get_hash_from_block_payload(data: &BlockPayloadPtr) -> BlockHash {
164159
}
165160

166161
pub fn int256_to_public_key_hash(public_key: &UInt256) -> PublicKeyHash {
167-
adnl::common::KeyId::from_data(*public_key.as_slice())
162+
KeyId::from_data(*public_key.as_slice())
168163
}
169164

170165
pub fn get_public_key_hash(public_key: &PublicKey) -> PublicKeyHash {

commit_hash.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1efe43f7be0c4916fb86a24fc8a4d64ac3e0d842
1+
6e09fac3e8e7d9aaefa709fece9bf9bf2adf2d2f

deps_map.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"adnl":"56dfefa71a4d1f62aa3d5edd9748bcae4ecb4162","dht":"f0dd7c3723962880bea7225de7f1727713386d42","overlay":"ae651875e43cbe840fc974eb78b4e2619106f1c6","rldp":"dba5fedd7d1a652c35918fd0eb0b6ddc30d4576f","ton-labs-abi":"ec48e6f90fc0ad6b73ce5c2501807a94b38c056a","ton-tl":"f36ed7353e15dbc472170b28c9a63fca6a64f3a1","ton-block":"4a3bf9a65e3bb578ad5833003d6c8978888199e3","ton-block-json":"e09628f01f93569fad7e5c7125cd9af1d0a5a1c9","ton-executor":"d716818545b287e04dfad21ddc317a5ea389e621","ton-types":"007da5416f1508fdd5fd23be8099a5e0f06f564e","ton-vm":"214b50588c50fdbd3939b87ba87d77a0b3c43777"}
1+
{"adnl":"3713f1f77cfc0420e91b696574befe113d94914e","dht":"46d66350b7def07ecad5be08590fe9b84e0f59a4","ever-crypto":"04933eeea4a3e1988c1d6c788918be2599cbc1e5","overlay":"4b2108b0132455faf348c783bf4405586294b7a5","rldp":"4f8727510a0c497668e23478b095f1a07baad548","ton-labs-abi":"ed3f54ffeb646ba9fe86bd69cc19c9d62a752426","ton-tl":"a46df37d842301bc2d43549334022dfa20903760","ton-block":"e40e2ed3f39de5e40cbc5383f691b0a8d8c07de1","ton-block-json":"25cba771beb767d89973b225d3fbe263ce2cc254","ton-executor":"9dc29791c50c896396ff9c9e0a980f8a0aff35e1","ton-types":"007da5416f1508fdd5fd23be8099a5e0f06f564e","ton-vm":"a3530fddcd4cb170cceace2bd545bf82a29081de"}

recomended_rust

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.57.0
1+
1.58.1

src/boot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
CHECK, block::BlockStuff, block_proof::BlockProofStuff, engine_traits::EngineOperations,
1616
shard_state::ShardStateStuff, engine::Engine
1717
};
18-
use adnl::common::KeyId;
18+
use ever_crypto::KeyId;
1919
use std::{ops::Deref, sync::Arc, time::Duration};
2020
use storage::block_handle_db::BlockHandle;
2121
use ton_block::{BlockIdExt, ShardIdent, SHARD_FULL};

0 commit comments

Comments
 (0)