Skip to content

Commit

Permalink
Merge branch 'iroha2-dev' into wasm_codec_derive_to_syn2
Browse files Browse the repository at this point in the history
  • Loading branch information
VAmuzing authored Jan 14, 2024
2 parents 2c18c60 + 1320cb2 commit 4b15f96
Show file tree
Hide file tree
Showing 30 changed files with 251 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: hyperledger/iroha2-ci:nightly-2023-06-25
tags: hyperledger/iroha2-ci:nightly-2024-01-12
labels: commit=${{ github.sha }}
file: Dockerfile.build
# This context specification is required
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
dockerhub:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/iroha2-dev-pr-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ concurrency:
cancel-in-progress: true

env:
RUSTUP_TOOLCHAIN: nightly-2023-06-25
RUSTUP_TOOLCHAIN: nightly-2024-01-12

jobs:
smart_contracts_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand All @@ -38,7 +38,7 @@ jobs:
workspace_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-pr-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
timeout-minutes: 60
strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-pr-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ concurrency:
cancel-in-progress: true

env:
RUSTUP_TOOLCHAIN: nightly-2023-06-25
RUSTUP_TOOLCHAIN: nightly-2024-01-12

jobs:
tests:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
consistency:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand All @@ -44,7 +44,7 @@ jobs:
with_coverage:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v3
# TODO Remove this step #2165
Expand All @@ -66,15 +66,14 @@ jobs:
uses: coverallsapp/github-action@v2
with:
file: lcov.info
git-branch: ${{ github.base_ref }}
compare-ref: ${{ github.base_ref }}
compare-sha: ${{ github.event.pull_request.base.sha}}
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
fail_ci_if_error: true

