Skip to content

Commit e70cafe

Browse files
authored
Merge pull request #4 from tonlabs/0.24.12-rc
Version 0.24.12
2 parents 41eb025 + 197c075 commit e70cafe

38 files changed

+200
-138
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ ton-node-se/target/
2222
block-signer-config.json
2323
*.account
2424

25+
/ton-node-se/cfg
26+
/ton-node-se/entrypoint
27+
/ton-node-se/private-key
28+
/ton-node-se/pub-key
29+
/ton-node-se/log_cfg.yml
30+
/ton-node-se/tonos-se-tests

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.24.12 Feb 18, 2021
5+
### Fixed
6+
- Internal messages are sent in correct order regarding LT
7+
48
## 0.24.11 Jan 29, 2021
59
### Fixed
610
- Internal Server Error 500 on some queries. Hangs during deployment of some contracts.

build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
#!/bin/sh -e
22

33
TON_NODE="tonlabs/ton-node"
4-
TONOS_SE="tonlabs/local-node"
4+
TONOS_SE="${TONOS_SE:-tonlabs/local-node}"
55

66
BIN_TARGET="ton_node_startup"
77

88
Q_SERVER_GITHUB_REPO="https://github.com/tonlabs/ton-q-server"
9-
Q_SERVER_GITHUB_REV="master"
9+
Q_SERVER_GITHUB_REV="${Q_SERVER_GITHUB_REV:-master}"
1010

1111
echo
1212
echo "*** Building TON Node SE ***"
1313
echo
1414
docker build \
1515
--no-cache \
1616
--build-arg BIN_TARGET="$BIN_TARGET" \
17+
--build-arg FEATURES="${1:-disable-tests}" \
1718
--tag $TON_NODE \
1819
./ton-node-se
1920

ton-node-se/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
./Dockerfile
2-
./Jenkinsfile
2+
./Jenkinsfile
3+
./target

ton-node-se/Dockerfile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ FROM alpine:latest as build-kit
77
RUN apk update; \
88
apk add \
99
bash bash-completion \
10+
dos2unix \
1011
cmake \
1112
clang clang-libs clang-dev \
1213
curl ca-certificates zlib-dev\
@@ -25,30 +26,14 @@ RUN apk update; \
2526
RUN ssh-keygen -q -P "" -f ~/.ssh/id_rsa; \
2627
ssh-keyscan github.com >> ~/.ssh/known_hosts
2728

28-
29-
### STAGE cargo-init
30-
FROM build-kit as cargo-init
3129
ENV PKG_CONFIG_ALLOW_CROSS=1
3230
ENV RUSTFLAGS="-C target-feature=-crt-static"
3331
WORKDIR /ton-node
3432
COPY . .
3533

34+
ARG FEATURES="disable-tests"
3635

37-
### STAGE cargo-test
38-
FROM cargo-init as cargo-test
39-
ARG FEATURES="ci_run"
40-
41-
WORKDIR /ton-node/poa
42-
RUN source $HOME/.cargo/env && cargo test
43-
44-
WORKDIR /ton-node/ton_node
45-
RUN source $HOME/.cargo/env && cargo test --features ${FEATURES}
46-
47-
48-
### STAGE cargo-build
49-
FROM cargo-init as cargo-build
50-
RUN source $HOME/.cargo/env && cargo build --release
51-
36+
RUN dos2unix /ton-node/ton_node/build.sh && chmod +x /ton-node/ton_node/build.sh && /ton-node/ton_node/build.sh $FEATURES
5237

5338
### STAGE final-image
5439
FROM alpine:3.10 as final-image
@@ -59,10 +44,10 @@ RUN apk update; \
5944
apk add libgcc libstdc++;
6045

6146
# ton-node
62-
COPY --from=cargo-build \
47+
COPY --from=build-kit \
6348
/ton-node/target/release/${BIN_TARGET} \
6449
/node/ton-node
65-
COPY --from=cargo-build \
50+
COPY --from=build-kit \
6651
/ton-node/config/log_cfg.yml \
6752
/ton-node/config/cfg_startup \
6853
/ton-node/config/key01 \
@@ -71,7 +56,7 @@ COPY --from=cargo-build \
7156
/node/
7257

7358
# create-msg
74-
COPY --from=cargo-build \
59+
COPY --from=build-kit \
7560
/ton-node/target/release/create-msg \
7661
/node/create-msg/create-msg
7762

ton-node-se/poa/src/engines/authority_round/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ time.push(now.elapsed().as_micros());
12751275
//Transactions::transactions(block).is_empty() &&
12761276
(empty_steps.len() < self.maximum_empty_steps)
12771277
{
1278+
#[allow(deprecated)]
12781279
if self.step.can_propose.compare_and_swap(true, false, AtomicOrdering::SeqCst) {
12791280
trace!(target: "engine", "Can propose NOT because of empty step sealing");
12801281
let gen = self.generate_empty_step(
@@ -1350,6 +1351,7 @@ time.push(now.elapsed().as_micros());
13501351
let now = Instant::now();
13511352

13521353
// only issue the seal if we were the first to reach the compare_and_swap.
1354+
#[allow(deprecated)]
13531355
if self.step.can_propose.compare_and_swap(true, false, AtomicOrdering::SeqCst) {
13541356
trace!(target: "engine", "Can propose NOT because of block signing");
13551357

ton-node-se/ton_node/build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -xe
2+
3+
FEATURES=$1
4+
5+
source "$HOME/.cargo/env"
6+
7+
if [ "$FEATURES" != "disable-tests" ]; then
8+
cargo test --release
9+
fi
10+
11+
cargo build --release

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl TonNodeEngine {
266266
)?;
267267
let msg = Message::construct_from_bytes(&message.body.0)?;
268268
let ret = self.message_queue
269-
.queue(QueuedMessage::Message(msg))
269+
.queue(QueuedMessage::with_message(msg).unwrap())
270270
.map_err(|_| {
271271
warn!(target: "adnl", "Node message queue is full");
272272
adnl_err!(AdnlErrorKind::QueueIsFull)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ use ton_types::Cell;
1010
use ton_types::Result;
1111
use ton_types::HashmapType;
1212

13+
#[cfg(test)]
14+
#[path = "../../../tonos-se-tests/unit/test_block_builder.rs"]
15+
mod tests;
16+
1317
#[derive(Debug)]
1418
pub struct AppendSerializedContext {
1519
pub in_msg: Cell,

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ use ton_block::{InMsg, OutMsg, AccountStatus, ExtOutMessageHeader, MsgEnvelope};
1111
use ton_block::{HashmapAugType, BlkPrevInfo, Deserializable, ShardIdent};
1212
use ton_types::{UInt256, deserialize_tree_of_cells, BagOfCells, BuilderData};
1313

14+
#[cfg(test)]
15+
#[path = "../../../tonos-se-tests/unit/test_block_finality.rs"]
16+
mod tests;
17+
1418
/// Structure for Block finality layer
1519
/// This realize next functionality:
1620
/// Store block received from POA

0 commit comments

Comments
 (0)