Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 17ed6e7
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Mar 15 17:56:00 2024 +0100

    fix: release.sh platform deps update broken (#57)

commit af64c65
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Mar 15 17:29:40 2024 +0100

    fix(proto-compiler): existence of unzipped tenderdash sources not verified correctly (#56)

    * fix(proto-compiler): better detection of missing protobuf files

    * build: release 0.14.0-dev.9

commit 86ba24b
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Wed Mar 13 15:46:59 2024 +0100

    build: release v0.14.0-dev.8 for tenderdash 0.14.0-dev.4 (#55)

commit 672f8ba
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Tue Mar 12 06:34:13 2024 +0100

    feat(proto)!: grpc server and client support (#50)

    * feat(proto): grpc server and client support

    * chore: make ServerRuntime public

    * test(proto): test grpc server with tenderdash in docker

    * chore(proto): fix imports

    * chore: build issues

    * chore: abci grpc-server feature

    * chore: imports and features

    * chore: grpc test

    * chore: re-export tonic

    * chore: fix missing serde serialization

    * chore(proto): fix feature flags

    * chore(proto): fix warn

    * fix: wrong json serialization of ConsensusParams

    * fix: wrong json serialization of ConsensusParams

    * chore: fix build

    * chore: simplify features

    * chore: self review, simplify features

    * chore: comments

    * test(abci): grpc test uses latest tenderdash tag

    * chore: bump version to 0.14.0-dev.7 for tenderdash v0.14.0-dev.3, abci 0.26.0

    * chore: fix missing serde serialization

    * fix: wrong json serialization of ConsensusParams

    * build(deps): update chrono and replace deprecated fn calls

    ---------

    Co-authored-by: Ivan Shumkov <ivan@shumkov.ru>

commit c5ece7b
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Mar 8 10:03:42 2024 +0100

    build(deps): bump chrono and replace deprecated calls (#54)

    * build(deps): update chrono and replace deprecated fn calls

commit 784a0c5
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 4 16:34:57 2024 +0100

    build(deps): update bollard requirement from 0.15.0 to 0.16.0 (#53)

    Updates the requirements on [bollard](https://github.com/fussybeaver/bollard) to permit the latest version.
    - [Release notes](https://github.com/fussybeaver/bollard/releases)
    - [Commits](fussybeaver/bollard@v0.15.0...v0.16.0)

    ---
    updated-dependencies:
    - dependency-name: bollard
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1b8829e
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Mar 4 16:33:58 2024 +0100

    fix(proto)!: wrong json serialization of consensus params (#51)

    * fix: wrong json serialization of ConsensusParams

    * chore: fix build

commit 309f589
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Feb 29 11:30:04 2024 +0100

    fix: tenderdash-proto rebuilt with every run due to changed *.proto (#52)

    * fix: tenderdash-proto rebuilt with every run due to changed *.proto files

    * refactor: self review

    * chore: fix GHA build errors

    * chore: clippy

    * chore: build errs fix

commit 8b5afe6
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Tue Feb 20 09:49:49 2024 +0100

    fix(abci): tenderdash version check requires exact version match (#49)

    fix(abci): version match fixed

commit a2151d4
Author: Lukasz Klimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Feb 2 12:35:26 2024 +0100

    build: release script to update versions

commit 701ba0f
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Feb 1 15:31:46 2024 +0100

    feat!: support ThresholdRecoverRaw in tenderdash v0.14 (#43)

    * chore: clippy

    * fix: use TENDERDASH_COMMITISH env var if set

    * feat: support ThresholdRecoverRaw vote extensions

    * chore: bump version to 0.14.0-dev.1

    * chore: bump version to 0.14.0-dev.6

    * chore: set default Tenderdash version to v0.14.0-dev.2

    * feat: threshold raw vote extensions sign_hash

    * fix: take TENDERDASH_VERSION  from td version.go

    * chore: fmt

    * refactor(abci)!: renames in signature processing

    * chore(abci): add comments to remove tracing:: in signatures once stable

commit 2810894
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Wed Jan 31 15:52:44 2024 +0100

    build(deps): use protoc 25.2 (#47)

    * build(deps): use protoc 25.2

    * chore: fix typo

commit 556f3a9
Author: Quantum Explorer <quantum@dash.org>
Date:   Sat Jan 6 20:41:43 2024 +0700

    fix: bump version

commit b6ed3ba
Author: Quantum Explorer <quantum@dash.org>
Date:   Sat Jan 6 20:13:32 2024 +0700

    fix: bump version

commit e4de597
Author: Quantum Explorer <quantum@dash.org>
Date:   Sat Jan 6 18:54:50 2024 +0700

    fix: bump version

commit 6ebfaa3
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Wed Dec 20 07:28:05 2023 +0100

    build: retry download of tenderdash zip on unzip failures (#46)

    fix: retry download of tenderdash zip on unzip failures

commit b4df654
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Dec 18 18:38:54 2023 +0100

    chore: release for tenderdash 0.14.0-dev.1 (#45)

commit 865fd05
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Dec 14 14:04:57 2023 +0100

    feat: use TENDERDASH_COMMITISH env var to set tenderdash rev to use (#44)

    * fix: use TENDERDASH_COMMITISH env var if set

    * chore: fix nightly build issues

commit f413119
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Oct 9 13:08:57 2023 +0200

    build: release 0.13.1 for tenderdash 0.13.2+ (#42)

    build: release 0.13.1 for tenderdash 0.13.2

commit 32cff5c
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Oct 9 12:53:22 2023 +0200

    fix(tenderdash-abci): ensure crate features build without default features (#39)

    * fix(tenderdash-abci): correct handling of features

    * chore: change resolver in cargo.toml to 2

    * fix: missing prost-derive feature in proto

commit 2a98bf2
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Oct 5 21:30:53 2023 +0200

    fix(tenderdash-abci): deadlock on multiple msgs received (#41)

commit 3280669
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Oct 5 21:25:50 2023 +0200

    ci: remove sccache from github actions (#40)

commit 6934428
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:29:53 2023 +0200

    build(deps): update prost requirement from 0.11 to 0.12 (#34)

    Updates the requirements on [prost](https://github.com/tokio-rs/prost) to permit the latest version.
    - [Release notes](https://github.com/tokio-rs/prost/releases)
    - [Commits](tokio-rs/prost@prost-build-0.11.1...v0.12.0)

    ---
    updated-dependencies:
    - dependency-name: prost
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 94f9714
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:29:41 2023 +0200

    build(deps): update prost-build requirement from 0.11 to 0.12 (#33)

    Updates the requirements on [prost-build](https://github.com/tokio-rs/prost) to permit the latest version.
    - [Release notes](https://github.com/tokio-rs/prost/releases)
    - [Commits](tokio-rs/prost@prost-build-0.11.1...v0.12.0)

    ---
    updated-dependencies:
    - dependency-name: prost-build
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f4235c1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 3 16:22:02 2023 +0200

    build(deps): update bollard requirement from 0.14.0 to 0.15.0 (#37)

    Updates the requirements on [bollard](https://github.com/fussybeaver/bollard) to permit the latest version.
    - [Release notes](https://github.com/fussybeaver/bollard/releases)
    - [Commits](fussybeaver/bollard@v0.14.0...v0.15.0)

    ---
    updated-dependencies:
    - dependency-name: bollard
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 45fc447
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Wed Sep 13 14:05:30 2023 +0200

    chore: release rs-tenderdash-abci v0.13.0 for tenderdash v0.13.0 (#36)

    chore: release Tenderdash v0.13.0

commit f2b15b8
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Sep 8 16:32:23 2023 +0200

    feat(abci): support tracing::span inside rs-tenderdash-abci (#35)

    * feat(proto): DeriveFrom for ABCI Request Value

    * feat(abci): add tracing spans

    * feat: add request id to tracing span

    * chore: log exception responses on error! level and simplify span

    * chore: minor improvements  and docs

    * chore: traced exception format same as response

    * chore: minor fix

    * chore: cargo fmt

    * fix: doctest

commit 00454db
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Jul 20 17:11:05 2023 +0200

    feat(proto): Timestamp::from_milis() (#24)

    * build: upgrade to tenderdash v0.13.0-dev.1

    * chore: formatting improvement to restart GHA

    * feat(proto): Timestamp::from_milis()

    * chore(proto): panic when timestamp millis out of range + tests

    * chore: unify cargo.toml dependency code style

commit b397f63
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Jul 20 13:28:10 2023 +0200

    build(deps): update num-derive requirement from 0.3 to 0.4 (#26)

    Updates the requirements on [num-derive](https://github.com/rust-num/num-derive) to permit the latest version.
    - [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
    - [Commits](rust-num/num-derive@num-derive-0.3.0...num-derive-0.4.0)

    ---
    updated-dependencies:
    - dependency-name: num-derive
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit a0efded
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Jul 20 13:27:21 2023 +0200

    build: remove sccache from docker build process (#32)

    build: remove sccache from docker

commit 8ed0188
Author: Dmitrii Golubev <shotonoff@gmail.com>
Date:   Thu Jul 20 09:21:40 2023 +0200

    chore: upgrade tenderdash version to 0.13.0-dev.2 (#31)

commit 0bb35a3
Author: Dmitrii Golubev <shotonoff@gmail.com>
Date:   Thu Jul 13 17:54:16 2023 +0200

    revert: "refactor: make self for offer_snapshot mutable (#27)" (#30)

    Revert "refactor: make self for offer_snapshot mutable (#27)"

    This reverts commit f9f4685.

commit f9f4685
Author: Dmitrii Golubev <shotonoff@gmail.com>
Date:   Thu Jul 13 17:10:03 2023 +0200

    refactor: make self for offer_snapshot mutable (#27)

    * refactor: make self for offer_snapshot mutable

commit c161fd6
Author: Lukasz Klimek <842586+lklimek@users.noreply.github.com>
Date:   Wed Jun 28 16:34:08 2023 +0200

    chore: release for tenderdash 0.12.0

commit 29b5056
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Jun 26 09:51:40 2023 +0200

    feat: graceful shutdown (#23)

    * feat: graceful shutdown

    * feat: async net io

    * chore: graceful shutdown

    * chore: graceful shutdown

    * chore: unix graceful shutdown

    * chore: simplify code

    * chore: child token

    * chore: use child token to NOT kill calling server

    * fix: missing tokio feature

    * chore:  clippy

    * chore: apply peer review feedback

commit e7b27c3
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Tue Jun 6 11:33:15 2023 +0200

    feat: impl SignDigest for CanonicalVote for easier light client verification (#22)

    feat: impl SignDigest for CanonicalVote

commit a177503
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Thu Apr 27 18:16:26 2023 +0200

    chore!: move signature functions to abci and more strict type controls (#21)

    * fix(proto): signature: state id must have 32 bytes

    * fix(proto): added block id constraint

    * chore: move signature processing from proto to abci as proto is no_std

    * chore(abci): log sign bytes on trace lvl

    * chore: signatures

    * chore(abci): more strict type checks

    * chore: signs: restore reverse()

    * chore(abci): minor code improvements

commit 623e225
Author: Quantum Explorer <quantum@dash.org>
Date:   Wed Apr 19 09:33:46 2023 +0700

    updated gitignore

commit e66a7d6
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Apr 17 20:20:32 2023 +0200

    feat(proto): add sign_digest() to commit and vote extension (#20)

    * refactor(proto)!: replace flex_error with thiserror

    * feat(proto): add sign_bytes() to commit and vote

    * Revert "refactor(proto)!: replace flex_error with thiserror"

    This reverts commit 45014e9.

    * chore(proto): adjust errors

    * feat(proto): impl SignBytes for VoteExtension

    * refactor(proto): delete SignContext

    * feat(proto): add SignDigest trait for commit

    * chore(proto): sign_digest borrows quorum hash

    * test(proto): test sign_digest()

    * fix(proto):  writing &Vec instead of &[\_]

    * chore(proto): self-review

    * chore(proto): make SignBytes public for tests

commit d61717a
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Apr 7 08:10:53 2023 +0200

    test: build rs-tenderdash-abci in Docker (#14)

    * build: sample Dockerfile image

    * chore: fix dockerfile

    * chore: try to fix caching

    * chore: dockerfile improvements

    * build: disable arm64 build

    * build: simplify Dockerfile

    * build(docker): silence apt-get

    * build(github): docer image only for arm

    * chore(Dockerfile): trying to get arm to build

    * build(docker): trying to fix arm build

    * build(docker): fixed image for arm

    * build(docker): refer to correct branch

    * build(github): on PR, build only amd64 image

    * chore: typo

    * chore: typo

    * chore: typo

    * chore: typo

    * build(proto-compiler): use vendored-openssl

    * build(docker): add Alpine docker image to be built

    * build(docker): typo

    * build(github): build only amd64 on non-master branch

    * build(github): enable sccache

    * build(github): enable Github cache for sccache in Docker images

    * build(docker): minor caching fix

    * build(docker): avoid sccache port conflicts on parallel build in github

    * build(github): allow manual run of docker job

    * build(docker): add missing dependency for arm64

    * chore: remove unused dependencies

    * chore: display some stats

    * chore(proto-compiler): use vendored openssl

    * chore: fix comments

    * build(github): don't cache /target to use less space

    * build(github): don't precompile protobuf definitions

    * chore(proto-compiler): replace openssl with openssl-sys

    * Revert "build(github): don't precompile protobuf definitions"

    This reverts commit 8a49d5d.

    * chore(proto-compiler): optimize dependencies

    * refactor(proto-compiler): use ureq instead of reqwest to improve performance

commit 313c683
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Mon Apr 3 12:40:25 2023 +0200

    revert(abci): remove RefUniwndSafe trait from RequestDispatcher (#19)

commit 96878db
Author: lklimek <842586+lklimek@users.noreply.github.com>
Date:   Fri Mar 31 19:13:31 2023 +0200

    refactor(proto-compiler): download protobuf definitions via https instead of git (#18)

    * feat: use submodules instead of git2 crate to get protobuf definitions

    * test(proto): ensure that tenderdash version we use is correct

    * build(github): enable checkout submodules

    * build(github): enable checkout submodules

    * Revert " build(github): enable checkout submodules"

    This reverts commit 2ba1db3.

    * build(github): enable checkout submodules

    * chote(proto-compiler): use git checkout on tenderdash submodule

    * chore(proto-compiler): fix git handling

    * chore(proto-compiler): git fetch update shallow

    * chore(proto-compiler): fetch tags

    * chore(proto-compiler): update submodule as needed

    * chore(proto-compiler): download tenderdash sources zip instead of cloning git repo

    * chore(proto-compiler): create cache (/target) dir if not exist

    * build(github): don't checkout submodules anymore
  • Loading branch information
lklimek committed Mar 20, 2024
1 parent 8ec6ff7 commit 48c7081
Show file tree
Hide file tree
Showing 45 changed files with 2,546 additions and 593 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
/target/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
9 changes: 4 additions & 5 deletions .github/actions/deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ runs:
shell: bash
run: |
curl -Lo /tmp/protoc.zip \
https://github.com/protocolbuffers/protobuf/releases/download/v22.0/protoc-22.0-linux-x86_64.zip
https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip
unzip /tmp/protoc.zip -d ${HOME}/.local
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-directories: |
proto/src/prost
- name: Compile Protobuf definitions

- name: "Compile Protobuf definitions (needed by fmt, doc, etc.)"
shell: bash
run: cargo build -p tenderdash-proto
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache cargo bin
uses: actions/cache@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
tenderdash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/deps
- name: Build source code
shell: bash
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Docker

on:
workflow_dispatch:
pull_request:
paths-ignore:
- "docs/**"
push:
paths-ignore:
- "docs/**"
branches:
- master
- "v*.*.*"

jobs:
build:
strategy:
matrix:
os: [alpine, debian]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: amd64

- name: Set up Docker Build
uses: docker/setup-buildx-action@v2.4.1

# ARM build takes very long time, so we build PRs for AMD64 only
- name: Select target platform
id: select_platforms
run: |
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]] ; then
echo "build_platforms=linux/amd64" >> $GITHUB_ENV
else
echo "build_platforms=linux/amd64,linux/arm64" >> $GITHUB_ENV
fi
- name: Build Docker sample image
id: docker_build
uses: docker/build-push-action@v4.0.0
with:
context: .
file: ./Dockerfile-${{ matrix.os }}
build-args: |
REVISION=${{ github.ref }}
platforms: ${{ env.build_platforms }}
push: false
cache-from: |
type=gha
cache-to: |
type=gha,mode=max
- name: Show Docker image digest
run: echo ${{ steps.docker_build.outputs.digest }}
5 changes: 2 additions & 3 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v2

uses: actions/checkout@v3
- name: Install Rust toolchain and deps
uses: ./.github/actions/deps

Expand All @@ -42,7 +41,7 @@ jobs:
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/deps
- name: Check code formatting
shell: bash
Expand All @@ -32,7 +32,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/deps
- name: Check documentation generation
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
RUST_TEST_TIME_INTEGRATION: "3000,6000"
RUST_TEST_TIME_DOCTEST: "3000,6000"
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- uses: ./.github/actions/deps
with:
toolchain: nightly
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ Cargo.lock
# These are log files emitted by model-based tests
**/*.log

# These are intelj files
.idea

# Proptest regressions dumps
**/*.proptest-regressions
.vscode/launch.json
*.profraw

# Mac spotlight
.DS_Store
Empty file added .gitmodules
Empty file.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]

resolver = "2"
members = ["abci", "proto-compiler", "proto"]
56 changes: 56 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This is an example Dockerfile, demonstrating build process of rs-tenderdash-abci

# rust:alpine3.17, published Mar 24, 2023 at 2:55 am
FROM rust:alpine3.17

RUN apk add --no-cache \
git \
wget \
alpine-sdk \
openssl-dev \
libc6-compat \
perl \
unzip \
bash

SHELL ["/bin/bash", "-c"]

# one of: aarch_64, x86_64
# ARG PROTOC_ARCH=x86_64
ARG TARGETPLATFORM
ARG BUILDPLATFORM

# Install protoc - protobuf compiler
# The one shipped with Alpine does not work
RUN if [[ "$BUILDPLATFORM" == "linux/arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64 ; fi; \
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-${PROTOC_ARCH}.zip && \
unzip -qd /opt/protoc /tmp/protoc.zip && \
rm /tmp/protoc.zip && \
ln -s /opt/protoc/bin/protoc /usr/bin/

# Create a dummy package
RUN cargo init /usr/src/abci-app
WORKDIR /usr/src/abci-app

# Let's display ABCI version instead of "hello world"
RUN sed -i'' -e 's/println!("Hello, world!");/println!("ABCI version: {}",tenderdash_abci::proto::ABCI_VERSION);/' src/main.rs

# revspec or SHA of commit/branch/tag to use
ARG REVISION="refs/heads/master"

# Add tenderdash-abci as a dependency and build the package
#
# Some notes here:
# 1. All these --mount... are to cache reusable info between runs.
# See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
# 2. We add `--config net.git-fetch-with-cli=true` to address ARM build issue,
# see https://github.com/rust-lang/cargo/issues/10781#issuecomment-1441071052
# 3. To preserve space on github cache, we call `cargo clean`.
RUN --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \
cargo add --config net.git-fetch-with-cli=true \
--git https://github.com/dashpay/rs-tenderdash-abci --rev "${REVISION}" tenderdash-abci && \
cargo build --config net.git-fetch-with-cli=true && \
cargo run --config net.git-fetch-with-cli=true && \
cargo clean
47 changes: 47 additions & 0 deletions Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This is an example Dockerfile, demonstrating build process of rs-tenderdash-abci

# We use Debian base image, as Alpine has some segmentation fault issue
FROM rust:bullseye

RUN --mount=type=cache,sharing=locked,target=/var/lib/apt/lists \
--mount=type=cache,sharing=locked,target=/var/cache/apt \
rm -f /etc/apt/apt.conf.d/docker-clean && \
apt-get update -qq && \
apt-get install -qq --yes \
git \
wget \
bash

# Install protoc - protobuf compiler
# The one shipped with Alpine does not work
RUN if [[ "$BUILDPLATFORM" == "linux/arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64 ; fi; \
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-${PROTOC_ARCH}.zip && \
unzip -qd /opt/protoc /tmp/protoc.zip && \
rm /tmp/protoc.zip && \
ln -s /opt/protoc/bin/protoc /usr/bin/

# Create a dummy package
RUN cargo init /usr/src/abci-app
WORKDIR /usr/src/abci-app


# revspec or SHA of commit/branch/tag to use
ARG REVISION="refs/heads/master"

SHELL ["/bin/bash", "-c"]

# Add tenderdash-abci as a dependency and build the package
#
# Some notes here:
# 1. All these --mount... are to cache reusable info between runs.
# See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
# 2. We add `--config net.git-fetch-with-cli=true` to address ARM build issue,
# see https://github.com/rust-lang/cargo/issues/10781#issuecomment-1441071052
# 3. To preserve space on github cache, we call `cargo clean`.
RUN --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \
cargo add --config net.git-fetch-with-cli=true \
--git https://github.com/dashpay/rs-tenderdash-abci --rev "${REVISION}" tenderdash-abci && \
cargo build --config net.git-fetch-with-cli=true && \
cargo clean
63 changes: 52 additions & 11 deletions abci/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
version = "0.14.0-dev.9"
name = "tenderdash-abci"
version = "0.12.0-dev.1"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,29 +13,70 @@ description = """tenderdash-abci provides a simple framework with which to build
low-level applications on top of Tenderdash."""

[features]
default = ["server", "docker-tests"]
default = [
"server",
"docker-tests",
"crypto",
"tcp",
"unix",
"grpc",
"tracing-span",
]
# docker-tests includes integration tests that require docker to be available
docker-tests = ["server"]
server = ["tracing-subscriber/fmt"]
server = [
"tracing-subscriber/fmt",
"dep:tokio",
"dep:tokio-util",
"dep:futures",
]

grpc = ["tenderdash-proto/grpc"]
crypto = ["dep:lhash"]
tcp = ["server"]
unix = ["server"]
tracing-span = ["dep:uuid"]

[[example]]
name = "echo_socket"
required-features = ["server"]

[dependencies]
uuid = { version = "1.4.1", features = ["v4", "fast-rng"], optional = true }
tenderdash-proto = { path = "../proto" }
bytes = { version = "1.0" }
prost = { version = "0.11" }
tenderdash-proto = { version = "0.12.0-dev.1", default-features = false, path = "../proto" }
prost = { version = "0.12" }
tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", optional = true, default-features = false }
thiserror = "1.0.39"
tracing-subscriber = { version = "0.3", optional = true, default-features = false, features = [
"ansi",
"env-filter",
] }
thiserror = { version = "1.0.39" }
url = { version = "2.3.1" }
semver = { version = "1.0.17" }
lhash = { version = "1.0.1", features = ["sha256"], optional = true }
hex = { version = "0.4" }
tokio-util = { version = "0.7.8", features = [
"net",
"codec",
], default-features = false, optional = true }
tokio = { version = "1.28", features = [
"net",
"io-util",
"rt-multi-thread",
"sync",
"macros",
], default-features = false, optional = true }
futures = { version = "0.3.28", optional = true }

[dev-dependencies]
anyhow = "1.0.69"
bincode = "2.0.0-rc.2"
blake2 = "0.10.6"
bollard = { version = "0.14.0" }
anyhow = { version = "1.0.69" }
bincode = { version = "2.0.0-rc.2" }
blake2 = { version = "0.10.6" }
bollard = { version = "0.16.0" }
futures = { version = "0.3.26" }
tokio = { version = "1", features = ["macros", "signal", "time", "io-std"] }
hex = { version = "0.4" }
lazy_static = { version = "1.4" }
# For tests of gRPC server
tonic = { version = "0.11" }
Loading

0 comments on commit 48c7081

Please sign in to comment.