integration:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
Expand All @@ -87,7 +86,7 @@ jobs:
unstable:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -101,7 +100,7 @@ jobs:
if: startsWith(github.head_ref, 'iroha2-pr-deploy/')
runs-on: [self-hosted, Linux, iroha2-dev-push]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- name: Login to Soramitsu Harbor
Expand Down Expand Up @@ -131,7 +130,7 @@ jobs:
client-cli-tests:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/iroha2-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
registry:
runs-on: [self-hosted, Linux, iroha2-dev-push]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
archive_binaries_and_schema:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
if: false
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/iroha2-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
client-cli-tests:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
bench:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- name: Maximize build space
run: |
Expand All @@ -76,7 +76,7 @@ jobs:
java-api:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- name: Maximize build space
run: |
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
long:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- name: Maximize build space
uses: jlumbroso/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
registry:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
configs:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
image: hyperledger/iroha2-ci:nightly-2024-01-12
permissions:
contents: write
steps:
Expand Down
7 changes: 2 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ members = [
"smart_contract/utils",
"smart_contract/executor",
"smart_contract/executor/derive",
"substrate",
"telemetry",
"tools/kagami",
"tools/kura_inspector",
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ RUN pacman -Syu --noconfirm --disable-download-timeout

# Set up Rust toolchain
RUN pacman -S rustup mold musl rust-musl wget --noconfirm --disable-download-timeout
RUN rustup toolchain install nightly-2023-06-25
RUN rustup default nightly-2023-06-25
RUN rustup toolchain install nightly-2024-01-12
RUN rustup default nightly-2024-01-12
RUN rustup target add x86_64-unknown-linux-musl wasm32-unknown-unknown
RUN rustup component add rust-src

# Install musl C++ toolchain to build wasm-opt
RUN wget -c http://musl.cc/x86_64-linux-musl-native.tgz -O - | tar -xz
RUN ln -s /x86_64-linux-musl-native/bin/x86_64-linux-musl-g++ /x86_64-linux-musl-native/bin/musl-g++
RUN ln -s /x86_64-linux-musl-native/bin/x86_64-linux-musl-gcc-ar /x86_64-linux-musl-native/bin/musl-ar
RUN ln -s /x86_64-linux-musl-native/bin/x86_64-linux-musl-gcc-ar /x86_64-linux-musl-native/bin/x86_64-linux-musl-ar
RUN ln -s /x86_64-linux-musl-native/bin/x86_64-linux-musl-gcc-ranlib /x86_64-linux-musl-native/bin/musl-ranlib
ENV PATH="$PATH:/x86_64-linux-musl-native/bin"
ENV RUSTFLAGS="-C link-arg=-static"
Expand All @@ -32,7 +33,7 @@ RUN cargo build --target x86_64-unknown-linux-musl --profile deploy


# final image
FROM alpine:3.18
FROM alpine:3.19

ARG STORAGE=/storage
ARG TARGET_DIR=/iroha/target/x86_64-unknown-linux-musl/deploy
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ WORKDIR /client_cli/pytests
COPY /client_cli/pytests/pyproject.toml /client_cli/pytests/poetry.lock $WORKDIR
RUN poetry install

RUN rustup toolchain install nightly-2023-06-25-x86_64-unknown-linux-gnu
RUN rustup default nightly-2023-06-25-x86_64-unknown-linux-gnu
RUN rustup toolchain install nightly-2024-01-12-x86_64-unknown-linux-gnu
RUN rustup default nightly-2024-01-12-x86_64-unknown-linux-gnu
RUN rustup component add llvm-tools-preview clippy
RUN rustup component add rust-src
RUN rustup component add rustfmt
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.build.glibc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ WORKDIR /client_cli/pytests
COPY /client_cli/pytests/pyproject.toml /client_cli/pytests/poetry.lock $WORKDIR
RUN poetry install

RUN rustup toolchain install nightly-2023-06-25-x86_64-unknown-linux-gnu
RUN rustup default nightly-2023-06-25-x86_64-unknown-linux-gnu
RUN rustup toolchain install nightly-2024-01-12_64-unknown-linux-gnu
RUN rustup default nightly-2024-01-12-x86_64-unknown-linux-gnu
RUN rustup component add llvm-tools-preview clippy
RUN rustup component add rust-src
RUN rustup component add rustfmt
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.glibc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN pacman -Syu --noconfirm --disable-download-timeout

# Set up Rust toolchain
RUN pacman -S rustup mold wget --noconfirm --disable-download-timeout
RUN rustup toolchain install nightly-2023-06-25
RUN rustup default nightly-2023-06-25
RUN rustup toolchain install nightly-2024-01-12
RUN rustup default nightly-2024-01-12
RUN rustup target add wasm32-unknown-unknown
RUN rustup component add rust-src

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Iroha project mainly consists of the following crates:
* [`iroha_macro`](macro) provides the convenience macros.
* [`iroha_p2p`](p2p) defines peer creation and handshake logic.
* [`iroha_default_executor`](default_executor) defines runtime validation logic.
* [`iroha_substrate`](substrate) is the bridge substrate `XClaim` external module.
* [`iroha_telemetry`](telemetry) is used for monitoring and analysis of telemetry data.
* [`iroha_version`](version) provides message versioning for non-simultaneous system updates.

Expand Down
10 changes: 2 additions & 8 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ categories.workspace = true
workspace = true

[features]
default = ["bridge", "telemetry", "schema-endpoint"]
default = ["telemetry", "schema-endpoint"]

# Support interoperability with popular blockchain networks (Substrate, Ether, etc.)
bridge = ["iroha_core/bridge"]
# Support Decentralised Exchange, including functionality for atomic exchange instruction
dex = ["iroha_core/dex"]
# Support lightweight telemetry, including diagnostics
telemetry = ["iroha_telemetry", "iroha_core/telemetry", "iroha_torii/telemetry"]
# Support developer-specific telemetry.
Expand Down Expand Up @@ -82,10 +78,8 @@ vergen = { workspace = true, features = ["cargo"] }

[package.metadata.cargo-all-features]
denylist = [
"bridge",
"dex",
"schema-endpoint",
"telemetry",
"test-network",
] # TODO: remove `dex` and `bridge` once there's code for them.
]
skip_optional_dependencies = true
6 changes: 3 additions & 3 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ The results of the compilation can be found in `<IROHA REPO ROOT>/target/release

### Add features

To add optional features, use ``--features``. For example, to add the support for _dex_, run:
To add optional features, use ``--features``. For example, to add the support for _dev_telemetry_, run:

```bash
cargo build --release --features dex
cargo build --release --features dev-telemetry
```

A full list of features can be found in the [cargo manifest file](Cargo.toml) for this crate.

### Disable default features

By default, the Iroha binary is compiled with the `bridge`, `telemetry`, and `schema-endpoint` features. If you wish to remove those features, add `--no-default-features` to the command.
By default, the Iroha binary is compiled with the `telemetry`, and `schema-endpoint` features. If you wish to remove those features, add `--no-default-features` to the command.

```bash
cargo build --release --no-default-features
Expand Down
2 changes: 2 additions & 0 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ impl Client {
.join(crate::config::torii::CONFIGURATION)
.expect("Valid URI"),
)
.headers(&self.headers)
.header(http::header::CONTENT_TYPE, APPLICATION_JSON)
.build()?
.send()?;
Expand All @@ -1116,6 +1117,7 @@ impl Client {
.join(crate::config::torii::CONFIGURATION)
.expect("Valid URI");
let resp = DefaultRequestBuilder::new(HttpMethod::POST, url)
.headers(&self.headers)
.header(http::header::CONTENT_TYPE, APPLICATION_JSON)
.body(body)
.build()?
Expand Down
Loading

0 comments on commit 4b15f96

Please sign in to comment.