Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/iroha2-dev' into iroha…
Browse files Browse the repository at this point in the history
…2-dev
  • Loading branch information
Asem-Abdelhady committed Jan 15, 2024
2 parents f914a94 + 66072b4 commit 7e3c12b
Show file tree
Hide file tree
Showing 25 changed files with 211 additions and 100 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
5 changes: 3 additions & 2 deletions Cargo.lock

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

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
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 7e3c12b

Please sign in to comment.