Compare commits

...

21 Commits

Author SHA1 Message Date
farbanas fbc8fa24c4 add yarn install 2023-02-27 13:10:09 +01:00
farbanas bafefbf8a6 trying to fix workflow on our custom mac runner 2023-02-27 13:04:58 +01:00
farbanas 09c0a74107 chore: changed mac runner to our new custom one 2023-02-27 11:31:58 +01:00
farbanas 1ba6444e72 delete gitlab agent 2023-02-27 10:10:42 +01:00
farbanas dc08b1170a add gitlab agent 2023-02-27 10:03:28 +01:00
Tommy Verrall aa78bf702c Merge pull request #3104 from nymtech/feature/nym-api-tests
some small api test fixes
2023-02-24 15:09:32 +02:00
benedettadavico cd9cdfa5bb some small api test fixes 2023-02-24 14:06:56 +01:00
Pierre Dommerc 7e1e86bc77 build(nc-mobile): prepare for fdroid inclusion (#3102)
* ci(nc-android): remove uneeded deps

* chore(nc-mobile): improve android build

* ci(nc-mobile): remove useless system deps

* ci(nc-mobile): remove useless system deps

* Revert "ci(nc-mobile): remove useless system deps"

This reverts commit 011db2c58e.

* ci(nc-mobile): restore uneeded sys deps (<3 debian based distro)
2023-02-24 14:06:41 +01:00
Raphaël Walther 2178f2b509 Github Actions: fix notification display issue 2023-02-24 11:12:53 +01:00
Tommy Verrall 8ed808124e Update build-and-upload-binaries-ci.yml
publish credential binary
2023-02-23 17:15:32 +01:00
Tommy Verrall 0deef37778 Update ci-binary-checker.yml
correct positioning on install
2023-02-23 16:56:25 +01:00
Tommy Verrall d759462e4e Update ci-binary-checker.yml
install jq
2023-02-23 16:53:23 +01:00
Tommy Verrall f36cb3a00b Update ci-binary-checker.yml
use custom runner
2023-02-23 16:50:02 +01:00
Tommy Verrall 6428f90b5a Update README.md 2023-02-23 15:38:20 +01:00
Tommy Verrall e2d00fb002 Merge pull request #3098 from nymtech/feature/update-checker-to-use-master
Feature/update checker to use master
2023-02-23 16:37:37 +02:00
Tommy Verrall dc556706c1 Update ci-binary-checker.yml
update the to run from the branch
2023-02-23 13:25:46 +01:00
Tommy Verrall 18a3366cf3 Update ci-binary-checker.yml 2023-02-23 12:37:41 +01:00
Tommy Verrall ea161329dc Update ci-binary-checker.yml
testing manually the changes for the timebeing
2023-02-23 12:34:26 +01:00
Tommy Verrall 02a621ed8b Update ci-binary-checker.yml 2023-02-23 12:16:50 +01:00
Tommy Verrall 5784e7519f Merge pull request #3096 from nymtech/binary-checker-action
Create ci-binary-checker.yml
2023-02-23 13:12:25 +02:00
Tommy Verrall 323d5fbb3c Create ci-binary-checker.yml 2023-02-23 12:10:39 +01:00
33 changed files with 244 additions and 141 deletions
@@ -69,7 +69,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release
args: --workspace --release --all
- name: Install Rust stable
uses: actions-rs/toolchain@v1
@@ -95,7 +95,8 @@ jobs:
cp target/release/nym-network-requester $OUTPUT_DIR
cp target/release/nym-network-statistics $OUTPUT_DIR
cp target/release/nym-cli $OUTPUT_DIR
cp target/release/credential $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR
+56
View File
@@ -0,0 +1,56 @@
name: Run config checks on all binaries
on:
workflow_dispatch:
release:
types: [created]
push:
paths:
- 'clients/**'
- 'common/**'
- 'contracts/**'
- 'integrations/**'
- 'mixnode/**'
- 'sdk/rust/nym-sdk/**'
- 'service-providers/**'
pull_request:
paths:
- 'clients/**'
- 'common/**'
- 'gateway/**'
- 'integrations/**'
- 'mixnode/**'
- 'sdk/rust/nym-sdk/**'
- 'service-providers/**'
env:
NETWORK: mainnet
jobs:
publish-nym:
strategy:
fail-fast: false
matrix:
platform: [custom-runner-linux]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get -y install jq vim libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
continue-on-error: true
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Run tests against binaries
run: ./build_and_run.sh ${{ github.head_ref || github.ref_name }}
working-directory: tests/
+7 -3
View File
@@ -23,15 +23,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -y install \
libwebkit2gtk-4.0-dev \
build-essential \
unzip \
curl \
wget \
libssl-dev \
libgtk-3-dev \
squashfs-tools \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Checkout
@@ -64,6 +61,11 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# TODO this step takes a considerable amount of time
# We could avoid to compile from source tauri-cli and use instead
# pre-compiled binary provided by the node package `@tauri-apps/cli`
# But when using the later the build fails for some reason
# so keep installing and using tauri-cli
- name: Install tauri cli
run: cargo install tauri-cli --version "^2.0.0-alpha.2"
@@ -93,11 +95,13 @@ jobs:
- name: Build APK
working-directory: nym-connect/mobile
env:
# NODE_TAURI_CLI=${{ github.workspace }}/nym-connect/mobile/node_modules/.bin/tauri
ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }}
WRY_ANDROID_PACKAGE: net.nymtech.nym_connect
WRY_ANDROID_LIBRARY: nym_connect
# TODO build with release profile (--release), it will requires
# to sign the APK. For now build with debug profile to avoid that
# TODO build using `yarn tauri`, provide NODE_TAURI_CLI, see TODO notes above
run: cargo tauri android build --debug --apk --split-per-abi -t aarch64
# TODO add the version number to APK name
-1
View File
@@ -49,7 +49,6 @@ jobs:
librsvg2-dev \
libsoup-3.0-dev \
libjavascriptcoregtk-4.1-dev
#continue-on-error: true
- name: Checkout
uses: actions/checkout@v3
@@ -10,11 +10,11 @@ defaults:
jobs:
publish-tauri:
if: ${{ startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release' }}
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
platform: [macos-latest]
platform: [custom-runner-mac-m1]
runs-on: ${{ matrix.platform }}
steps:
@@ -24,10 +24,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup yarn
run: npm install -g yarn
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install the Apple developer certificate for code signing
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
@@ -39,7 +44,7 @@ jobs:
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output=$CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
@@ -1,9 +1,14 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> 🔴 **FAILURE** :cry:
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message:
```
@@ -1,10 +1,16 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View output:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
>
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION_STORYBOOK }}.{{ env.NYM_CI_WWW_BASE }}
>
> ✅ **SUCCESS**
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
@@ -151,7 +151,7 @@ async function getMessageBody(context) {
return `${icon} ${job.conclusion}: ${job.name} - ${job.html_url}`;
})
// and join with newlines for display in the template
.join('\n');
.join('\n\n');
return template({ ...context, jobResults });
}
@@ -1,9 +1,15 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> 🔴 **FAILURE** :cry:
>
> `when` {{ timestamp }}
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
{{ jobResults }}
@@ -1,9 +1,15 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> ✅ **SUCCESS**
>
> `when` {{ timestamp }}
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
{{ jobResults }}
{{ jobResults }}
@@ -5,6 +5,7 @@ const localStorage = new LocalStorage('./scratch');
const {
LocalStorageCryptoStore,
} = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store');
var showdown = require('showdown');
// hide all matrix client output
console.error = (error) => console.log('❌ error: ', error);
@@ -54,7 +55,9 @@ function createClient(context, room, message) {
}
async function sendMatrixMessage(contextArg, messageAsMarkdown, roomId) {
const client = createClient(contextArg, roomId, messageAsMarkdown);
const converter = new showdown.Converter();
const messageAsHtml = converter.makeHtml(messageAsMarkdown);
const client = createClient(contextArg, roomId, messageAsHtml);
await client.initCrypto();
await client.startClient({ initialSyncLimit: 1 });
}
@@ -1,9 +1,14 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> 🔴 **FAILURE** :cry:
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message:
```
@@ -1,9 +1,14 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }} ➡️➡️➡️➡️➡️ **View storybook:** https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}/
>
> ✅ **SUCCESS**
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
@@ -1,9 +1,14 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> 🔴 **FAILURE** :cry:
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message:
```
@@ -1,13 +1,18 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> ✅ **SUCCESS**
>
> ➡️➡️➡️➡️➡️ **View output:**
>
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
@@ -17,6 +17,7 @@
"remark-emoji": "^2.2.0",
"remark-html": "^13.0.2",
"remark-parse": "^9.0.0",
"showdown": "^2.1.0",
"to-vfile": "^6.1.0",
"unified": "^9.2.2"
},
@@ -1,9 +1,14 @@
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> 🔴 **FAILURE** :cry:
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message:
```
@@ -1,14 +1,20 @@
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
> :rocket: {{ env.NYM_PROJECT_NAME }}
>
> ✅ **SUCCESS**
>
> ➡️➡️➡️➡️➡️ **View output:**
>
> `storybook`: https://{{ env.NYM_CI_WWW_LOCATION }}.{{ env.NYM_CI_WWW_BASE }}
>
> `example`: https://{{ env.NYM_CI_WWW_LOCATION }}-example.{{ env.NYM_CI_WWW_BASE }}
>
> `branch` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/tree/{{ env.GIT_BRANCH_NAME }}
>
> `commit` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }}
>
> `build ` {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
>
Commit message by `{{ env.GITHUB_ACTOR }}` at {{ timestamp }}:
```
@@ -34,7 +34,7 @@ describe("Get mixnode data", (): void => {
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number");
expect(typeof mixnode.bond_information.mix_node.mix_port).toBe("number");
expect(mixnode.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(mixnode.bond_information.mix_node.verloc_port).toStrictEqual(1790);
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number");
const identitykey = mixnode.bond_information.mix_node.identity_key;
if (typeof identitykey === "string") {
@@ -96,7 +96,7 @@ describe("Get mixnode data", (): void => {
expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number");
expect(typeof mixnode.mixnode_details.bond_information.mix_node.mix_port).toBe("number");
expect(mixnode.mixnode_details.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(mixnode.mixnode_details.bond_information.mix_node.verloc_port).toStrictEqual(1790);
expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number");
const identitykey2 = mixnode.mixnode_details.bond_information.mix_node.identity_key
if (typeof identitykey2 === "string") {
@@ -15,19 +15,24 @@ describe("Get gateway data", (): void => {
response.forEach((x) => {
expect(typeof x.gateway_bond.owner).toBe("string");
expect(typeof x.performance).toBe("string");
expect(typeof x.node_performance.last_24h).toBe("string");
});
});
it("Get a gateway history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayHistory(identity_key);
response.history.forEach((x) => {
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
if ("identity" in response) {
response.history.forEach((x) => {
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
} else if ("message" in response) {
expect(response.message).toContain("could not find uptime history associated with gateway");
}
});
it("Get gateway core status count", async (): Promise<void> => {
@@ -39,13 +39,16 @@ describe("Get mixnode data", (): void => {
const identity_key = config.environmnetConfig.mix_id;
const response = await status.getMixnodeHistory(identity_key);
response.history.forEach((x) => {
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(identity_key).toStrictEqual(response.mix_id);
expect(typeof response.owner).toBe("string");
if ("mix_id" in response) {
response.history.forEach((x) => {
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(identity_key).toStrictEqual(response.mix_id);
expect(typeof response.owner).toBe("string");
} else if ("message" in response) {
expect(response.message).toContain("could not find uptime history associated with mixnode");
}
});
it("Get a mixnode core count", async (): Promise<void> => {
@@ -109,7 +112,7 @@ describe("Compute mixnode reward estimation", (): void => {
config = ConfigHandler.getInstance();
});
it("with correct data", async (): Promise<void> => {
const response = await status.sendMixnodeRewardEstimatedComputation(7);
const response = await status.sendMixnodeRewardEstimatedComputation(63);
expect(typeof response.estimation.delegates).toBe("string");
});
+1 -1
View File
@@ -4,7 +4,7 @@ common:
Content-Type: application/json
qa:
api_base_url: https://qwerty-validator-api.qa.nymte.ch/api/v1
mix_id: 7
mix_id: 63
identity_key: 4Yr4qmEHd9sgsuQ83191FR2hD88RfsbMmB4tzhhZWriz
gateway_identity: 336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9
log_level: error
+3 -2
View File
@@ -7,6 +7,7 @@ import {
InclusionProbabilities,
InclusionProbability,
NodeHistory,
NoUptime,
Report,
RewardEstimation,
StakeSaturation,
@@ -36,7 +37,7 @@ export default class Status extends APIClient {
return response.data;
}
public async getGatewayHistory(identity_key: string): Promise<NodeHistory> {
public async getGatewayHistory(identity_key: string): Promise<NodeHistory | NoUptime> {
const response = await this.restClient.sendGet({
route: `/gateway/${identity_key}/history`,
});
@@ -111,7 +112,7 @@ export default class Status extends APIClient {
return response.data;
}
public async getMixnodeHistory(mix_id: number): Promise<NodeHistory> {
public async getMixnodeHistory(mix_id: number): Promise<NodeHistory | NoUptime> {
const response = await this.restClient.sendGet({
route: `/mixnode/${mix_id}/history`,
});
+18 -7
View File
@@ -27,13 +27,6 @@ export interface Node {
in_active_set: boolean;
}
export interface RewardEstimation {
estimation: Estimation;
reward_params: RewardParams;
epoch: Epoch;
as_at: number;
}
export interface Estimation {
total_node_reward: string;
operator: string;
@@ -41,6 +34,13 @@ export interface Estimation {
operating_cost: string;
}
export interface RewardEstimation {
estimation: Estimation;
reward_params: RewardParams;
epoch: Epoch;
as_at: number;
}
export interface RewardParams {
interval: Interval;
rewarded_set_size: number;
@@ -129,6 +129,10 @@ export interface NodeHistory {
history: History[];
}
export interface NoUptime {
message: string;
}
export interface CoreCount {
mix_id: number;
identity: string;
@@ -162,9 +166,16 @@ export interface GatewayBond {
proxy?: any;
}
export interface nodePerformance {
most_recent: string;
last_hour: string;
last_24h: string;
}
export interface DetailedGateway {
gateway_bond: GatewayBond;
performance: string;
node_performance: nodePerformance;
}
export interface OriginalPledge {
+2 -1
View File
@@ -26,7 +26,8 @@
"clean:dist": "rm -rf dist",
"clean:node": "rm -rf node_modules",
"clean:rust": "cargo clean --manifest-path src-tauri/Cargo.toml",
"clean:": "run-p clean:node clean:rust"
"clean:android": "cd src-tauri/gen/android/nym_connect/ && gradlew clean",
"clean:": "run-p clean:node clean:rust clean:android"
},
"dependencies": {
"@emotion/react": "^11.7.0",
@@ -1,41 +0,0 @@
[build]
target = 'x86_64-unknown-linux-gnu'
[target.aarch64-linux-android]
linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang'
rustflags = [
'-L',
'/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo',
'-Clink-arg=-landroid',
'-Clink-arg=-llog',
'-Clink-arg=-lOpenSLES',
]
[target.armv7-linux-androideabi]
linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang'
rustflags = [
'-L',
'/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo',
'-Clink-arg=-landroid',
'-Clink-arg=-llog',
'-Clink-arg=-lOpenSLES',
]
[target.i686-linux-android]
linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android24-clang'
rustflags = [
'-L',
'/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo',
'-Clink-arg=-landroid',
'-Clink-arg=-llog',
'-Clink-arg=-lOpenSLES',
]
[target.x86_64-linux-android]
linker = '/home/pierre/.local/share/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang'
rustflags = [
'-L',
'/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/.cargo',
'-Clink-arg=-landroid',
'-Clink-arg=-llog',
'-Clink-arg=-lOpenSLES',
]
@@ -1 +0,0 @@
INPUT(-lunwind)
+1
View File
@@ -2,3 +2,4 @@
# will have compiled files and executables
/target/
WixTools
/.cargo/
+46 -45
View File
@@ -245,9 +245,9 @@ dependencies = [
[[package]]
name = "bip39"
version = "1.0.1"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e89470017230c38e52b82b3ee3f530db1856ba1d434e3a67a3456a8a8dec5f"
checksum = "f5b9d9748b5770d1539657653dc5ac3cd9353549e74238dc0d96c22919128b94"
dependencies = [
"bitcoin_hashes",
"rand 0.6.5",
@@ -258,9 +258,9 @@ dependencies = [
[[package]]
name = "bitcoin_hashes"
version = "0.9.7"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ce18265ec2324ad075345d5814fbeed4f41f0a660055dc78840b74d19b874b1"
checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
[[package]]
name = "bitflags"
@@ -397,9 +397,9 @@ dependencies = [
[[package]]
name = "bstr"
version = "1.2.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832"
checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1"
dependencies = [
"memchr",
"serde",
@@ -571,9 +571,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.1.2"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd125be87bf4c255ebc50de0b7f4d2a6201e8ac3dc86e39c0ad081dc5e7236fe"
checksum = "0012995dc3a54314f4710f5631d74767e73c534b8757221708303e48eef7a19b"
dependencies = [
"clap",
]
@@ -603,9 +603,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "0.3.1"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09"
dependencies = [
"os_str_bytes",
]
@@ -636,7 +636,7 @@ dependencies = [
"sqlx 0.6.2",
"tap",
"thiserror",
"time 0.3.18",
"time 0.3.19",
"tokio",
"tokio-stream",
"url",
@@ -2040,15 +2040,15 @@ dependencies = [
[[package]]
name = "generator"
version = "0.7.2"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e"
checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e"
dependencies = [
"cc",
"libc",
"log",
"rustversion",
"windows 0.39.0",
"windows 0.44.0",
]
[[package]]
@@ -2533,9 +2533,9 @@ dependencies = [
[[package]]
name = "http"
version = "0.2.8"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
"bytes",
"fnv",
@@ -2826,9 +2826,9 @@ checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146"
[[package]]
name = "is-terminal"
version = "0.4.3"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef"
checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
dependencies = [
"hermit-abi 0.3.1",
"io-lifetimes",
@@ -3159,7 +3159,7 @@ dependencies = [
"dirs-next",
"objc-foundation",
"objc_id",
"time 0.3.18",
"time 0.3.19",
]
[[package]]
@@ -3355,11 +3355,12 @@ dependencies = [
[[package]]
name = "notify-rust"
version = "4.7.1"
version = "4.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "260208751689b605138bb55ab6af43ad75f628619a7e0b818d63bf6629e59467"
checksum = "2bfa211d18e360f08e36c364308f394b5eb23a6629150690e109a916dc6f610e"
dependencies = [
"dbus",
"log",
"mac-notification-sys",
"tauri-winrt-notification",
]
@@ -3428,18 +3429,18 @@ dependencies = [
[[package]]
name = "num_enum"
version = "0.5.9"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b"
checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
dependencies = [
"num_enum_derive",
]
[[package]]
name = "num_enum_derive"
version = "0.5.9"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e"
checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -3584,7 +3585,7 @@ dependencies = [
"serde_json",
"serde_repr",
"thiserror",
"time 0.3.18",
"time 0.3.19",
]
[[package]]
@@ -4348,16 +4349,16 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "plist"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635"
checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46"
dependencies = [
"base64 0.13.1",
"base64 0.21.0",
"indexmap",
"line-wrap",
"quick-xml 0.26.0",
"serde",
"time 0.3.18",
"time 0.3.19",
]
[[package]]
@@ -5444,9 +5445,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
[[package]]
name = "slab"
version = "0.4.7"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
dependencies = [
"autocfg 1.1.0",
]
@@ -5873,9 +5874,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.107"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
@@ -6073,7 +6074,7 @@ dependencies = [
"sha2 0.10.6",
"tauri-utils",
"thiserror",
"time 0.3.18",
"time 0.3.19",
"url",
"uuid 1.3.0",
"walkdir",
@@ -6213,7 +6214,7 @@ dependencies = [
"subtle 2.4.1",
"subtle-encoding",
"tendermint-proto",
"time 0.3.18",
"time 0.3.19",
"zeroize",
]
@@ -6246,7 +6247,7 @@ dependencies = [
"serde",
"serde_bytes",
"subtle-encoding",
"time 0.3.18",
"time 0.3.19",
]
[[package]]
@@ -6274,7 +6275,7 @@ dependencies = [
"tendermint-config",
"tendermint-proto",
"thiserror",
"time 0.3.18",
"time 0.3.19",
"tokio",
"tracing",
"url",
@@ -6351,9 +6352,9 @@ dependencies = [
[[package]]
name = "time"
version = "0.3.18"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af0097eaf301d576d0b2aead7a59facab6d53cc636340f0291fab8446a2e8613"
checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2"
dependencies = [
"itoa 1.0.5",
"js-sys",
@@ -6370,9 +6371,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "time-macros"
version = "0.2.6"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c"
dependencies = [
"time-core",
]
@@ -6453,9 +6454,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
version = "0.1.11"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce"
checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -6839,7 +6840,7 @@ dependencies = [
"rustc_version 0.4.0",
"rustversion",
"thiserror",
"time 0.3.18",
"time 0.3.19",
]
[[package]]
@@ -13,3 +13,4 @@ build
.externalNativeBuild
.cxx
local.properties
app/src/main/jniLibs/**
@@ -1 +0,0 @@
/home/pierre/Documents/nym/nym/nym-connect-new/mobile/src-tauri/target/x86_64-linux-android/debug/libnym_connect.so
@@ -26,17 +26,20 @@ open class BuildTask : DefaultTask() {
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
val target = target ?: throw GradleException("target cannot be null")
val release = release ?: throw GradleException("release cannot be null")
val nodeExecutable = System.getenv("NODE_TAURI_CLI")
val home = (System.getenv("HOME") ?: "")
val cargoHome = (System.getenv("CARGO_HOME") ?: "$home/.cargo")
val tauriCli = "$cargoHome/bin/cargo-tauri"
if (!File(tauriCli).isFile()) {
throw GradleException("$tauriCli no shuch file")
val rustExecutable = "$cargoHome/bin/cargo-tauri"
val tauriCli = when {
!nodeExecutable.isNullOrEmpty() && File(nodeExecutable).isFile() -> nodeExecutable
File(rustExecutable).isFile() -> rustExecutable
else -> throw GradleException("couldn't find tauri-cli executable")
}
println("gradle Rust plugin, using tauri cli executable: $tauriCli")
project.exec {
workingDir(File(project.projectDir, rootDirRel.path))
executable(tauriCli)
args(listOf("tauri", "android", "android-studio-script"))
args(listOf("android", "android-studio-script"))
if (project.logger.isEnabled(LogLevel.DEBUG)) {
args("-vv")
} else if (project.logger.isEnabled(LogLevel.INFO)) {
+2 -6
View File
@@ -2,16 +2,12 @@
A simple tool to ensure that all binaries init with the correct format, using the `assert.sh` library
Simply run `./build_and_run.sh $RELEASE_BRANCH` `$CURRENT_PRODUCTION_RELEASE_VERSION`
Simply run `./build_and_run.sh $WORKING_BRANCH`
For example:
`./build_and_run.sh release/v1.1.11 v1.1.10`
`./build_and_run.sh release/v1.1.11`
Currently, this is run on linux based machines as the nym-core binaries are published via a linux build agent
This will run through all the binaries and check the fields that we expect to be initialised when passing the parameters into nyms core binaries
## TODO
- Create GH workflow and Run in CI