Skip to content

Commit ff89403

Browse files
authored
Merge pull request #15 from tonlabs/0.26.0-rc
Version 0.26.0
2 parents 00986ab + 326e763 commit ff89403

File tree

7 files changed

+20
-16
lines changed

7 files changed

+20
-16
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Release Notes
22
All notable changes to this project will be documented in this file.
33

4+
## 0.26.0 Apr 08, 2021
5+
### Fixed
6+
- External inbound messages now have `created_at` field filled.
7+
48
## 0.25.0 Mar 05, 2021
59
### New
610
- [New high-load Giver with ABI Version 2](contracts) is supported. Now you can run your tests in parallel, giver supports up to 100 parallel requests at a time (previous giver had timestamp-based replay protection which didn't allow often access)

ton-node-se/ton_node/src/node_engine/blocks_finality.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ debug!(target: "node", "PUT-IN-MESSAGE-BLOCK {}", msg.hash()?.to_hex_string());
373373
// msg.prepare_proof_for_json(&block_info_cells, &block_root)?;
374374
// msg.prepare_boc_for_json()?;
375375
let transaction_id = in_msg.transaction_cell().map(|cell| cell.repr_hash());
376-
let res = db.put_message(msg, msg_status, transaction_id, Some(block_id.clone()));
376+
let transaction_now = in_msg.read_transaction()?.map(|transaction| transaction.now());
377+
let res = db.put_message(msg, msg_status, transaction_id, transaction_now, Some(block_id.clone()));
377378
if res.is_err() {
378379
warn!(target: "node", "reflect message to DB(1). error: {}", res.unwrap_err());
379380
}
@@ -389,7 +390,7 @@ debug!(target: "node", "PUT-OUT-MESSAGE-BLOCK {:?}", msg);
389390
// msg1.prepare_proof_for_json(&block_info_cells, &block_root)?;
390391
// msg1.prepare_boc_for_json()?;
391392
let transaction_id = out_msg.transaction_cell().map(|cell| cell.repr_hash());
392-
let res = db.put_message(msg, msg_status, transaction_id, Some(block_id.clone()));
393+
let res = db.put_message(msg, msg_status, transaction_id, None, Some(block_id.clone()));
393394
if res.is_err() {
394395
warn!(target: "node", "reflect message to DB(2). error: {}", res.unwrap_err());
395396
}

ton-node-se/ton_node/src/node_engine/messages.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ let now = Instant::now();
375375

376376
if let Some(msg) = self.queue.dequeue_first_unused() {
377377

378-
let res = self.db.put_message(msg.message().clone(), MessageProcessingStatus::Processing, None, None);
378+
let res = self.db.put_message(msg.message().clone(), MessageProcessingStatus::Processing, None, None, None);
379379
if res.is_err() {
380380
warn!(target: "node", "generate_block_multi reflect to db failed. error: {}", res.unwrap_err());
381381
}
@@ -774,7 +774,7 @@ impl InMessagesQueue {
774774

775775
// write message into kafka with "queued" status
776776
if let Some(db) = self.db.as_ref() {
777-
let res = db.put_message(msg.message().clone(), MessageProcessingStatus::Queued, None, None);
777+
let res = db.put_message(msg.message().clone(), MessageProcessingStatus::Queued, None, None, None);
778778
if res.is_err() {
779779
log::error!(target: "node", "failed reflect to db queue message to internal queue. error: {}", res.unwrap_err());
780780
}
@@ -795,7 +795,7 @@ impl InMessagesQueue {
795795

796796
// write message into kafka with "queued" status
797797
if let Some(db) = self.db.as_ref() {
798-
let res = db.put_message(msg.message().clone(), MessageProcessingStatus::Queued, None, None);
798+
let res = db.put_message(msg.message().clone(), MessageProcessingStatus::Queued, None, None, None);
799799
if res.is_err() {
800800
log::error!(target: "node", "failed reflect to db queue message to internal priority queue. error: {}", res.unwrap_err());
801801
}

ton-node-se/ton_node/src/node_engine/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ pub trait DocumentsDb: Send + Sync {
466466
fn put_deleted_account(&self, workchain_id: i32, account_id: AccountId) -> NodeResult<()>;
467467
fn put_block(&self, block: Block, status: BlockProcessingStatus) -> NodeResult<()>;
468468
fn put_message(&self, msg: Message, status: MessageProcessingStatus,
469-
transaction_id: Option<UInt256>, block_id: Option<UInt256>) -> NodeResult<()>;
469+
transaction_id: Option<UInt256>, transaction_now: Option<u32>,
470+
block_id: Option<UInt256>) -> NodeResult<()>;
470471
fn put_transaction(&self, tr: Transaction, status: TransactionProcessingStatus,
471472
block_id: Option<UInt256>, workchain_id: i32) -> NodeResult<()>;
472473
fn has_delivery_problems(&self) -> bool;
@@ -486,10 +487,8 @@ impl DocumentsDb for DocumentsDbMock {
486487
Ok(())
487488
}
488489

489-
fn put_message(&self, _: Message, _: MessageProcessingStatus, _: Option<UInt256>, _: Option<UInt256>)
490-
-> NodeResult<()> {
491-
Ok(())
492-
}
490+
fn put_message(&self, _: Message, _: MessageProcessingStatus, _: Option<UInt256>, _: Option<u32>,
491+
_: Option<UInt256>) -> NodeResult<()> { Ok(()) }
493492

494493
fn put_transaction(&self, _: Transaction, _: TransactionProcessingStatus,
495494
_: Option<UInt256>, _: i32) -> NodeResult<()> {

ton-node-se/ton_node/src/node_engine/ton_node_handlers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ debug!("VALIDATOR SET {:?}", vals);
6262
if let Err(res) = self.db.put_message(
6363
msg.message().clone(),
6464
MessageProcessingStatus::Refused,
65-
None, None)
65+
None, None, None)
6666
{
6767
warn!(target: "node", "reflect message reject to DB(1). error: {}", res);
6868
}
@@ -372,15 +372,15 @@ debug!(target: "node", "SEND ROUTING MSG {} -> {}", self.validator_index(), next
372372
let _res = db.put_message(
373373
in_msg.clone(),
374374
MessageProcessingStatus::Preliminary,
375-
transaction_id.clone(), None
375+
transaction_id.clone(), Some(transaction.now()), None
376376
)?;
377377
}
378378

379379
transaction.iterate_out_msgs(&mut |msg| {
380380
db.put_message(
381381
msg,
382382
MessageProcessingStatus::Preliminary,
383-
transaction_id.clone(), None
383+
transaction_id.clone(), None, None
384384
).map_err(|_| failure::format_err!("put_to_db error"))?;
385385
Ok(true)
386386
})?;

ton-node-se/ton_node_startup/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
build = "../build/build.rs"
33
name = "ton_node_startup"
4-
version = "0.25.0"
4+
version = "0.26.0"
55

66
[dependencies]
77
clap = "2.32.0"

ton-node-se/ton_node_startup/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl DocumentsDb for ArangoHelper {
353353
}
354354

355355
fn put_message(&self, message: Message, status: MessageProcessingStatus,
356-
transaction_id: Option<TransactionId>, block_id: Option<BlockId>)
356+
transaction_id: Option<TransactionId>, transaction_now: Option<u32>, block_id: Option<BlockId>)
357357
-> NodeResult<()> {
358358

359359
let cell = message.serialize()?;
@@ -363,7 +363,7 @@ impl DocumentsDb for ArangoHelper {
363363
id: cell.repr_hash(),
364364
block_id,
365365
transaction_id,
366-
transaction_now: None, // TODO: check here
366+
transaction_now,
367367
status,
368368
boc,
369369
proof: None

0 commit comments

Comments
 (0)