Skip to content

Commit af19f0e

Browse files
lklimekshumkov
andauthored
refactor(dapi): rewrite dapi in Rust as rs-dapi (#2716)
Co-authored-by: Ivan Shumkov <[email protected]>
1 parent 4e31884 commit af19f0e

File tree

159 files changed

+18439
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+18439
-373
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex; \
6363
rm /tmp/cargo-binstall; \
6464
cargo binstall -V
6565
66-
RUN cargo binstall [email protected].100 --locked \
66+
RUN cargo binstall [email protected].103 --locked \
6767
--no-discover-github-token \
6868
--disable-telemetry \
6969
--no-track \

.github/actions/local-network/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ runs:
8282
docker pull ${{ inputs.image_org }}/dashmate-helper:$SHA_TAG
8383
docker tag ${{ inputs.image_org }}/dashmate-helper:$SHA_TAG dashpay/dashmate-helper:$VERSION
8484
85-
# Replace DAPI and Drive images with new org and tag in dashmate config
86-
sed -i -E "s/dashpay\/(drive|dapi):[^\"]+/${{ inputs.image_org }}\/\1:${SHA_TAG}/g" ${{ env.HOME }}/.dashmate/config.json
85+
# Replace Drive, DAPI, and RS-DAPI images with new org and tag in dashmate config
86+
sed -i -E "s/dashpay\/(drive|dapi|rs-dapi):[^\"]+/${{ inputs.image_org }}\/\1:${SHA_TAG}/g" ${{ env.HOME }}/.dashmate/config.json
8787
8888
cat ${{ env.HOME }}/.dashmate/config.json
8989

.github/package-filters/rs-packages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ rs-dapi-client: &dapi_client
6969
- packages/rs-dapi-client/**
7070
- *dapi_grpc
7171

72+
rs-dapi:
73+
- .github/workflows/tests*
74+
- packages/rs-dapi/**
75+
- *dapi_grpc
76+
- *dpp
77+
7278
dash-sdk: &sdk
7379
- .github/workflows/tests*
7480
- packages/rs-drive-proof-verifier/**

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
scopes: |
3535
sdk
3636
dapi
37+
rs-dapi
3738
platform
3839
drive
3940
drive-abci

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
7171

7272
- name: Install wasm-bindgen-cli
73-
run: cargo binstall [email protected].100
73+
run: cargo binstall [email protected].103
7474
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
7575

7676
- name: Install wasm-pack
@@ -191,6 +191,18 @@ jobs:
191191
target: dapi
192192
tag: ${{ inputs.tag || github.event.release.tag_name }}
193193

194+
release-rs-dapi-image:
195+
name: Release RS-DAPI image
196+
if: ${{ !inputs.only_drive }}
197+
secrets: inherit
198+
uses: ./.github/workflows/release-docker-image.yml
199+
with:
200+
name: RS-DAPI
201+
image_org: dashpay
202+
image_name: rs-dapi
203+
target: rs-dapi
204+
tag: ${{ inputs.tag || github.event.release.tag_name }}
205+
194206
release-test-suite-image:
195207
name: Release Test Suite image
196208
if: ${{ !inputs.only_drive }}

.github/workflows/tests-build-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
5555

5656
- name: Install wasm-bindgen-cli
57-
run: cargo binstall [email protected].100
57+
run: cargo binstall [email protected].103
5858
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
5959

6060
- name: Install wasm-pack

.github/workflows/tests-dashmate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ jobs:
6767
docker pull $DOCKER_HUB_ORG/dapi:$SHA_TAG
6868
docker tag $DOCKER_HUB_ORG/dapi:$SHA_TAG $DAPI_IMAGE_AND_VERSION
6969
70+
# RS-DAPI
71+
RS_DAPI_IMAGE_AND_VERSION=$(yarn dashmate config get --config=local platform.dapi.rsDapi.docker.image)
72+
docker pull $DOCKER_HUB_ORG/rs-dapi:$SHA_TAG
73+
docker tag $DOCKER_HUB_ORG/rs-dapi:$SHA_TAG $RS_DAPI_IMAGE_AND_VERSION
74+
7075
# Dashmate helper image is hardcoded so we replace it with the built one
7176
VERSION=$(cat package.json | jq -r '.version')
7277
docker pull $DOCKER_HUB_ORG/dashmate-helper:$SHA_TAG

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
types: [opened, synchronize, reopened, ready_for_review]
77
branches:
88
- master
9-
- 'v*-dev'
9+
- "v*-dev"
1010
push:
1111
branches:
1212
- master
13-
- 'v*-dev'
13+
- "v*-dev"
1414
schedule:
1515
- cron: "30 4 * * *"
1616

@@ -81,6 +81,9 @@ jobs:
8181
- name: DAPI
8282
image_name: dapi
8383
target: dapi
84+
- name: RS-DAPI
85+
image_name: rs-dapi
86+
target: rs-dapi
8487
- name: Dashmate helper
8588
image_name: dashmate-helper
8689
target: dashmate-helper
@@ -102,7 +105,7 @@ jobs:
102105
uses: ./.github/workflows/tests-rs-package.yml
103106
with:
104107
package: ${{ matrix.rs-package }}
105-
check-each-feature: ${{ contains(fromJSON('["dash-sdk","rs-dapi-client","dapi-grpc","dpp","drive-abci"]'), matrix.rs-package) }}
108+
check-each-feature: ${{ contains(fromJSON('["dash-sdk","rs-dapi-client","rs-dapi","dapi-grpc","dpp","drive-abci"]'), matrix.rs-package) }}
106109
direct-packages: ${{ needs.changes.outputs.rs-packages-direct }}
107110

108111
rs-crates-security:
-23.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)