Skip to content

Commit a3d9a13

Browse files
committed
Merge branch 'master' into feature/NODE-4864-deregister-payment-tracker-on-exception
1 parent 2e33f9f commit a3d9a13

File tree

364 files changed

+17111
-10148
lines changed

Some content is hidden

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

364 files changed

+17111
-10148
lines changed

.github/workflows/blockchain-contracts.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
image: litptcl/anvil-lit:latest
4444
ports:
4545
- 8545:8545
46+
- 8549:8549
4647
credentials:
4748
username: ${{ vars.DOCKERHUB_USERNAME }}
4849
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -70,6 +71,7 @@ jobs:
7071
image: litptcl/anvil-lit:latest
7172
ports:
7273
- 8545:8545
74+
- 8549:8549
7375
credentials:
7476
username: ${{ vars.DOCKERHUB_USERNAME }}
7577
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/list-changed-files.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
- rust/lit-node/**
7575
- .github/workflows/rust-lit-node-unit-tests.yml
7676
- .github/workflows/rust-lit-node-integration-tests.yml
77-
- .github/workflows/rust-lit-node-version-upgrade-tests.yml
7877
- .github/workflows/rust-lit-node-fault-tests.yml
7978
- .github/workflows/rust-lit-node-long-running-tests.yml
8079
- .github/workflows/rust-lit-node-clippy.yml

.github/workflows/rust-lit-node-fault-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
image: litptcl/anvil-lit:latest
6060
ports:
6161
- 8545:8545
62+
- 8549:8549
6263
credentials:
6364
username: ${{ vars.DOCKERHUB_USERNAME }}
6465
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/rust-lit-node-group-unit-and-integration-tests.yml

Lines changed: 35 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# This workflow groups up the unit tests, the standard node build, and the tests that use the standard node build (integration tests, version upgrade tests)
22
name: rust-lit-node-group-unit-and-integration-tests
33
on:
4-
workflow_dispatch: {}
4+
workflow_dispatch:
5+
inputs:
6+
enable_version_upgrade_tests:
7+
description: 'Enable version upgrade tests?'
8+
type: boolean
9+
default: false
510
workflow_call:
611
push:
712
paths:
813
- rust/lit-node/lit-node/**
914
- .github/workflows/rust-lit-node-integration-tests.yml
1015
- .github/workflows/rust-lit-node-build.yml
1116
- .github/workflows/rust-lit-node-unit-tests.yml
12-
- .github/workflows/rust-lit-node-version-upgrade-tests.yml
1317
- .github/workflows/rust-lit-node-group-unit-and-integration-tests.yml
1418
- scripts/github/**
1519
branches:
@@ -50,13 +54,14 @@ jobs:
5054
lit_node_unit_tests:
5155
needs: build-if-needed
5256
runs-on: warp-ubuntu-latest-x64-8x # change to LargeRunner to run on github. Change to self-hosted to run on our own runner. Change to buildjet-8vcpu-ubuntu-2204 to run on buildjet with 8 cpus
53-
timeout-minutes: 40
57+
timeout-minutes: 30
5458

5559
services:
5660
anvil:
5761
image: litptcl/anvil-lit:latest
5862
ports:
5963
- 8545:8545
64+
- 8549:8549
6065
credentials:
6166
username: ${{ vars.DOCKERHUB_USERNAME }}
6267
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -100,13 +105,14 @@ jobs:
100105
timeout-minutes: 45
101106
strategy:
102107
matrix:
103-
partition: [1, 2, 3]
108+
partition: [1, 2, 3, 4]
104109

105110
services:
106111
anvil:
107112
image: litptcl/anvil-lit:latest
108113
ports:
109114
- 8545:8545
115+
- 8549:8549
110116
credentials:
111117
username: ${{ vars.DOCKERHUB_USERNAME }}
112118
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -146,34 +152,22 @@ jobs:
146152
run: zstd -d -c nextest-archive.tar.zst | tar xf -
147153
- name: Setup local files for testing
148154
run: make setup-local-files
149-
- name: Copy lit-node binary to Shiva target directory
150-
run: |
151-
mkdir -p ${{github.workspace}}/rust/lit-node/shiva/target/debug
152-
cp ${{github.workspace}}/rust/lit-node/lit-node/target/debug/lit_node ${{github.workspace}}/rust/lit-node/shiva/target/debug/lit_node
153-
- name: Run Shiva Integration tests
154-
run: |
155-
mv ${{github.workspace}}/rust/lit-node/lit-node/rpc-config.example.yaml ./rpc-config.yaml
156-
cargo nextest run --final-status-level pass --no-capture --
157-
working-directory: ${{github.workspace}}/rust/lit-node/shiva
158155
- name: Run acceptance, component and integration tests.
159-
run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile integration-tests -E 'test(/^acceptance|^component|^integration|^sdk/) - test(/long/)' --partition count:${{ matrix.partition }}/3 --nocapture --"
160-
# after the standard build is done, run the upgrade tests
161-
lit_node_version_upgrade_tests:
156+
run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile integration-tests -E 'test(/^acceptance|^component|^integration|^sdk/) - test(/long/)' --partition count:${{ matrix.partition }}/4 --nocapture --"
157+
158+
159+
# after the standard build is done, run the other integration tests
160+
lit_node_other_tests:
162161
needs: build-if-needed
163-
runs-on: warp-ubuntu-latest-x64-16x # change to LargeRunner to run on github. Change to self-hosted to run on our own runner. Change to buildjet-8vcpu-ubuntu-2204 to run on buildjet with 8 cpus
164-
# TODO: enable this when you want to turn on version upgrade tests. there's also another spot below where you have to remove a hardcoded "false" with a comment like this.
165-
# To enable, change the condition below to: if: ${{ true }} or remove the if line entirely
166-
if: ${{ github.event_name == 'never' }}
167-
timeout-minutes: 60
168-
strategy:
169-
matrix:
170-
partition: [1, 2, 3]
162+
runs-on: warp-ubuntu-latest-x64-8x # change to LargeRunner to run on github. Change to self-hosted to run on our own runner. Change to buildjet-8vcpu-ubuntu-2204 to run on buildjet with 8 cpus
163+
timeout-minutes: 45
171164

172165
services:
173166
anvil:
174167
image: litptcl/anvil-lit:latest
175168
ports:
176169
- 8545:8545
170+
- 8549:8549
177171
credentials:
178172
username: ${{ vars.DOCKERHUB_USERNAME }}
179173
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -185,8 +179,10 @@ jobs:
185179
- name: Checkout lit-assets
186180
uses: actions/checkout@v6
187181
with:
188-
fetch-depth: 0
189182
submodules: recursive
183+
- uses: de-vri-es/setup-git-credentials@v2
184+
with:
185+
credentials: https://glitch003:${{secrets.READ_ONLY_PAT}}@github.com/
190186
- name: Use Node.js
191187
uses: WarpBuilds/setup-node@v4
192188
with:
@@ -199,11 +195,7 @@ jobs:
199195
- name: Run npx hardhat compile for blockchain/contracts
200196
working-directory: ${{ github.workspace }}/blockchain/contracts
201197
run: npx hardhat compile
202-
- name: Install rust because the version upgrade tests do a recompile
203-
uses: dtolnay/rust-toolchain@master
204-
with:
205-
toolchain: '1.91' # keep in sync with rust/lit-node/rust-toolchain.toml
206-
components: rust-src
198+
- run: mkdir -p ~/.cargo/bin
207199
- name: Install nextest
208200
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin"
209201
- name: Download archive
@@ -213,68 +205,28 @@ jobs:
213205
key: nextest-archive-${{ github.sha }}-lit-actions|testing
214206
- name: Unzip archive so that we can get the lit_node binary
215207
run: zstd -d -c nextest-archive.tar.zst | tar xf -
216-
# Get the workflow run that has the latest build for target branches.
217-
- name: Get the latest workflow run ID
218-
id: get_latest_workflow_run_id
219-
run: |
220-
echo "LATEST_WORKFLOW_RUN_ID_HABANERO=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-habanero-*')" >> "$GITHUB_OUTPUT"
221-
echo "LATEST_WORKFLOW_RUN_ID_MANZANO=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-manzano-*')" >> "$GITHUB_OUTPUT"
222-
echo "LATEST_WORKFLOW_RUN_ID_CAYENNE=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-cayenne-*')" >> "$GITHUB_OUTPUT"
223-
env:
224-
GH_PAT: ${{ secrets.GITHUB_TOKEN }}
225-
RUST_LOG: debug
226-
- name: Get the latest commit SHA
227-
id: get_latest_commit_sha
228-
run: |
229-
echo "COMMIT_SHA_HABANERO=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-habanero-*')" >> "$GITHUB_OUTPUT"
230-
echo "COMMIT_SHA_MANZANO=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-manzano-*')" >> "$GITHUB_OUTPUT"
231-
echo "COMMIT_SHA_CAYENNE=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-cayenne-*')" >> "$GITHUB_OUTPUT"
232-
env:
233-
RUST_LOG: debug
234-
- name: Download the latest build for release-habanero-* branch
235-
uses: actions/download-artifact@v7
236-
with:
237-
name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }}
238-
run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_HABANERO }}
239-
github-token: ${{ secrets.GITHUB_TOKEN }}
240-
path: rust/lit-node/lit-node/
241-
- name: Move the downloaded binary
242-
run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }}
243-
- name: Download the latest build for release-manzano-* branch
244-
uses: actions/download-artifact@v7
245-
with:
246-
name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }}
247-
run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_MANZANO }}
248-
github-token: ${{ secrets.GITHUB_TOKEN }}
249-
path: rust/lit-node/lit-node/
250-
- name: Move the downloaded binary
251-
run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }}
252-
- name: Download the latest build for release-cayenne-* branch
253-
uses: actions/download-artifact@v7
254-
with:
255-
name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }}
256-
run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_CAYENNE }}
257-
github-token: ${{ secrets.GITHUB_TOKEN }}
258-
path: rust/lit-node/lit-node/
259-
- name: Move the downloaded binary
260-
run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }}
261-
- name: Enable execute permissions for the binary
262-
run: |
263-
chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }}
264-
chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }}
265-
chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }}
266208
- name: Setup local files for testing
267209
run: make setup-local-files
210+
- name: Copy lit-node binary to Shiva target directory
211+
run: |
212+
mkdir -p ${{github.workspace}}/rust/lit-node/shiva/target/debug
213+
cp ${{github.workspace}}/rust/lit-node/lit-node/target/debug/lit_node ${{github.workspace}}/rust/lit-node/shiva/target/debug/lit_node
214+
- name: Run Shiva Integration tests
215+
run: |
216+
mv ${{github.workspace}}/rust/lit-node/lit-node/rpc-config.example.yaml ./rpc-config.yaml
217+
cargo nextest run --final-status-level pass --no-capture --
218+
working-directory: ${{github.workspace}}/rust/lit-node/shiva
268219
- name: Run acceptance, component and integration tests.
269-
run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile version-upgrade-tests -E 'test(/^upgrades/)' --partition count:${{ matrix.partition }}/3 --nocapture --"
270-
220+
run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile integration-tests -E 'test(/^edge/) - test(/long/)' --nocapture --"
221+
222+
271223
# AND together the results
272224
check_status:
273225
needs:
274226
[
275227
lit_node_unit_tests,
276228
lit_node_integration_tests,
277-
lit_node_version_upgrade_tests,
229+
lit_node_other_tests,
278230
]
279231
runs-on: ubuntu-latest
280232
steps:
@@ -289,10 +241,4 @@ jobs:
289241
echo "Integration tests failed"
290242
exit 1
291243
fi
292-
# TODO: enable this when you want to turn on version upgrade tests
293-
# To enable, uncomment the check below (and enable the job above)
294-
# if [ ${{ needs.lit_node_version_upgrade_tests.result }} != 'success' ]; then
295-
# echo "Version upgrade tests failed"
296-
# exit 1
297-
# fi
298244
echo "All tests passed"

.github/workflows/rust-lit-node-long-running-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
image: litptcl/anvil-lit:latest
5858
ports:
5959
- 8545:8545
60+
- 8549:8549
6061
credentials:
6162
username: ${{ vars.DOCKERHUB_USERNAME }}
6263
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/rust-lit-node-perf-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
image: litptcl/anvil-lit:latest
5858
ports:
5959
- 8545:8545
60+
- 8549:8549
6061
credentials:
6162
username: ${{ vars.DOCKERHUB_USERNAME }}
6263
password: ${{ secrets.DOCKERHUB_TOKEN }}

blockchain/contracts/abis/BackupRecovery.abi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@
833833
"internalType": "bytes",
834834
"name": "sessionId",
835835
"type": "bytes"
836+
},
837+
{
838+
"internalType": "string",
839+
"name": "keySetId",
840+
"type": "string"
836841
}
837842
],
838843
"name": "registerRecoveryKeys",

blockchain/contracts/abis/PKPHelper.abi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,19 @@
568568
"stateMutability": "view",
569569
"type": "function"
570570
},
571+
{
572+
"inputs": [],
573+
"name": "getPubkeyRouterAddress",
574+
"outputs": [
575+
{
576+
"internalType": "address",
577+
"name": "",
578+
"type": "address"
579+
}
580+
],
581+
"stateMutability": "view",
582+
"type": "function"
583+
},
571584
{
572585
"inputs": [
573586
{

0 commit comments

Comments
 (0)