Skip to content

Commit

Permalink
Merge pull request #131 from tonlabs/0.37.1-rc
Browse files Browse the repository at this point in the history
Version 0.37.1
  • Loading branch information
d3p authored Mar 21, 2023
2 parents 41bbbe7 + 915bbc0 commit 553e843
Show file tree
Hide file tree
Showing 7 changed files with 404 additions and 152 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Release Notes
All notable changes to this project will be documented in this file.

## 0.37.1 Mar 21, 2023

### Fixed

- Build docker image with q-server v0.55.0
- Post request with several external messages processed only of the messages

## 0.37.0 Feb 17, 2023

### New
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG TON_NODE

FROM node:14-buster as q-server-build
FROM node:18-buster as q-server-build

ARG Q_SERVER_GITHUB_REPO
ARG Q_SERVER_GITHUB_REV
Expand Down
256 changes: 255 additions & 1 deletion docker/ton-live/web/assets/1.bundle.js

Large diffs are not rendered by default.

264 changes: 125 additions & 139 deletions docker/ton-live/web/assets/main.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
edition = '2021'
build = 'build.rs'
name = 'ton_node_startup'
version = '0.37.0'
version = '0.37.1'

[dependencies]
# External
Expand Down
4 changes: 2 additions & 2 deletions node/src/api/message_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ impl MessageReceiverApi {
message = msg;
thread::sleep(Duration::from_micros(100));
}

return Ok(Response::with(status::Ok));
}
}

return Ok(Response::with(status::Ok));
}
}
}
Expand Down
21 changes: 13 additions & 8 deletions node/src/block/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ impl BlockBuilder {
block_info,
rand_seed,
start_lt,
end_lt: start_lt + 1,
..Default::default()
})
}
Expand Down Expand Up @@ -130,12 +131,11 @@ impl BlockBuilder {
executor: &OrdinaryTransactionExecutor,
acc_root: &mut Cell,
msg: &Message,
acc_last_lt: u64,
last_lt: u64,
debug: bool,
) -> NodeResult<(Transaction, u64)> {
let (block_unixtime, block_lt) = self.at_and_lt();
let last_lt = std::cmp::max(acc_last_lt, block_lt);
let lt = Arc::new(AtomicU64::new(last_lt + 1));
let lt = Arc::new(AtomicU64::new(last_lt));
let result = executor.execute_with_libs_and_params(
Some(&msg),
acc_root,
Expand All @@ -157,8 +157,14 @@ impl BlockBuilder {
Ok((transaction, lt.load(Ordering::Relaxed)))
}
Err(err) => {
let lt = last_lt + 1;
let account = Account::construct_from_cell(acc_root.clone())?;
let old_hash = acc_root.repr_hash();
let mut account = Account::construct_from_cell(acc_root.clone())?;
let lt = std::cmp::max(
account.last_tr_time().unwrap_or(0),
std::cmp::max(last_lt, msg.lt().unwrap_or(0) + 1)
);
account.set_last_tr_time(lt);
*acc_root = account.serialize()?;
let mut transaction = Transaction::with_account_and_message(&account, msg, lt)?;
transaction.set_now(block_unixtime);
let mut description = TransactionDescrOrdinary::default();
Expand Down Expand Up @@ -192,8 +198,7 @@ impl BlockBuilder {
_ => return Err(err)?,
}
transaction.write_description(&TransactionDescr::Ordinary(description))?;
let hash = acc_root.repr_hash();
let state_update = HashUpdate::with_hashes(hash.clone(), hash);
let state_update = HashUpdate::with_hashes(old_hash, acc_root.repr_hash());
transaction.write_state_update(&state_update)?;
Ok((transaction, lt))
}
Expand All @@ -219,7 +224,7 @@ impl BlockBuilder {
&executor,
&mut acc_root,
&message,
shard_acc.last_trans_lt(),
std::cmp::max(self.start_lt, shard_acc.last_trans_lt() + 1),
debug,
)?;
self.end_lt = std::cmp::max(self.end_lt, max_lt);
Expand Down

0 comments on commit 553e843

Please sign in to comment.