Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector-iroha2): sending transactions signed on the client-side #2168

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@
"vscc",
"wasm",
"Xdai",
"goquorum"
"goquorum",
"hada",
"undici"
],
"dictionaries": [
"typescript,node,npm,go,rust"
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,33 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-iroha2:
continue-on-error: false
env:
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: false
TAPE_TEST_RUNNER_DISABLED: true
needs: build-dev
runs-on: ubuntu-20.04
steps:
- name: Use Node.js v16.14.2
uses: actions/setup-node@v2.1.2
with:
node-version: v16.14.2
- uses: actions/checkout@v2.3.4
- id: yarn-cache-dir-path
name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v3.0.4
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
restore-keys: |
${{ runner.os }}-yarn-
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-quorum:
continue-on-error: false
env:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/iroha2-all-in-one-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: iroha2-all-in-one-publish

on:
push:
# Publish `main` as Docker `latest` image.
branches:
- main

# Publish `v1.2.3` tags as releases.
tags:
- v*

env:
IMAGE_NAME: cactus-iroha2-all-in-one

jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
build-tag-push-container:
runs-on: ubuntu-20.04
env:
DOCKER_BUILDKIT: 1
DOCKERFILE_PATH: ./tools/docker/iroha2-all-in-one/Dockerfile
DOCKER_BUILD_DIR: ./tools/docker/iroha2-all-in-one/
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v2.4.0

- name: Build image
run: docker build $DOCKER_BUILD_DIR --file $DOCKERFILE_PATH --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"

- name: Log in to registry
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
SHORTHASH=$(git rev-parse --short "$GITHUB_SHA")
TODAYS_DATE="$(date +%F)"
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Do not use the `latest` tag at all, tag with date + git short hash if there is no git tag
[ "$VERSION" == "main" ] && VERSION=$DOCKER_TAG
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ bin/
lerna-debug.log
cactus-openapi-spec.json
cactus-openapi-spec-*.json
.npmrc
*.log
build/
.gradle/
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@iroha2:registry=https://nexus.iroha.tech/repository/npm-group/
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ export interface ISocketApiClient<BlockType> {
args: any,
): Promise<any>;

watchBlocksV1?(
monitorOptions?: Record<string, unknown>,
): Observable<BlockType>;
watchBlocksV1?(monitorOptions?: any): Observable<BlockType>;

watchBlocksAsyncV1?(
monitorOptions?: Record<string, unknown>,
): Promise<Observable<BlockType>>;
watchBlocksAsyncV1?(monitorOptions?: any): Promise<Observable<BlockType>>;
}
Loading