Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55a87e09f0 | |||
| 14f57889bf | |||
| f89fa2d1e4 | |||
| b22ca5e1ef |
@@ -1,6 +0,0 @@
|
|||||||
.git
|
|
||||||
.github
|
|
||||||
.gitignore
|
|
||||||
**/node_modules
|
|
||||||
**/target
|
|
||||||
dist
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
nym-validator-rewarder/.sqlx/** diff=nodiff
|
|
||||||
nym-node-status-api/nym-node-status-api/.sqlx/** diff=nodiff
|
|
||||||
+11
-1
@@ -14,6 +14,7 @@
|
|||||||
# contracts
|
# contracts
|
||||||
/contracts/mixnet @durch @jstuczyn
|
/contracts/mixnet @durch @jstuczyn
|
||||||
/contracts/vesting @durch @jstuczyn
|
/contracts/vesting @durch @jstuczyn
|
||||||
|
/contracts/service-provider-directory @octol
|
||||||
|
|
||||||
# crypto code
|
# crypto code
|
||||||
/common/crypto/ @jstuczyn
|
/common/crypto/ @jstuczyn
|
||||||
@@ -21,5 +22,14 @@
|
|||||||
/common/dkg/ @jstuczyn
|
/common/dkg/ @jstuczyn
|
||||||
/common/nymsphinx/ @jstuczyn
|
/common/nymsphinx/ @jstuczyn
|
||||||
|
|
||||||
|
# rust sdk
|
||||||
|
/sdk/rust/ @octol
|
||||||
|
|
||||||
|
# nym-connect (rust)
|
||||||
|
/nym-connect/desktop/src-tauri/ @octol
|
||||||
|
|
||||||
|
# nym-wallet (rust)
|
||||||
|
/nym-wallet/src-tauri/ @octol
|
||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
/documentation @mfahampshire
|
/documentation @mfahampshire
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Description
|
||||||
|
|
||||||
|
Closes: #XXXX
|
||||||
|
|
||||||
|
<!-- If appropriate, insert relevant description here -->
|
||||||
|
|
||||||
|
# Checklist:
|
||||||
|
|
||||||
|
- [ ] added a changelog entry to `CHANGELOG.md`
|
||||||
+266
-150
@@ -9,7 +9,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^5.1.1",
|
||||||
"@octokit/auth-action": "^4.0.1",
|
"@octokit/auth-action": "^4.0.1",
|
||||||
"@octokit/rest": "^20.0.2",
|
"@octokit/rest": "^20.0.2",
|
||||||
"hasha": "^5.2.0",
|
"hasha": "^5.2.0",
|
||||||
@@ -29,34 +29,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github": {
|
"node_modules/@actions/github": {
|
||||||
"version": "6.0.0",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
|
||||||
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
|
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.2.0",
|
"@actions/http-client": "^2.0.1",
|
||||||
"@octokit/core": "^5.0.1",
|
"@octokit/core": "^3.6.0",
|
||||||
"@octokit/plugin-paginate-rest": "^9.0.0",
|
"@octokit/plugin-paginate-rest": "^2.17.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
|
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"tunnel": "^0.0.6",
|
|
||||||
"undici": "^5.25.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz",
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
"integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==",
|
||||||
"license": "MIT",
|
"dependencies": {
|
||||||
"engines": {
|
"tunnel": "^0.0.6"
|
||||||
"node": ">=14"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-action": {
|
"node_modules/@octokit/auth-action": {
|
||||||
@@ -71,6 +59,14 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/auth-action/node_modules/@octokit/auth-token": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types": {
|
||||||
"version": "20.0.0",
|
"version": "20.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
||||||
@@ -85,152 +81,115 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "4.0.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
|
||||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
|
||||||
"license": "MIT",
|
"dependencies": {
|
||||||
"engines": {
|
"@octokit/types": "^6.0.3"
|
||||||
"node": ">= 18"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "5.2.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
|
||||||
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
|
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^4.0.0",
|
"@octokit/auth-token": "^2.4.4",
|
||||||
"@octokit/graphql": "^7.1.0",
|
"@octokit/graphql": "^4.5.8",
|
||||||
"@octokit/request": "^8.3.1",
|
"@octokit/request": "^5.6.3",
|
||||||
"@octokit/request-error": "^5.1.0",
|
"@octokit/request-error": "^2.0.5",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^6.0.3",
|
||||||
"before-after-hook": "^2.2.0",
|
"before-after-hook": "^2.2.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^6.0.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "9.0.6",
|
"version": "6.0.12",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
|
||||||
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
|
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^6.0.3",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^6.0.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "7.1.0",
|
"version": "4.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
|
||||||
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
|
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^8.3.0",
|
"@octokit/request": "^5.6.0",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^6.0.3",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^6.0.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "23.0.1",
|
"version": "12.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
|
||||||
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
|
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "9.2.2",
|
"version": "2.21.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
|
||||||
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
|
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^6.40.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=2"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "10.4.1",
|
"version": "5.16.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
|
||||||
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
|
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^6.39.0",
|
||||||
},
|
"deprecation": "^2.3.1"
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=3"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "8.4.1",
|
"version": "5.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||||
"integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
|
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^9.0.6",
|
"@octokit/endpoint": "^6.0.1",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^2.1.0",
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^6.16.1",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"node-fetch": "^2.6.7",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^6.0.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "5.1.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||||
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
|
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^6.0.3",
|
||||||
"deprecation": "^2.0.0",
|
"deprecation": "^2.0.0",
|
||||||
"once": "^1.4.0"
|
"once": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/request/node_modules/node-fetch": {
|
||||||
|
"version": "2.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||||
|
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||||
|
"dependencies": {
|
||||||
|
"whatwg-url": "^5.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": "4.x || >=6.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"encoding": "^0.1.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"encoding": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/rest": {
|
"node_modules/@octokit/rest": {
|
||||||
@@ -247,6 +206,89 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/auth-token": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/core": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-YbAtMWIrbZ9FCXbLwT9wWB8TyLjq9mxpKdgB3dUNxQcIVTf9hJ70gRPwAcqGZdY6WdJPZ0I7jLaaNDCiloGN2A==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/auth-token": "^4.0.0",
|
||||||
|
"@octokit/graphql": "^7.0.0",
|
||||||
|
"@octokit/request": "^8.0.2",
|
||||||
|
"@octokit/request-error": "^5.0.0",
|
||||||
|
"@octokit/types": "^11.0.0",
|
||||||
|
"before-after-hook": "^2.2.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/endpoint": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.0.tgz",
|
||||||
|
"integrity": "sha512-szrQhiqJ88gghWY2Htt8MqUDO6++E/EIXqJ2ZEp5ma3uGS46o7LZAzSLt49myB7rT+Hfw5Y6gO3LmOxGzHijAQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^11.0.0",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/graphql": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-T5S3oZ1JOE58gom6MIcrgwZXzTaxRnxBso58xhozxHpOqSTgDS6YNeEUvZ/kRvXgPrRz/KHnZhtb7jUMRi9E6w==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/request": "^8.0.1",
|
||||||
|
"@octokit/types": "^11.0.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
|
||||||
|
"integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": {
|
||||||
|
"version": "9.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz",
|
||||||
|
"integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^12.6.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": "5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "20.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
||||||
|
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
||||||
|
"version": "12.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
||||||
|
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": {
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz",
|
||||||
@@ -258,13 +300,75 @@
|
|||||||
"@octokit/core": ">=5"
|
"@octokit/core": ">=5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "13.8.0",
|
"version": "10.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
||||||
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^23.0.1"
|
"@octokit/types": "^12.6.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": "5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "20.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
||||||
|
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
||||||
|
"version": "12.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
||||||
|
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/request": {
|
||||||
|
"version": "8.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.1.tgz",
|
||||||
|
"integrity": "sha512-8N+tdUz4aCqQmXl8FpHYfKG9GelDFd7XGVzyN8rc6WxVlYcfpHECnuRkgquzz+WzvHTK62co5di8gSXnzASZPQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/endpoint": "^9.0.0",
|
||||||
|
"@octokit/request-error": "^5.0.0",
|
||||||
|
"@octokit/types": "^11.1.0",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/request-error": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-1ue0DH0Lif5iEqT52+Rf/hf0RmGO9NWFjrzmrkArpG9trFfDM/efx00BJHdLGuro4BR/gECxCU2Twf5OKrRFsQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^11.0.0",
|
||||||
|
"deprecation": "^2.0.0",
|
||||||
|
"once": "^1.4.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/rest/node_modules/@octokit/types": {
|
||||||
|
"version": "11.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz",
|
||||||
|
"integrity": "sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/types": {
|
||||||
|
"version": "6.41.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
|
||||||
|
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^12.11.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vercel/ncc": {
|
"node_modules/@vercel/ncc": {
|
||||||
@@ -292,8 +396,7 @@
|
|||||||
"node_modules/deprecation": {
|
"node_modules/deprecation": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
|
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||||
"license": "ISC"
|
|
||||||
},
|
},
|
||||||
"node_modules/fetch-blob": {
|
"node_modules/fetch-blob": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
@@ -343,6 +446,14 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-plain-object": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-stream": {
|
"node_modules/is-stream": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
|
||||||
@@ -393,11 +504,15 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tr46": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||||
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
|
},
|
||||||
"node_modules/tunnel": {
|
"node_modules/tunnel": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||||
@@ -414,18 +529,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
|
||||||
"version": "5.29.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||||
@@ -447,11 +550,24 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/webidl-conversions": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||||
|
},
|
||||||
|
"node_modules/whatwg-url": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||||
|
"dependencies": {
|
||||||
|
"tr46": "~0.0.3",
|
||||||
|
"webidl-conversions": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/wrappy": {
|
"node_modules/wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||||
"license": "ISC"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^5.1.1",
|
||||||
"@octokit/auth-action": "^4.0.1",
|
"@octokit/auth-action": "^4.0.1",
|
||||||
"@octokit/rest": "^20.0.2",
|
"@octokit/rest": "^20.0.2",
|
||||||
"hasha": "^5.2.0",
|
"hasha": "^5.2.0",
|
||||||
|
|||||||
@@ -14,20 +14,3 @@ updates:
|
|||||||
prefix: build
|
prefix: build
|
||||||
prefix-development: chore
|
prefix-development: chore
|
||||||
include: scope
|
include: scope
|
||||||
# Update the root workspace (only). For now we don't include
|
|
||||||
# the contracts workspcae.
|
|
||||||
- package-ecosystem: cargo
|
|
||||||
directory: /
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
time: "09:00"
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "cosmwasm-*"
|
|
||||||
- dependency-name: "cw*"
|
|
||||||
groups:
|
|
||||||
patch-updates:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
update-types:
|
|
||||||
- "patch"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
name: build-deb-meta
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: arc-ubuntu-22.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Build Environment
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y make dpkg-dev
|
|
||||||
|
|
||||||
- name: Build Debian Packages
|
|
||||||
working-directory: ppa/packages
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: Find .deb files
|
|
||||||
working-directory: ppa/packages
|
|
||||||
run: |
|
|
||||||
echo "file1=$(ls nym-repo-setup*.deb)" >> $GITHUB_ENV
|
|
||||||
echo "file2=$(ls nym-vpn*.deb)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Upload nym-repo-setup
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.file1 }}
|
|
||||||
path: ppa/packages/nym-repo-setup*.deb
|
|
||||||
retention-days: 10
|
|
||||||
|
|
||||||
- name: Upload nym-vpn
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.file2 }}
|
|
||||||
path: ppa/packages/nym-vpn*.deb
|
|
||||||
retention-days: 10
|
|
||||||
@@ -5,28 +5,17 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: ubuntu-20.04-16-core
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: documentation/docs
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git
|
||||||
- name: Install pip3
|
|
||||||
run: sudo apt install -y python3-pip
|
|
||||||
- name: Install Python3 modules
|
|
||||||
run: sudo pip3 install pandas tabulate
|
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install -y rsync
|
run: sudo apt-get install rsync
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
- name: Setup pnpm
|
- uses: actions/setup-node@v3
|
||||||
uses: pnpm/action-setup@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
version: 9
|
node-version: 18
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -36,13 +25,33 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --workspace --release
|
args: --workspace --release
|
||||||
|
- name: Install mdbook and plugins
|
||||||
|
run: cd documentation && ./install_mdbook_deps.sh
|
||||||
|
- name: Remove existing Nym config directory (`~/.nym/`)
|
||||||
|
run: cd documentation && ./remove_existing_config.sh
|
||||||
|
continue-on-error: false
|
||||||
|
# This is the original flow
|
||||||
|
# - name: Build all projects in documentation/ & move to ~/dist/docs/
|
||||||
|
# run: cd documentation && ./build_all_to_dist.sh
|
||||||
|
|
||||||
- name: Install project dependencies
|
# This is a workaround replacement which builds on the last working commit b332a6b55668f60988e36961f3f62a794ba82ddb and then on current branch
|
||||||
run: pnpm i
|
- name: Save current branch to ~/current_branch
|
||||||
- name: Build project
|
run: git rev-parse --abbrev-ref HEAD > ~/current_branch
|
||||||
run: pnpm run build
|
- name: Git pull & switch to b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
- name: Move files to /dist/
|
run: git pull && git checkout b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
run: ../scripts/move-to-dist.sh
|
- name: Build all projects in documentation/ & move to ~/dist/docs/ from b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
|
run: cd documentation && ./build_all_to_dist.sh
|
||||||
|
|
||||||
|
- name: Switch to current branch
|
||||||
|
run: git checkout $echo "$(cat ~/current_branch)"
|
||||||
|
- name: Build all projects in documentation/ & move to ~/dist/docs/ on current branch
|
||||||
|
run: cd documentation && ./build_all_to_dist.sh && rm ~/current_branch
|
||||||
|
|
||||||
|
# End of replacemet
|
||||||
|
|
||||||
|
- name: Post process
|
||||||
|
run: cd documentation && ./post_process.sh
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
- name: Create Vercel project file
|
- name: Create Vercel project file
|
||||||
uses: mobiledevops/secret-to-file-action@v1
|
uses: mobiledevops/secret-to-file-action@v1
|
||||||
@@ -86,3 +95,24 @@ jobs:
|
|||||||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
|
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
|
||||||
working-directory: dist/docs
|
working-directory: dist/docs
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: cd-docs
|
||||||
|
NYM_PROJECT_NAME: "Docs CD"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CD_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DOCS }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ on:
|
|||||||
- 'mixnode/**'
|
- 'mixnode/**'
|
||||||
- 'sdk/rust/nym-sdk/**'
|
- 'sdk/rust/nym-sdk/**'
|
||||||
- 'service-providers/**'
|
- 'service-providers/**'
|
||||||
- '.github/workflows/ci-binary-config-checker.yml'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'clients/**'
|
- 'clients/**'
|
||||||
@@ -23,7 +22,6 @@ on:
|
|||||||
- 'mixnode/**'
|
- 'mixnode/**'
|
||||||
- 'sdk/rust/nym-sdk/**'
|
- 'sdk/rust/nym-sdk/**'
|
||||||
- 'service-providers/**'
|
- 'service-providers/**'
|
||||||
- '.github/workflows/ci-binary-config-checker.yml'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NETWORK: mainnet
|
NETWORK: mainnet
|
||||||
@@ -33,11 +31,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [arc-ubuntu-22.04]
|
platform: [custom-linux]
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- 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
|
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
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
name: ci-build-ts
|
name: ci-build-ts
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "ts-packages/**"
|
- "ts-packages/**"
|
||||||
- "sdk/typescript/**"
|
- "sdk/typescript/**"
|
||||||
- ".github/workflows/ci-build-ts.yml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-20.04-16-core
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install rsync
|
run: sudo apt-get install rsync
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- name: Setup yarn
|
- name: Setup yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -46,3 +44,23 @@ jobs:
|
|||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}-example
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ts-${{ env.GITHUB_REF_SLUG }}-example
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: ts-packages
|
||||||
|
NYM_PROJECT_NAME: "ts-packages"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
enable_wireguard:
|
||||||
|
description: "Add --features wireguard"
|
||||||
|
required: true
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
enable_deb:
|
enable_deb:
|
||||||
description: "True to enable cargo-deb installation and .deb package building"
|
description: "True to enable cargo-deb installation and .deb package building"
|
||||||
required: false
|
required: false
|
||||||
@@ -15,20 +20,35 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "14 0 * * *"
|
- cron: "14 0 * * *"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "clients/**"
|
||||||
|
- "common/**"
|
||||||
|
- "explorer-api/**"
|
||||||
|
- "gateway/**"
|
||||||
|
- "integrations/**"
|
||||||
|
- "mixnode/**"
|
||||||
|
- "nym-api/**"
|
||||||
|
- "nym-node/**"
|
||||||
|
- "nym-outfox/**"
|
||||||
|
- "nym-validator-rewarder/**"
|
||||||
|
- "sdk/rust/nym-sdk/**"
|
||||||
|
- "service-providers/**"
|
||||||
|
- "tools/**"
|
||||||
|
- "nymvisor/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-nym:
|
publish-nym:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ arc-ubuntu-22.04 ]
|
platform: [ubuntu-20.04]
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Prepare build output directory
|
- name: Prepare build output directory
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -38,14 +58,22 @@ jobs:
|
|||||||
rm -rf ci-builds || true
|
rm -rf ci-builds || true
|
||||||
mkdir -p $OUTPUT_DIR
|
mkdir -p $OUTPUT_DIR
|
||||||
echo $OUTPUT_DIR
|
echo $OUTPUT_DIR
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get -y install libudev-dev
|
run: sudo apt update && sudo apt install libudev-dev
|
||||||
|
|
||||||
- name: Sets env vars for tokio if set in manual dispatch inputs
|
- name: Sets env vars for tokio if set in manual dispatch inputs
|
||||||
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
|
|
||||||
run: |
|
run: |
|
||||||
echo "RUSTFLAGS=--cfg tokio_unstable" >> $GITHUB_ENV
|
echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV
|
||||||
echo "CARGO_FEATURES=--features tokio-console" >> $GITHUB_ENV
|
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
|
||||||
|
|
||||||
|
- name: Set CARGO_FEATURES
|
||||||
|
run: |
|
||||||
|
echo 'CARGO_FEATURES=--features wireguard' >> $GITHUB_ENV
|
||||||
|
if: >
|
||||||
|
github.event_name == 'schedule' ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && inputs.enable_wireguard == true)
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -71,14 +99,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'workflow_dispatch'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: nym-binaries-artifacts
|
name: nym-binaries-artifacts
|
||||||
path: |
|
path: |
|
||||||
target/release/nym-client
|
target/release/nym-client
|
||||||
|
target/release/nym-gateway
|
||||||
|
target/release/nym-mixnode
|
||||||
target/release/nym-socks5-client
|
target/release/nym-socks5-client
|
||||||
target/release/nym-api
|
target/release/nym-api
|
||||||
target/release/nym-network-requester
|
target/release/nym-network-requester
|
||||||
|
target/release/nym-network-statistics
|
||||||
target/release/nym-cli
|
target/release/nym-cli
|
||||||
target/release/nymvisor
|
target/release/nymvisor
|
||||||
target/release/nym-node
|
target/release/nym-node
|
||||||
@@ -93,15 +124,20 @@ jobs:
|
|||||||
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
cp target/release/nym-client $OUTPUT_DIR
|
cp target/release/nym-client $OUTPUT_DIR
|
||||||
|
cp target/release/nym-gateway $OUTPUT_DIR
|
||||||
|
cp target/release/nym-mixnode $OUTPUT_DIR
|
||||||
cp target/release/nym-socks5-client $OUTPUT_DIR
|
cp target/release/nym-socks5-client $OUTPUT_DIR
|
||||||
cp target/release/nym-api $OUTPUT_DIR
|
cp target/release/nym-api $OUTPUT_DIR
|
||||||
cp target/release/nym-network-requester $OUTPUT_DIR
|
cp target/release/nym-network-requester $OUTPUT_DIR
|
||||||
|
cp target/release/nym-network-statistics $OUTPUT_DIR
|
||||||
cp target/release/nymvisor $OUTPUT_DIR
|
cp target/release/nymvisor $OUTPUT_DIR
|
||||||
cp target/release/nym-node $OUTPUT_DIR
|
cp target/release/nym-node $OUTPUT_DIR
|
||||||
cp target/release/nym-cli $OUTPUT_DIR
|
cp target/release/nym-cli $OUTPUT_DIR
|
||||||
|
cp target/release/explorer-api $OUTPUT_DIR
|
||||||
if [ ${{ github.event_name == 'workflow_dispatch' && inputs.enable_deb == true }} = true ]; then
|
if [ ${{ github.event_name == 'workflow_dispatch' && inputs.enable_deb == true }} = true ]; then
|
||||||
cp target/debian/*.deb $OUTPUT_DIR
|
cp target/debian/*.deb $OUTPUT_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy branch to CI www
|
- name: Deploy branch to CI www
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: easingthemes/ssh-deploy@main
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
name: ci-build-vpn-api-wasm
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'common/**'
|
|
||||||
- 'nym-credential-proxy/**'
|
|
||||||
- '.github/workflows/ci-build-vpn-api-wasm.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
wasm:
|
|
||||||
runs-on: arc-ubuntu-22.04
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
target: wasm32-unknown-unknown
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Install wasm-pack
|
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
||||||
|
|
||||||
- name: Install wasm-opt
|
|
||||||
uses: ./.github/actions/install-wasm-opt
|
|
||||||
with:
|
|
||||||
version: '116'
|
|
||||||
|
|
||||||
- name: Install wasm-bindgen-cli
|
|
||||||
run: cargo install wasm-bindgen-cli
|
|
||||||
|
|
||||||
- name: "Build"
|
|
||||||
run: make
|
|
||||||
working-directory: nym-credential-proxy/vpn-api-lib-wasm
|
|
||||||
@@ -1,57 +1,61 @@
|
|||||||
name: ci-build
|
name: ci-build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'clients/**'
|
||||||
|
- 'common/**'
|
||||||
|
- 'explorer-api/**'
|
||||||
|
- 'ephemera/**'
|
||||||
|
- 'gateway/**'
|
||||||
|
- 'integrations/**'
|
||||||
|
- 'mixnode/**'
|
||||||
|
- 'sdk/lib/socks5-listener/**'
|
||||||
|
- 'sdk/rust/nym-sdk/**'
|
||||||
|
- 'service-providers/**'
|
||||||
|
- 'nym-api/**'
|
||||||
|
- 'nym-outfox/**'
|
||||||
|
- 'tools/nym-cli/**'
|
||||||
|
- 'tools/nym-nr-query/**'
|
||||||
|
- 'tools/ts-rs-cli/**'
|
||||||
|
- 'Cargo.toml'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'clients/**'
|
- 'clients/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
|
- 'explorer-api/**'
|
||||||
|
- 'ephemera/**'
|
||||||
- 'gateway/**'
|
- 'gateway/**'
|
||||||
- 'integrations/**'
|
- 'integrations/**'
|
||||||
- 'nym-api/**'
|
- 'mixnode/**'
|
||||||
- 'nym-credential-proxy/**'
|
- 'sdk/lib/socks5-listener/**'
|
||||||
- 'nym-network-monitor/**'
|
- 'sdk/rust/nym-sdk/**'
|
||||||
- 'nym-node/**'
|
|
||||||
- 'nym-node-status-api/**'
|
|
||||||
- 'nym-statistics-api/**'
|
|
||||||
- 'nym-outfox/**'
|
|
||||||
- 'nym-validator-rewarder/**'
|
|
||||||
- 'nyx-chain-watcher/**'
|
|
||||||
- 'sdk/ffi/**'
|
|
||||||
- 'sdk/rust/**'
|
|
||||||
- 'service-providers/**'
|
- 'service-providers/**'
|
||||||
- 'nym-browser-extension/storage/**'
|
- 'nym-api/**'
|
||||||
- 'tools/**'
|
- 'nym-outfox/**'
|
||||||
- 'wasm/**'
|
- 'tools/nym-cli/**'
|
||||||
|
- 'tools/nym-nr-query/**'
|
||||||
|
- 'tools/ts-rs-cli/**'
|
||||||
- 'Cargo.toml'
|
- 'Cargo.toml'
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/ci-build.yml'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
|
||||||
# only 1 concurrent `ci-build` allowed per branch
|
|
||||||
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-concurrency-and-the-default-behavior
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ arc-linux-latest, custom-windows-11, custom-macos-15 ]
|
os: [custom-linux, custom-runner-mac-m1]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
IPINFO_API_TOKEN: ${{ secrets.IPINFO_API_TOKEN }}
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools protobuf-compiler cmake
|
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools protobuf-compiler
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: contains(matrix.os, 'linux')
|
if: matrix.os == 'custom-linux'
|
||||||
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@@ -61,56 +65,50 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
# To avoid running out of disk space, skip generating debug symbols
|
|
||||||
- name: Set debug to false (unix)
|
|
||||||
if: contains(matrix.os, 'linux') || contains(matrix.os, 'mac')
|
|
||||||
run: |
|
|
||||||
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
|
|
||||||
git diff
|
|
||||||
|
|
||||||
- name: Set debug to false (win)
|
|
||||||
if: contains(matrix.os, 'windows')
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
(Get-Content Cargo.toml) -replace '\[profile.dev\]', "`$&`ndebug = false" | Set-Content Cargo.toml
|
|
||||||
git diff
|
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
|
||||||
- name: Clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Build all binaries
|
- name: Build all binaries
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
# Enable wireguard by default on linux only
|
||||||
|
args: --workspace --features wireguard
|
||||||
|
|
||||||
- name: Build all examples
|
- name: Build all examples
|
||||||
if: contains(matrix.os, 'linux')
|
if: matrix.os == 'custom-linux'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --workspace --examples
|
args: --workspace --examples --features wireguard
|
||||||
|
|
||||||
- name: Run all tests
|
- name: Run all tests
|
||||||
if: contains(matrix.os, 'linux')
|
if: matrix.os == 'custom-linux'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
env:
|
|
||||||
NYM_API: https://sandbox-nym-api1.nymtech.net/api
|
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --workspace
|
args: --workspace --features wireguard
|
||||||
|
|
||||||
- name: Run expensive tests
|
- name: Run expensive tests
|
||||||
if: (github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master') && contains(matrix.os, 'linux')
|
if: (github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master') && matrix.os == 'custom-linux'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --workspace -- --ignored
|
args: --workspace --features wireguard -- --ignored
|
||||||
|
|
||||||
|
- name: Annotate with clippy checks
|
||||||
|
if: matrix.os == 'custom-linux'
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --workspace --features wireguard
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --workspace --all-targets --features wireguard -- -D warnings
|
||||||
|
|||||||
@@ -2,14 +2,10 @@ name: ci-cargo-deny
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/ci-cargo-deny.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cargo-deny:
|
cargo-deny:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
checks:
|
checks:
|
||||||
@@ -17,9 +13,9 @@ jobs:
|
|||||||
- licenses bans sources
|
- licenses bans sources
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- uses: EmbarkStudios/cargo-deny-action@v2
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
||||||
with:
|
with:
|
||||||
log-level: warn
|
log-level: warn
|
||||||
command: check ${{ matrix.checks }}
|
command: check ${{ matrix.checks }}
|
||||||
arguments: --all-features
|
argument: --all-features
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
name: ci-check-ns-api-version
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "nym-node-status-api/**"
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-node-status-api/nym-node-status-api"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-if-tag-exists:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if git tag exists
|
|
||||||
run: |
|
|
||||||
TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
if [[ -z "$TAG" ]]; then
|
|
||||||
echo "Tag is empty"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
git ls-remote --tags origin | awk '{print $2}'
|
|
||||||
if git ls-remote --tags origin | awk '{print $2}' | grep -q "refs/tags/$TAG$" ; then
|
|
||||||
echo "Tag '$TAG' ALREADY EXISTS on the remote"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Tag '$TAG' does not exist on the remote"
|
|
||||||
fi
|
|
||||||
- name: Check if harbor tag exists
|
|
||||||
run: |
|
|
||||||
TAG=${{ steps.get_version.outputs.result }}
|
|
||||||
registry=https://harbor.nymte.ch
|
|
||||||
repo_name=nym/node-status-api
|
|
||||||
if [[ -z $TAG ]]; then
|
|
||||||
echo "Tag is empty"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# first, list all tags for logging purposes
|
|
||||||
curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq
|
|
||||||
# check if there's a matching tag
|
|
||||||
exists=$(curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq -r --arg tag "$TAG" 'any(.tags[]; . == $tag)' )
|
|
||||||
if [[ $exists = "true" ]]; then
|
|
||||||
echo "Version '$TAG' defined in Cargo.toml ALREADY EXISTS as tag in harbor repo"
|
|
||||||
exit 1
|
|
||||||
elif [[ $exists = "false" ]]; then
|
|
||||||
echo "Version '$TAG' doesn't exist on the remote"
|
|
||||||
else
|
|
||||||
echo "Unknown output '$exists'"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
name: ci-check-nym-stats-api-version
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "nym-statistics-api/**"
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-statistics-api"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-if-tag-exists:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if git tag exists
|
|
||||||
run: |
|
|
||||||
TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
if [[ -z "$TAG" ]]; then
|
|
||||||
echo "Tag is empty"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
git ls-remote --tags origin | awk '{print $2}'
|
|
||||||
if git ls-remote --tags origin | awk '{print $2}' | grep -q "refs/tags/$TAG$" ; then
|
|
||||||
echo "Tag '$TAG' ALREADY EXISTS on the remote"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Tag '$TAG' does not exist on the remote"
|
|
||||||
fi
|
|
||||||
- name: Check if harbor tag exists
|
|
||||||
run: |
|
|
||||||
TAG=${{ steps.get_version.outputs.result }}
|
|
||||||
registry=https://harbor.nymte.ch
|
|
||||||
repo_name=nym/nym-statistics-api
|
|
||||||
if [[ -z $TAG ]]; then
|
|
||||||
echo "Tag is empty"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# first, list all tags for logging purposes
|
|
||||||
curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq
|
|
||||||
# check if there's a matching tag
|
|
||||||
exists=$(curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq -r --arg tag "$TAG" 'any(.tags[]; . == $tag)' )
|
|
||||||
if [[ $exists = "true" ]]; then
|
|
||||||
echo "Version '$TAG' defined in Cargo.toml ALREADY EXISTS as tag in harbor repo"
|
|
||||||
exit 1
|
|
||||||
elif [[ $exists = "false" ]]; then
|
|
||||||
echo "Version '$TAG' doesn't exist on the remote"
|
|
||||||
else
|
|
||||||
echo "Unknown output '$exists'"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"rust":"stable",
|
||||||
|
"runOnEvent":"always"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rust":"beta",
|
||||||
|
"runOnEvent":"pull_request"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -6,17 +6,16 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'contracts/**'
|
- 'contracts/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- '.github/workflows/ci-contracts-schema.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-schema:
|
check-schema:
|
||||||
name: Generate and check schema
|
name: Generate and check schema
|
||||||
runs-on: ubuntu-22.04
|
runs-on: custom-linux
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ name: ci-contracts-upload-binaries
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'common/**'
|
||||||
|
- 'contracts/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NETWORK: mainnet
|
NETWORK: mainnet
|
||||||
@@ -11,13 +15,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ arc-ubuntu-22.04 ]
|
platform: [ubuntu-20.04]
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Prepare build output directory
|
- name: Prepare build output directory
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -35,22 +39,27 @@ jobs:
|
|||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Install cosmwasm-check
|
- name: Install wasm-opt
|
||||||
run: cargo install cosmwasm-check
|
uses: ./.github/actions/install-wasm-opt
|
||||||
|
with:
|
||||||
|
version: '114'
|
||||||
|
|
||||||
- name: Build release contracts
|
- name: Build release contracts
|
||||||
run: make publish-contracts
|
run: make contracts
|
||||||
|
|
||||||
- name: Prepare build output
|
- name: Prepare build output
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
OUTPUT_DIR: ci-contract-builds/${{ github.ref_name }}
|
OUTPUT_DIR: ci-contract-builds/${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
find contracts/artifacts -maxdepth 1 -type f -name '*.wasm' -exec cp {} $OUTPUT_DIR \;
|
cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR
|
||||||
# Also include the optimizer-generated checksums if present
|
cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR
|
||||||
if [ -f contracts/artifacts/checksums.txt ]; then
|
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_bandwidth.wasm $OUTPUT_DIR
|
||||||
cp contracts/artifacts/checksums.txt $OUTPUT_DIR
|
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_dkg.wasm $OUTPUT_DIR
|
||||||
fi
|
cp contracts/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm $OUTPUT_DIR
|
||||||
|
cp contracts/target/wasm32-unknown-unknown/release/cw4_group.wasm $OUTPUT_DIR
|
||||||
|
cp contracts/target/wasm32-unknown-unknown/release/nym_service_provider_directory.wasm $OUTPUT_DIR
|
||||||
|
cp contracts/target/wasm32-unknown-unknown/release/nym_name_service.wasm $OUTPUT_DIR
|
||||||
|
|
||||||
- name: Deploy branch to CI www
|
- name: Deploy branch to CI www
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|||||||
@@ -9,39 +9,42 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'contracts/**'
|
- 'contracts/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- 'Cargo.lock'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- '.github/workflows/ci-contracts.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
matrix_prep:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
# creates the matrix strategy from ci-contracts-matrix-includes.json
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- id: set-matrix
|
||||||
|
uses: JoshuaTheMiller/conditional-build-matrix@main
|
||||||
|
with:
|
||||||
|
inputFile: '.github/workflows/ci-contracts-matrix-includes.json'
|
||||||
|
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
||||||
build:
|
build:
|
||||||
# since it's going to be compiled into wasm, there's absolutely
|
# since it's going to be compiled into wasm, there's absolutely
|
||||||
# no point in running CI on different OS-es
|
# no point in running CI on different OS-es
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
needs: matrix_prep
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup rust
|
- name: Setup rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
# pinned due to issues building contracts
|
toolchain: ${{ matrix.rust }}
|
||||||
toolchain: 1.86.0
|
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Install cosmwasm-check
|
|
||||||
run: cargo install cosmwasm-check
|
|
||||||
|
|
||||||
- name: Install wasm-opt
|
|
||||||
uses: ./.github/actions/install-wasm-opt
|
|
||||||
with:
|
|
||||||
version: '114'
|
|
||||||
|
|
||||||
- name: Build contracts
|
- name: Build contracts
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
env:
|
env:
|
||||||
@@ -67,7 +70,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --lib --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
|
args: --lib --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
- name: Check chain compatibility against release build
|
|
||||||
# this will build contracts in release mode, run wasm-opt and finally cosmwasm-check
|
|
||||||
run: make contracts
|
|
||||||
|
|||||||
@@ -3,37 +3,23 @@ name: ci-docs
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches-ignore: [master]
|
branches-ignore: master
|
||||||
paths:
|
paths:
|
||||||
- "documentation/docs/**"
|
- 'documentation/docs/**'
|
||||||
- ".github/workflows/ci-docs.yml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: ubuntu-20.04-16-core
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: documentation/docs
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git
|
||||||
- name: Install pip3
|
|
||||||
run: sudo apt install -y python3-pip
|
|
||||||
- name: Install Python3 modules
|
|
||||||
run: sudo pip3 install pandas tabulate
|
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install -y rsync
|
run: sudo apt-get install rsync
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
- name: Setup pnpm
|
- uses: actions/setup-node@v3
|
||||||
uses: pnpm/action-setup@v4.1.0
|
|
||||||
with:
|
with:
|
||||||
version: 9
|
node-version: 18
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -43,13 +29,30 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --workspace --release
|
args: --workspace --release
|
||||||
|
- name: Install mdbook and plugins
|
||||||
|
run: cd documentation && ./install_mdbook_deps.sh
|
||||||
|
- name: Remove existing Nym config directory (`~/.nym/`)
|
||||||
|
run: cd documentation && ./remove_existing_config.sh
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
- name: Install project dependencies
|
# This is the original flow
|
||||||
run: pnpm i
|
# - name: Build all projects in documentation/ & move to ~/dist/docs/
|
||||||
- name: Build project
|
# run: cd documentation && ./build_all_to_dist.sh
|
||||||
run: pnpm run build
|
|
||||||
- name: Move files to /dist/
|
# This is a workaround replacement which builds on the last working commit b332a6b55668f60988e36961f3f62a794ba82ddb and then on current branch
|
||||||
run: ../scripts/move-to-dist.sh
|
- name: Save current branch to ~/current_branch
|
||||||
|
run: git rev-parse --abbrev-ref HEAD > ~/current_branch
|
||||||
|
- name: Git pull & switch to b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
|
run: git pull && git checkout b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
|
- name: Build all projects in documentation/ & move to ~/dist/docs/ from b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||||
|
run: cd documentation && ./build_all_to_dist.sh
|
||||||
|
|
||||||
|
- name: Switch to current branch
|
||||||
|
run: git checkout $echo "$(cat ~/current_branch)"
|
||||||
|
- name: Build all projects in documentation/ & move to ~/dist/docs/ on current branch
|
||||||
|
run: cd documentation && ./build_all_to_dist.sh && rm ~/current_branch
|
||||||
|
|
||||||
|
# End of replacemet
|
||||||
|
|
||||||
- name: Deploy branch to CI www
|
- name: Deploy branch to CI www
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -60,5 +63,26 @@ jobs:
|
|||||||
SOURCE: "dist/docs/"
|
SOURCE: "dist/docs/"
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-nextra-${{ env.GITHUB_REF_SLUG }}
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-${{ env.GITHUB_REF_SLUG }}
|
||||||
EXCLUDE: "/node_modules/"
|
EXCLUDE: "/node_modules/"
|
||||||
|
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: ci-docs
|
||||||
|
NYM_PROJECT_NAME: "Docs CI"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "docs-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DOCS }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
name: ci-lint-typescript
|
name: ci-lint-typescript
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "ts-packages/**"
|
- "ts-packages/**"
|
||||||
@@ -11,20 +10,17 @@ on:
|
|||||||
- "nym-wallet/src/**"
|
- "nym-wallet/src/**"
|
||||||
- "nym-wallet/package.json"
|
- "nym-wallet/package.json"
|
||||||
- "explorer/**"
|
- "explorer/**"
|
||||||
- ".github/workflows/ci-lint-typescript.yml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-20.04-16-core
|
||||||
env:
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- name: Setup yarn
|
- name: Setup yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
@@ -42,9 +38,9 @@ jobs:
|
|||||||
version: '116'
|
version: '116'
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.7"
|
go-version: '1.20'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: yarn
|
run: yarn
|
||||||
@@ -56,3 +52,24 @@ jobs:
|
|||||||
run: yarn lint
|
run: yarn lint
|
||||||
- name: Typecheck with tsc
|
- name: Typecheck with tsc
|
||||||
run: yarn tsc
|
run: yarn tsc
|
||||||
|
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: ts-packages
|
||||||
|
NYM_PROJECT_NAME: "ts-packages"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
name: ci-nym-api-tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "nym-api/**"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-api/tests
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: nym-api tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: install yarn in root
|
||||||
|
run: cd ../.. && yarn install
|
||||||
|
|
||||||
|
- name: Install npm
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Node v18
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.1.0
|
||||||
|
|
||||||
|
- name: Install yarn
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Run yarn
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: yarn test:sandbox
|
||||||
|
working-directory: nym-api/tests
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: ci-nym-connect-desktop-rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "nym-connect/desktop/src-tauri/**"
|
||||||
|
- "nym-connect/desktop/src-tauri/Cargo.toml"
|
||||||
|
- "clients/client-core/**"
|
||||||
|
- "clients/socks5/**"
|
||||||
|
- "common/**"
|
||||||
|
- "gateway/gateway-requests/**"
|
||||||
|
- "contracts/vesting/**"
|
||||||
|
- "nym-api/nym-api-requests/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [self-hosted, custom-linux]
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies (Linux)
|
||||||
|
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools libayatana-appindicator3-dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --manifest-path nym-connect/desktop/Cargo.toml --all -- --check
|
||||||
|
|
||||||
|
- name: Build all binaries
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace
|
||||||
|
|
||||||
|
- name: Run all tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace
|
||||||
|
|
||||||
|
- uses: actions-rs/clippy-check@v1
|
||||||
|
name: Clippy checks
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace --all-features
|
||||||
|
|
||||||
|
- name: Run clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --manifest-path nym-connect/desktop/Cargo.toml --workspace --all-features -- -D warnings
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
name: ci-nym-connect-desktop
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'nym-connect/desktop/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-connect/desktop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install rsync
|
||||||
|
run: sudo apt-get install rsync
|
||||||
|
continue-on-error: true
|
||||||
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Install Yarn
|
||||||
|
run: npm install -g yarn
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
- name: Install project dependencies
|
||||||
|
run: cd ../.. && yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Install app dependencies
|
||||||
|
run: yarn
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Set environment from the example
|
||||||
|
run: cp .env.sample .env
|
||||||
|
- run: yarn storybook:build
|
||||||
|
- name: Deploy branch to CI www
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "nym-connect/desktop/storybook-static/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/nym-connect-${{ env.GITHUB_REF_SLUG }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: nym-connect
|
||||||
|
NYM_PROJECT_NAME: "nym-connect"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "nym-connect-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
name: ci-nym-network-explorer
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'explorer/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: explorer
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install rsync
|
||||||
|
run: sudo apt-get install rsync
|
||||||
|
continue-on-error: true
|
||||||
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Setup yarn
|
||||||
|
run: npm install -g yarn
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Build shared packages
|
||||||
|
run: cd .. && yarn && yarn build
|
||||||
|
- name: Set environment from the example
|
||||||
|
run: cp .env.prod .env
|
||||||
|
# - run: yarn test
|
||||||
|
# continue-on-error: true
|
||||||
|
- run: yarn && yarn build
|
||||||
|
continue-on-error: true
|
||||||
|
- run: yarn storybook:build
|
||||||
|
name: Build storybook
|
||||||
|
- name: Deploy branch to CI www
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "explorer/dist/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/network-explorer-${{ env.GITHUB_REF_SLUG }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
- name: Deploy storybook to CI www
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "explorer/storybook-static/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/ne-sb-${{ env.GITHUB_REF_SLUG }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: network-explorer
|
||||||
|
NYM_PROJECT_NAME: "Network Explorer"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
|
NYM_CI_WWW_LOCATION: "network-explorer-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
NYM_CI_WWW_LOCATION_STORYBOOK: "ne-sb-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
- name: Deploy
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CD_PROD_NE_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "explorer/dist/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CD_PROD_NE_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CD_PROD_NE_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CD_PROD_NE_REMOTE_TARGET }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
@@ -1,31 +1,31 @@
|
|||||||
name: ci-nym-wallet-rust
|
name: ci-nym-wallet-rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'nym-wallet/**'
|
||||||
|
- 'common/**'
|
||||||
|
- 'contracts/vesting/**'
|
||||||
|
- 'nym-api/nym-api-requests/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'nym-wallet/**'
|
- 'nym-wallet/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- 'contracts/vesting/**'
|
- 'contracts/vesting/**'
|
||||||
- 'nym-api/nym-api-requests/**'
|
- 'nym-api/nym-api-requests/**'
|
||||||
- '.github/workflows/ci-nym-wallet-rust.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: [ self-hosted, custom-linux ]
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install system dependencies
|
- name: Install Dependencies (Linux)
|
||||||
run: |
|
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
||||||
sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev \
|
|
||||||
libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev jq \
|
|
||||||
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev make libfuse2 unzip librsvg2-dev file \
|
|
||||||
libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@@ -35,12 +35,6 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Set debug to false
|
|
||||||
working-directory: nym-wallet
|
|
||||||
run: |
|
|
||||||
sed -i.bak '1s/^/\[profile.dev\]\ndebug = false\n\n/' Cargo.toml
|
|
||||||
git diff
|
|
||||||
|
|
||||||
- name: Build all binaries
|
- name: Build all binaries
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -4,72 +4,71 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'nym-wallet/**'
|
- 'nym-wallet/**'
|
||||||
- '.github/workflows/ci-nym-wallet-storybook.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: custom-linux
|
runs-on: custom-linux
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: sudo apt-get install rsync
|
run: sudo apt-get install rsync
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
|
|
||||||
- name: Setup yarn
|
- name: Setup yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
- name: Build dependencies
|
- name: Build dependencies
|
||||||
run: yarn && yarn build
|
run: yarn && yarn build
|
||||||
|
|
||||||
- name: Build storybook
|
- name: Build storybook
|
||||||
run: yarn storybook:build
|
run: yarn storybook:build
|
||||||
working-directory: ./nym-wallet
|
working-directory: ./nym-wallet
|
||||||
|
|
||||||
- name: Deploy branch to CI www (storybook)
|
- name: Deploy branch to CI www (storybook)
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: easingthemes/ssh-deploy@main
|
uses: easingthemes/ssh-deploy@main
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
ARGS: "-rltgoDzvO --delete"
|
ARGS: "-rltgoDzvO --delete"
|
||||||
SOURCE: "nym-wallet/storybook-static/"
|
SOURCE: "nym-wallet/storybook-static/"
|
||||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/wallet-${{ env.GITHUB_REF_SLUG }}
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/wallet-${{ env.GITHUB_REF_SLUG }}
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
|
||||||
- name: Matrix - Node Install
|
- name: Matrix - Node Install
|
||||||
run: npm install
|
run: npm install
|
||||||
working-directory: .github/workflows/support-files
|
working-directory: .github/workflows/support-files
|
||||||
|
|
||||||
- name: Matrix - Send Notification
|
- name: Matrix - Send Notification
|
||||||
env:
|
env:
|
||||||
NYM_NOTIFICATION_KIND: nym-wallet
|
NYM_NOTIFICATION_KIND: nym-wallet
|
||||||
NYM_PROJECT_NAME: "nym-wallet"
|
NYM_PROJECT_NAME: "nym-wallet"
|
||||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}"
|
||||||
NYM_CI_WWW_LOCATION: "wallet-${{ env.GITHUB_REF_SLUG }}"
|
NYM_CI_WWW_LOCATION: "wallet-${{ env.GITHUB_REF_SLUG }}"
|
||||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
uses: docker://keybaseio/client:stable-node
|
uses: docker://keybaseio/client:stable-node
|
||||||
with:
|
with:
|
||||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
name: ci-sdk-docs-typescript
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "sdk/typescript/**"
|
||||||
|
- "wasm/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install rsync
|
||||||
|
run: sudo apt-get install rsync
|
||||||
|
continue-on-error: true
|
||||||
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Setup yarn
|
||||||
|
run: npm install -g yarn
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
|
- name: Install wasm-opt
|
||||||
|
uses: ./.github/actions/install-wasm-opt
|
||||||
|
with:
|
||||||
|
version: '116'
|
||||||
|
|
||||||
|
- name: Build branch WASM packages
|
||||||
|
run: make sdk-wasm-build
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: yarn
|
||||||
|
- name: Build
|
||||||
|
run: yarn docs:prod:build
|
||||||
|
- name: Deploy branch to CI www (docs)
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-rltgoDzvO --delete"
|
||||||
|
SOURCE: "dist/ts/"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/sdk-ts-docs-${{ env.GITHUB_REF_SLUG }}
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: ts-packages
|
||||||
|
NYM_PROJECT_NAME: "sdk-ts-docs"
|
||||||
|
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}/docs/sdk/typescript"
|
||||||
|
NYM_CI_WWW_LOCATION: "sdk-ts-docs-${{ env.GITHUB_REF_SLUG }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
@@ -1,26 +1,23 @@
|
|||||||
name: ci-sdk-wasm
|
name: ci-sdk-wasm
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'wasm/**'
|
- 'wasm/**'
|
||||||
- 'clients/client-core/**'
|
- 'clients/client-core/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- '.github/workflows/ci-sdk-wasm.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wasm:
|
wasm:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: [custom-linux]
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -31,9 +28,9 @@ jobs:
|
|||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.7"
|
go-version: '1.20'
|
||||||
|
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
@@ -46,11 +43,6 @@ jobs:
|
|||||||
- name: Install wasm-bindgen-cli
|
- name: Install wasm-bindgen-cli
|
||||||
run: cargo install wasm-bindgen-cli
|
run: cargo install wasm-bindgen-cli
|
||||||
|
|
||||||
- name: Set debug to false
|
|
||||||
run: |
|
|
||||||
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
|
|
||||||
git diff
|
|
||||||
|
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
run: make sdk-wasm-build
|
run: make sdk-wasm-build
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
name: Run SonarQube Scan
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
# pull_request:
|
|
||||||
# types: [opened, synchronize, reopened]
|
|
||||||
jobs:
|
|
||||||
sonarqube:
|
|
||||||
name: SonarQube
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
||||||
- name: SonarQube Scan
|
|
||||||
uses: SonarSource/sonarqube-scan-action@v5
|
|
||||||
env:
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
@@ -30,14 +30,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@v3
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v2
|
||||||
with:
|
with:
|
||||||
# Upload entire repository
|
# Upload entire repository
|
||||||
path: './ppa'
|
path: './ppa'
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v2
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ jobs:
|
|||||||
greeting:
|
greeting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v3
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-message: 'Thank you for raising this issue'
|
issue-message: 'Thank you for raising this issue'
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
name: Hello world
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
my-job:
|
|
||||||
runs-on: arc-ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: my-step
|
|
||||||
run: echo "Hello World!"
|
|
||||||
@@ -11,19 +11,18 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [stable, beta]
|
rust: [stable, beta]
|
||||||
os: [ubuntu-22.04, windows-latest, macos-latest]
|
os: [ubuntu-20.04, windows-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
IPINFO_API_TOKEN: ${{ secrets.IPINFO_API_TOKEN }}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler
|
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@@ -34,7 +33,7 @@ jobs:
|
|||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v3
|
uses: arduino/setup-protoc@v2
|
||||||
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
|
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -59,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
# To avoid running out of disk space, skip generating debug symbols
|
# To avoid running out of disk space, skip generating debug symbols
|
||||||
- name: Set debug to false (unix)
|
- name: Set debug to false (unix)
|
||||||
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
|
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
|
sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml
|
||||||
git diff
|
git diff
|
||||||
@@ -99,14 +98,14 @@ jobs:
|
|||||||
runs-on: custom-linux
|
runs-on: custom-linux
|
||||||
steps:
|
steps:
|
||||||
- name: Collect jobs status
|
- name: Collect jobs status
|
||||||
uses: technote-space/workflow-conclusion-action@v3
|
uses: technote-space/workflow-conclusion-action@v2
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- name: install npm
|
- name: install npm
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
if: env.WORKFLOW_CONCLUSION == 'failure'
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- name: Matrix - Node Install
|
- name: Matrix - Node Install
|
||||||
if: env.WORKFLOW_CONCLUSION == 'failure'
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
output1: ${{ steps.step2.outputs.latest_release }}
|
output1: ${{ steps.step2.outputs.latest_release }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set output variable to latest release branch
|
- name: Set output variable to latest release branch
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup git user
|
- name: Setup git user
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup git user
|
- name: Setup git user
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
name: nightly-nym-connect-desktop-build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '14 1 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
MANIFEST_PATH: --manifest-path nym-connect/desktop/Cargo.toml
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Dependencies (Linux)
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
||||||
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
|
||||||
|
- name: Install rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: ${{ env.MANIFEST_PATH }} --all -- --check
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: ${{ env.MANIFEST_PATH }} --release --workspace
|
||||||
|
|
||||||
|
- name: Unit tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: ${{ env.MANIFEST_PATH }} --workspace
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
|
notification:
|
||||||
|
needs: build
|
||||||
|
runs-on: custom-linux
|
||||||
|
steps:
|
||||||
|
- name: Collect jobs status
|
||||||
|
uses: technote-space/workflow-conclusion-action@v2
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: install npm
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Matrix - Node Install
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
run: npm install
|
||||||
|
working-directory: .github/workflows/support-files
|
||||||
|
- name: Matrix - Send Notification
|
||||||
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
|
env:
|
||||||
|
NYM_NOTIFICATION_KIND: nightly
|
||||||
|
NYM_PROJECT_NAME: "nym-connect-desktop-nightly-build"
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||||
|
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||||
|
IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}"
|
||||||
|
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||||
|
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_NIGHTLY }}"
|
||||||
|
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||||
|
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||||
|
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||||
|
uses: docker://keybaseio/client:stable-node
|
||||||
|
with:
|
||||||
|
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04, macos-latest, windows-latest]
|
os: [ubuntu-20.04, macos-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@@ -18,11 +18,11 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@@ -61,14 +61,14 @@ jobs:
|
|||||||
runs-on: custom-linux
|
runs-on: custom-linux
|
||||||
steps:
|
steps:
|
||||||
- name: Collect jobs status
|
- name: Collect jobs status
|
||||||
uses: technote-space/workflow-conclusion-action@v3
|
uses: technote-space/workflow-conclusion-action@v2
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- name: install npm
|
- name: install npm
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
if: env.WORKFLOW_CONCLUSION == 'failure'
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- name: Matrix - Node Install
|
- name: Matrix - Node Install
|
||||||
if: env.WORKFLOW_CONCLUSION == 'failure'
|
if: env.WORKFLOW_CONCLUSION == 'failure'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ on:
|
|||||||
- cron: '5 9 * * *'
|
- cron: '5 9 * * *'
|
||||||
jobs:
|
jobs:
|
||||||
cargo-deny:
|
cargo-deny:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository code
|
- name: Checkout repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
find . -name Cargo.toml -exec cargo deny --manifest-path {} check \
|
find . -name Cargo.toml -exec cargo deny --manifest-path {} check \
|
||||||
advisories -A advisory-not-detected --hide-inclusion-graph \; &> \
|
advisories -A advisory-not-detected --hide-inclusion-graph \; &> \
|
||||||
>(uniq &> .github/workflows/support-files/notifications/deny.message )
|
>(uniq &> .github/workflows/support-files/notifications/deny.message )
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: report
|
name: report
|
||||||
path: .github/workflows/support-files/notifications/deny.message
|
path: .github/workflows/support-files/notifications/deny.message
|
||||||
@@ -29,16 +29,16 @@ jobs:
|
|||||||
runs-on: custom-linux
|
runs-on: custom-linux
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Download report from previous job
|
- name: Download report from previous job
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: report
|
name: report
|
||||||
path: .github/workflows/support-files/notifications
|
path: .github/workflows/support-files/notifications
|
||||||
- name: install npm
|
- name: install npm
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- name: Matrix - Node Install
|
- name: Matrix - Node Install
|
||||||
run: npm install
|
run: npm install
|
||||||
working-directory: .github/workflows/support-files
|
working-directory: .github/workflows/support-files
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
name: Integration Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "nym-api/**"
|
|
||||||
- "tests/**"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
integration-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
API_BASE_URL: http://localhost:8000
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
|
|
||||||
|
|
||||||
- name: Build nym-api
|
|
||||||
run: cargo build --package nym-api
|
|
||||||
|
|
||||||
- name: Run nym-api in the background
|
|
||||||
run: |
|
|
||||||
./target/debug/nym-api &
|
|
||||||
|
|
||||||
- name: Wait for nym-api to come alive
|
|
||||||
run: |
|
|
||||||
for i in {1..20}; do
|
|
||||||
curl -sSf http://localhost:8000/v1/status/config-score-details && break
|
|
||||||
echo "Waiting for nym-api to start..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Run integration tests
|
|
||||||
env:
|
|
||||||
NYM_API: https://sandbox-nym-api1.nymtech.net/api
|
|
||||||
run: cargo test --test public-api-tests -- --nocapture
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
name: pr-validation
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
- "release/**"
|
|
||||||
paths-ignore:
|
|
||||||
- "documentation/**"
|
|
||||||
types:
|
|
||||||
- labeled
|
|
||||||
- unlabeled
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
- synchronize
|
|
||||||
- edited
|
|
||||||
- milestoned
|
|
||||||
- demilestoned
|
|
||||||
|
|
||||||
env:
|
|
||||||
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-milestone:
|
|
||||||
name: Check Milestone
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no-milestone' ) == false
|
|
||||||
run: exit 1
|
|
||||||
@@ -20,27 +20,33 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
platform: [custom-ubuntu-20.04]
|
||||||
- os: arc-ubuntu-22.04
|
runs-on: ${{ matrix.platform }}
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
release_id: ${{ steps.create-release.outputs.id }}
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }}
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }}
|
||||||
client_hash: ${{ steps.binary-hashes.outputs.client_hash }}
|
client_hash: ${{ steps.binary-hashes.outputs.client_hash }}
|
||||||
|
mixnode_hash: ${{ steps.binary-hashes.outputs.mixnode_hash }}
|
||||||
|
gateway_hash: ${{ steps.binary-hashes.outputs.gateway_hash }}
|
||||||
nymvisor_hash: ${{ steps.binary-hashes.outputs.nymvisor_hash }}
|
nymvisor_hash: ${{ steps.binary-hashes.outputs.nymvisor_hash }}
|
||||||
|
nymnode_hash: ${{ steps.binary-hashes.outputs.nymnode_hash }}
|
||||||
socks5_hash: ${{ steps.binary-hashes.outputs.socks5_hash }}
|
socks5_hash: ${{ steps.binary-hashes.outputs.socks5_hash }}
|
||||||
netreq_hash: ${{ steps.binary-hashes.outputs.netreq_hash }}
|
netreq_hash: ${{ steps.binary-hashes.outputs.netreq_hash }}
|
||||||
cli_hash: ${{ steps.binary-hashes.outputs.cli_hash }}
|
cli_hash: ${{ steps.binary-hashes.outputs.cli_hash }}
|
||||||
|
netstat_hash: ${{ steps.binary-hashes.outputs.netstat_hash }}
|
||||||
client_version: ${{ steps.binary-versions.outputs.client_version }}
|
client_version: ${{ steps.binary-versions.outputs.client_version }}
|
||||||
|
mixnode_version: ${{ steps.binary-versions.outputs.mixnode_version }}
|
||||||
|
gateway_version: ${{ steps.binary-versions.outputs.gateway_version }}
|
||||||
nymvisor_version: ${{ steps.binary-versions.outputs.nymvisor_version }}
|
nymvisor_version: ${{ steps.binary-versions.outputs.nymvisor_version }}
|
||||||
|
nymnode_version: ${{ steps.binary-versions.outputs.nymnode_version }}
|
||||||
socks5_version: ${{ steps.binary-versions.outputs.socks5_version }}
|
socks5_version: ${{ steps.binary-versions.outputs.socks5_version }}
|
||||||
netreq_version: ${{ steps.binary-versions.outputs.netreq_version }}
|
netreq_version: ${{ steps.binary-versions.outputs.netreq_version }}
|
||||||
cli_version: ${{ steps.binary-versions.outputs.cli_version }}
|
cli_version: ${{ steps.binary-versions.outputs.cli_version }}
|
||||||
|
netstat_version: ${{ steps.binary-versions.outputs.netstat_version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Dependencies (Linux)
|
- name: Install Dependencies (Linux)
|
||||||
run: sudo apt-get update && sudo apt-get -y install ripgrep libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
run: sudo apt-get update && sudo apt-get -y install ripgrep libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
|
||||||
@@ -54,40 +60,49 @@ jobs:
|
|||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.88.0
|
toolchain: stable
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build all binaries
|
- name: Build all binaries
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --workspace --release ${{ env.CARGO_FEATURES }}
|
args: --workspace --release
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: |
|
path: |
|
||||||
|
target/release/explorer-api
|
||||||
target/release/nym-client
|
target/release/nym-client
|
||||||
|
target/release/nym-gateway
|
||||||
|
target/release/nym-mixnode
|
||||||
target/release/nym-socks5-client
|
target/release/nym-socks5-client
|
||||||
target/release/nym-api
|
target/release/nym-api
|
||||||
target/release/nym-network-requester
|
target/release/nym-network-requester
|
||||||
|
target/release/nym-network-statistics
|
||||||
target/release/nym-cli
|
target/release/nym-cli
|
||||||
target/release/nymvisor
|
target/release/nymvisor
|
||||||
|
target/release/nym-node
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- id: create-release
|
- id: create-release
|
||||||
name: Upload to release based on tag name
|
name: Upload to release based on tag name
|
||||||
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
|
uses: softprops/action-gh-release@v1
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
|
target/release/explorer-api
|
||||||
target/release/nym-client
|
target/release/nym-client
|
||||||
|
target/release/nym-gateway
|
||||||
|
target/release/nym-mixnode
|
||||||
target/release/nym-socks5-client
|
target/release/nym-socks5-client
|
||||||
target/release/nym-api
|
target/release/nym-api
|
||||||
target/release/nym-network-requester
|
target/release/nym-network-requester
|
||||||
|
target/release/nym-network-statistics
|
||||||
target/release/nym-cli
|
target/release/nym-cli
|
||||||
target/release/nymvisor
|
target/release/nymvisor
|
||||||
|
target/release/nym-node
|
||||||
|
|
||||||
push-release-data-client:
|
push-release-data-client:
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
name: publish-nym-connect-macos
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-connect/desktop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [macos-12-large]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: |
|
||||||
|
export WASM_PACK_VERSION="v0.12.1"
|
||||||
|
curl -LO https://github.com/rustwasm/wasm-pack/releases/download/${WASM_PACK_VERSION}/wasm-pack-${WASM_PACK_VERSION}-x86_64-apple-darwin.tar.gz
|
||||||
|
tar xvzf wasm-pack-${WASM_PACK_VERSION}-x86_64-apple-darwin.tar.gz -C $HOME/.cargo/bin --strip-components=1
|
||||||
|
rm wasm-pack-${WASM_PACK_VERSION}-x86_64-apple-darwin.tar.gz
|
||||||
|
|
||||||
|
- name: Install the Apple developer certificate for code signing
|
||||||
|
env:
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
# create variables
|
||||||
|
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||||
|
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||||
|
|
||||||
|
# import certificate and provisioning profile from secrets
|
||||||
|
echo -n "$APPLE_CERTIFICATE" | base64 --decode --output $CERTIFICATE_PATH
|
||||||
|
|
||||||
|
# create temporary keychain
|
||||||
|
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||||
|
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||||
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||||
|
|
||||||
|
# import certificate to keychain
|
||||||
|
security import $CERTIFICATE_PATH -P "$APPLE_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||||
|
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||||
|
|
||||||
|
- name: Create env file
|
||||||
|
uses: timheuer/base64-to-file@v1.2
|
||||||
|
with:
|
||||||
|
fileName: '.env'
|
||||||
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
shell: bash
|
||||||
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Install app dependencies and build it
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
SENTRY_DSN_RUST: ${{ secrets.SENTRY_DSN_RUST }}
|
||||||
|
SENTRY_DSN_JS: ${{ secrets.SENTRY_DSN_JS }}
|
||||||
|
run: yarn && yarn build
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nym-connect_1.0.0_x64.dmg
|
||||||
|
path: nym-connect/desktop/target/release/bundle/dmg/nym-connect_1*_x64.dmg
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
- name: Clean up keychain
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||||
|
|
||||||
|
- id: create-release
|
||||||
|
name: Upload to release based on tag name
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
nym-connect/desktop/target/release/bundle/dmg/*.dmg
|
||||||
|
nym-connect/desktop/target/release/bundle/macos/*.app.tar.gz*
|
||||||
|
|
||||||
|
push-release-data:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
|
needs: publish-tauri
|
||||||
|
with:
|
||||||
|
release_tag: ${{ github.ref_name }}
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
name: publish-nym-connect-ubuntu
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-connect/desktop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [custom-ubuntu-20.04]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Tauri dependencies
|
||||||
|
run: >
|
||||||
|
sudo apt-get update &&
|
||||||
|
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
shell: bash
|
||||||
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Install app dependencies
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Create env file
|
||||||
|
uses: timheuer/base64-to-file@v1.2
|
||||||
|
with:
|
||||||
|
fileName: '.env'
|
||||||
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
|
- name: Build app
|
||||||
|
run: yarn build
|
||||||
|
env:
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
SENTRY_DSN_RUST: ${{ secrets.SENTRY_DSN_RUST }}
|
||||||
|
SENTRY_DSN_JS: ${{ secrets.SENTRY_DSN_JS }}
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nym-connect.AppImage.tar.gz
|
||||||
|
path: nym-connect/desktop/target/release/bundle/appimage/nym-connect_1*_amd64.AppImage
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
- id: create-release
|
||||||
|
name: Upload to release based on tag name
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
nym-connect/desktop/target/release/bundle/appimage/*.AppImage
|
||||||
|
nym-connect/desktop/target/release/bundle/appimage/*.AppImage.tar.gz*
|
||||||
|
|
||||||
|
push-release-data:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
|
needs: publish-tauri
|
||||||
|
with:
|
||||||
|
release_tag: ${{ github.ref_name }}
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
name: publish-nym-connect-win10
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-connect/desktop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [windows10]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean up first
|
||||||
|
continue-on-error: true
|
||||||
|
working-directory: .
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
del /s /q /A:H nym
|
||||||
|
rmdir /s /q nym
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Import signing certificate
|
||||||
|
env:
|
||||||
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
New-Item -ItemType directory -Path certificate
|
||||||
|
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
|
||||||
|
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
|
||||||
|
Remove-Item -path certificate -include tempCert.txt
|
||||||
|
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
|
||||||
|
|
||||||
|
- name: Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Create env file
|
||||||
|
uses: timheuer/base64-to-file@v1.2
|
||||||
|
with:
|
||||||
|
fileName: '.env'
|
||||||
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
shell: bash
|
||||||
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Install app dependencies
|
||||||
|
shell: bash
|
||||||
|
run: yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Build and sign it
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
SENTRY_DSN_RUST: ${{ secrets.SENTRY_DSN_RUST }}
|
||||||
|
SENTRY_DSN_JS: ${{ secrets.SENTRY_DSN_JS }}
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nym-connect_1.0.0_x64_en-US.msi
|
||||||
|
path: nym-connect/desktop/target/release/bundle/msi/nym-connect_1*_x64_en-US.msi
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
- id: create-release
|
||||||
|
name: Upload to release based on tag name
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
nym-connect/desktop/target/release/bundle/msi/*.msi
|
||||||
|
nym-connect/desktop/target/release/bundle/msi/*.msi.zip*
|
||||||
|
|
||||||
|
push-release-data:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
|
needs: publish-tauri
|
||||||
|
with:
|
||||||
|
release_tag: ${{ github.ref_name }}
|
||||||
|
secrets: inherit
|
||||||
@@ -2,45 +2,45 @@ name: publish-nym-contracts
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
release:
|
release:
|
||||||
types: [ created ]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-contracts-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-contracts-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, custom-ubuntu-20.04]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
toolchain: stable
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Install wasm-opt
|
- name: Install wasm-opt
|
||||||
uses: ./.github/actions/install-wasm-opt
|
run: cargo install --version 0.114.0 wasm-opt
|
||||||
with:
|
|
||||||
version: '114'
|
|
||||||
|
|
||||||
- name: Build release contracts
|
- name: Build release contracts
|
||||||
run: make contracts
|
run: make contracts
|
||||||
|
|
||||||
- name: Upload Mixnet Contract Artifact
|
- name: Upload Mixnet Contract Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mixnet_contract.wasm
|
name: mixnet_contract.wasm
|
||||||
path: contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm
|
path: contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Upload Vesting Contract Artifact
|
- name: Upload Vesting Contract Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: vesting_contract.wasm
|
name: vesting_contract.wasm
|
||||||
path: contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm
|
path: contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Upload to release based on tag name
|
- name: Upload to release based on tag name
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
|
|||||||
@@ -14,31 +14,27 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [macos-15]
|
platform: [macos-12-large]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
release_tag: ${{ github.ref_name }}
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Node
|
- name: Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 21
|
node-version: 18
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Add Rust target for x86_64-apple-darwin
|
|
||||||
run: rustup target add x86_64-apple-darwin
|
|
||||||
|
|
||||||
- name: Set Cargo build target to x86_64
|
|
||||||
run: echo "CARGO_BUILD_TARGET=x86_64-apple-darwin" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install the Apple developer certificate for code signing
|
- name: Install the Apple developer certificate for code signing
|
||||||
env:
|
env:
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
@@ -68,19 +64,11 @@ jobs:
|
|||||||
fileName: '.env'
|
fileName: '.env'
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
- name: Yarn cache clean
|
|
||||||
shell: bash
|
|
||||||
run: cd .. && yarn cache clean
|
|
||||||
|
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd .. && yarn --network-timeout 100000
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
- name: Yarn build
|
- name: Install app dependencies and build it
|
||||||
shell: bash
|
|
||||||
run: cd .. && yarn build
|
|
||||||
|
|
||||||
- name: Install dependencies and build it
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
@@ -90,48 +78,46 @@ jobs:
|
|||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_IDENTITY_ID }}
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
# Tauri v2 specific environment variables
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
run: yarn && yarn build
|
||||||
TAURI_NOTARIZATION_USERNAME: ${{ secrets.APPLE_ID }}
|
|
||||||
TAURI_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
TAURI_NOTARIZATION_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
run: |
|
|
||||||
yarn build-macx86
|
|
||||||
|
|
||||||
- name: Create app tarball
|
|
||||||
run: |
|
|
||||||
# Navigate to where the app bundle is and create the tarball
|
|
||||||
cd target/x86_64-apple-darwin/release/bundle/macos
|
|
||||||
echo "Creating tarball from app bundle"
|
|
||||||
tar -czf nym-wallet.app.tar.gz NymWallet.app
|
|
||||||
cd -
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: nym-wallet.app.tar.gz
|
name: nym-wallet.app.tar.gz
|
||||||
path: nym-wallet/target/x86_64-apple-darwin/release/bundle/macos/nym-wallet.app.tar.gz
|
path: nym-wallet/target/release/bundle/macos/nym-wallet.app.tar.gz
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Clean up keychain
|
- name: Clean up keychain
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||||
|
|
||||||
- id: create-release
|
- id: create-release
|
||||||
name: Upload to release based on tag name
|
name: Upload to release based on tag name
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
nym-wallet/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
|
nym-wallet/target/release/bundle/dmg/*.dmg
|
||||||
nym-wallet/target/x86_64-apple-darwin/release/bundle/macos/*.app.tar.gz*
|
nym-wallet/target/release/bundle/macos/*.app.tar.gz*
|
||||||
|
|
||||||
|
- name: Deploy artifacts to CI www
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-avzr"
|
||||||
|
SOURCE: "nym-wallet/target/release/bundle/macos/nym-wallet.app.tar.gz"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/${{ github.ref_name }}/nym-wallet
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
|
||||||
push-release-data:
|
push-release-data:
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
uses: ./.github/workflows/release-calculate-hash.yml
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
needs: publish-tauri
|
needs: publish-tauri
|
||||||
with:
|
with:
|
||||||
release_tag: ${{ needs.publish-tauri.outputs.release_tag || github.ref_name }}
|
release_tag: ${{ github.ref_name }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -3,135 +3,96 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: nym-wallet
|
working-directory: nym-wallet
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-tauri:
|
publish-tauri:
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-22.04]
|
platform: [custom-ubuntu-20.04]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
release_tag: ${{ github.ref_name }}
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Tauri dependencies
|
||||||
run: |
|
run: >
|
||||||
sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev \
|
sudo apt-get update &&
|
||||||
libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev jq \
|
sudo apt-get install -y webkit2gtk-4.0
|
||||||
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev make libfuse2 unzip librsvg2-dev file \
|
continue-on-error: true
|
||||||
libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Node
|
- name: Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 21
|
node-version: 18
|
||||||
cache: 'yarn'
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd .. && yarn --network-timeout 100000
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
- name: Install app dependencies
|
- name: Install app dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
|
|
||||||
- name: Create env file
|
- name: Create env file
|
||||||
uses: timheuer/base64-to-file@v1.2
|
uses: timheuer/base64-to-file@v1.2
|
||||||
with:
|
with:
|
||||||
fileName: '.env'
|
fileName: '.env'
|
||||||
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: yarn build
|
run: yarn build
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Check bundle directory
|
|
||||||
run: |
|
|
||||||
echo "Checking bundle directory structure"
|
|
||||||
ls -la target/release/bundle || echo "Bundle directory not found"
|
|
||||||
if [ -d "target/release/bundle/appimage" ]; then
|
|
||||||
echo "AppImage bundle directory exists, checking contents:"
|
|
||||||
ls -la target/release/bundle/appimage
|
|
||||||
else
|
|
||||||
echo "AppImage bundle directory not found, checking alternatives:"
|
|
||||||
find target/release/bundle -type d -name "*appimage*" -o -name "*AppImage*" || echo "No AppImage directories found"
|
|
||||||
find target/release/bundle -name "*.AppImage" -o -name "*.appimage" || echo "No AppImage files found"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create AppImage tarball if needed
|
|
||||||
run: |
|
|
||||||
# Find the AppImage file
|
|
||||||
APPIMAGE_FILE=$(find target/release/bundle -name "*.AppImage" | head -n 1)
|
|
||||||
if [ -n "$APPIMAGE_FILE" ]; then
|
|
||||||
echo "Found AppImage file: $APPIMAGE_FILE"
|
|
||||||
APPIMAGE_DIR=$(dirname "$APPIMAGE_FILE")
|
|
||||||
APPIMAGE_NAME=$(basename "$APPIMAGE_FILE")
|
|
||||||
|
|
||||||
# Create tarball if it doesn't exist
|
|
||||||
if [ ! -f "${APPIMAGE_FILE}.tar.gz" ]; then
|
|
||||||
echo "Creating tarball for $APPIMAGE_NAME"
|
|
||||||
cd "$APPIMAGE_DIR"
|
|
||||||
tar -czf "${APPIMAGE_NAME}.tar.gz" "$APPIMAGE_NAME"
|
|
||||||
cd -
|
|
||||||
echo "Created tarball: ${APPIMAGE_FILE}.tar.gz"
|
|
||||||
else
|
|
||||||
echo "Tarball already exists: ${APPIMAGE_FILE}.tar.gz"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "WARNING: No AppImage file found!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: nym-wallet-appimage.tar.gz
|
name: nym-wallet_1.0.0_amd64.AppImage.tar.gz
|
||||||
path: |
|
path: nym-wallet/target/release/bundle/appimage/nym-wallet*.AppImage.tar.gz
|
||||||
nym-wallet/target/release/bundle/appimage/*.AppImage.tar.gz
|
|
||||||
nym-wallet/target/release/bundle/*/nym-wallet*.AppImage.tar.gz
|
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- id: create-release
|
- id: create-release
|
||||||
name: Upload to release based on tag name
|
name: Upload to release based on tag name
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
nym-wallet/target/release/bundle/appimage/*.AppImage
|
nym-wallet/target/release/bundle/appimage/*.AppImage
|
||||||
nym-wallet/target/release/bundle/appimage/*.AppImage.tar.gz
|
nym-wallet/target/release/bundle/appimage/*.AppImage.tar.gz*
|
||||||
nym-wallet/target/release/bundle/*/nym-wallet*.AppImage
|
|
||||||
nym-wallet/target/release/bundle/*/nym-wallet*.AppImage.tar.gz
|
- name: Deploy artifacts to CI www
|
||||||
|
continue-on-error: true
|
||||||
- name: Find AppImage tarball path for deployment
|
uses: easingthemes/ssh-deploy@main
|
||||||
id: find-appimage
|
env:
|
||||||
run: |
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
APPIMAGE_TARBALL=$(find target/release/bundle -name "*.AppImage.tar.gz" | head -n 1)
|
ARGS: "-avzr"
|
||||||
if [ -n "$APPIMAGE_TARBALL" ]; then
|
SOURCE: "nym-wallet/target/release/bundle/appimage/nym-wallet*.AppImage.tar.gz"
|
||||||
echo "Found AppImage tarball: $APPIMAGE_TARBALL"
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
echo "appimage_path=$APPIMAGE_TARBALL" >> $GITHUB_OUTPUT
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
else
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/${{ github.ref_name }}/nym-wallet
|
||||||
echo "WARNING: No AppImage tarball found for deployment!"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
echo "appimage_path=target/release/bundle/appimage/nym-wallet*.AppImage.tar.gz" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
push-release-data:
|
push-release-data:
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
uses: ./.github/workflows/release-calculate-hash.yml
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
needs: publish-tauri
|
needs: publish-tauri
|
||||||
with:
|
with:
|
||||||
release_tag: ${{ needs.publish-tauri.outputs.release_tag || github.ref_name }}
|
release_tag: ${{ github.ref_name }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
name: publish-nym-wallet-win10
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: nym-wallet
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [windows10]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
release_id: ${{ steps.create-release.outputs.id }}
|
||||||
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
||||||
|
version: ${{ steps.release-info.outputs.version }}
|
||||||
|
filename: ${{ steps.release-info.outputs.filename }}
|
||||||
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean up first
|
||||||
|
continue-on-error: true
|
||||||
|
working-directory: .
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
del /s /q /A:H nym
|
||||||
|
rmdir /s /q nym
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Import signing certificate
|
||||||
|
env:
|
||||||
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
New-Item -ItemType directory -Path certificate
|
||||||
|
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
|
||||||
|
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
|
||||||
|
Remove-Item -path certificate -include tempCert.txt
|
||||||
|
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
|
||||||
|
|
||||||
|
- name: Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
|
||||||
|
- name: Install Rust stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Create env file
|
||||||
|
uses: timheuer/base64-to-file@v1.2
|
||||||
|
with:
|
||||||
|
fileName: '.env'
|
||||||
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
shell: bash
|
||||||
|
run: cd .. && yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Install app dependencies
|
||||||
|
shell: bash
|
||||||
|
run: yarn --network-timeout 100000
|
||||||
|
|
||||||
|
- name: Build and sign it
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
|
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nym-wallet_1.0.0_x64_en-US.msi
|
||||||
|
path: nym-wallet/target/release/bundle/msi/nym-wallet_1.*.msi
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
- id: create-release
|
||||||
|
name: Upload to release based on tag name
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
nym-wallet/target/release/bundle/msi/*.msi
|
||||||
|
nym-wallet/target/release/bundle/msi/*.msi.zip*
|
||||||
|
|
||||||
|
- name: Deploy artifacts to CI www
|
||||||
|
continue-on-error: true
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||||
|
ARGS: "-avzr"
|
||||||
|
SOURCE: "nym-wallet/target/release/bundle/msi/nym-wallet_1.*.msi"
|
||||||
|
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||||
|
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||||
|
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/${{ github.ref_name }}/nym-wallet
|
||||||
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
|
||||||
|
push-release-data:
|
||||||
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
||||||
|
uses: ./.github/workflows/release-calculate-hash.yml
|
||||||
|
needs: publish-tauri
|
||||||
|
with:
|
||||||
|
release_tag: ${{ github.ref_name }}
|
||||||
|
secrets: inherit
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
name: publish-nym-wallet-win11
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
sign:
|
|
||||||
description: "Sign this build using SSL.com. Signing is billed per signature so be careful"
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: nym-wallet
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-tauri:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [custom-windows-11]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
release_tag: ${{ github.ref_name }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Setup MSBuild.exe
|
|
||||||
uses: microsoft/setup-msbuild@v2
|
|
||||||
|
|
||||||
- name: Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 21
|
|
||||||
|
|
||||||
- name: Download EV CodeSignTool from ssl.com
|
|
||||||
working-directory: nym-wallet/src-tauri
|
|
||||||
if: ${{ inputs.sign }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl -L0 https://www.ssl.com/download/codesigntool-for-linux-and-macos/ -o codesigntool.zip
|
|
||||||
unzip codesigntool.zip
|
|
||||||
- name: Get EV certificate credential id
|
|
||||||
working-directory: nym-wallet/src-tauri
|
|
||||||
if: ${{ inputs.sign }}
|
|
||||||
id: get_credential_ids
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "SSL_COM_CREDENTIAL_ID=$(./CodeSignTool.sh get_credential_ids -username=${{ secrets.SSL_COM_USERNAME }} -password=${{ secrets.SSL_COM_PASSWORD }} | sed -n '1!p' | sed 's/- //')" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Add custom sign command to tauri.conf.json
|
|
||||||
working-directory: nym-wallet/src-tauri
|
|
||||||
if: ${{ inputs.sign }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
yq eval --inplace '.bundle.windows +=
|
|
||||||
{
|
|
||||||
"signCommand": {
|
|
||||||
"cmd": "C:\Program Files\Git\bin\bash.EXE",
|
|
||||||
"args": [
|
|
||||||
"/c/actions-runner/_work/nym/nym/nym-wallet/src-tauri/CodeSignTool.sh",
|
|
||||||
"sign",
|
|
||||||
"-username ${{ secrets.SSL_COM_USERNAME }}",
|
|
||||||
"-password ${{ secrets.SSL_COM_PASSWORD }}",
|
|
||||||
"-credential_id ${{ steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}",
|
|
||||||
"-totp_secret ${{ secrets.SSL_COM_TOTP_SECRET }}",
|
|
||||||
"-program_name NymWallet",
|
|
||||||
"-input_file_path",
|
|
||||||
"%1",
|
|
||||||
"-override"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}' tauri.conf.json
|
|
||||||
- name: Install project dependencies
|
|
||||||
shell: bash
|
|
||||||
run: cd .. && yarn --network-timeout 100000
|
|
||||||
|
|
||||||
- name: Install app dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn --network-timeout 100000
|
|
||||||
|
|
||||||
- name: Build and sign it
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
SSL_COM_USERNAME: ${{ inputs.sign && secrets.SSL_COM_USERNAME }}
|
|
||||||
SSL_COM_PASSWORD: ${{ inputs.sign && secrets.SSL_COM_PASSWORD }}
|
|
||||||
SSL_COM_CREDENTIAL_ID: ${{ inputs.sign && steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
|
|
||||||
SSL_COM_TOTP_SECRET: ${{ inputs.sign && secrets.SSL_COM_TOTP_SECRET }}
|
|
||||||
run: |
|
|
||||||
echo "Starting build process..."
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
- name: Check bundle directory
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "Checking bundle directory structure"
|
|
||||||
|
|
||||||
# Check standard location
|
|
||||||
if [ -d "target/release/bundle" ]; then
|
|
||||||
echo "Found bundle directory at standard location"
|
|
||||||
ls -la target/release/bundle || echo "Failed to list bundle directory"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check src-tauri location
|
|
||||||
if [ -d "src-tauri/target/release/bundle" ]; then
|
|
||||||
echo "Found bundle directory in src-tauri"
|
|
||||||
ls -la src-tauri/target/release/bundle || echo "Failed to list src-tauri bundle directory"
|
|
||||||
|
|
||||||
# Use this path for future steps
|
|
||||||
echo "BUNDLE_PATH=src-tauri/target/release/bundle" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "Using standard bundle path"
|
|
||||||
echo "BUNDLE_PATH=target/release/bundle" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for MSI files in any location
|
|
||||||
find . -name "*.msi" -type f
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: nym-wallet.msi
|
|
||||||
path: |
|
|
||||||
nym-wallet/${{ env.BUNDLE_PATH }}/msi/*.msi
|
|
||||||
nym-wallet/${{ env.BUNDLE_PATH }}/*/nym-wallet*.msi
|
|
||||||
nym-wallet/src-tauri/target/release/bundle/msi/*.msi
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- id: create-release
|
|
||||||
name: Upload to release based on tag name
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
nym-wallet/${{ env.BUNDLE_PATH }}/msi/*.msi
|
|
||||||
nym-wallet/${{ env.BUNDLE_PATH }}/msi/*.msi.zip*
|
|
||||||
nym-wallet/${{ env.BUNDLE_PATH }}/*/nym-wallet*.msi
|
|
||||||
nym-wallet/src-tauri/target/release/bundle/msi/*.msi
|
|
||||||
|
|
||||||
- name: Find MSI path for deployment
|
|
||||||
id: find-msi
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
MSI_FILE=$(find . -name "*.msi" -type f | head -n 1)
|
|
||||||
if [ -n "$MSI_FILE" ]; then
|
|
||||||
echo "Found MSI file: $MSI_FILE"
|
|
||||||
echo "msi_path=$MSI_FILE" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "WARNING: No MSI file found for deployment!"
|
|
||||||
echo "msi_path=${{ env.BUNDLE_PATH }}/msi/nym-wallet*.msi" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
push-release-data:
|
|
||||||
if: ${{ (startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
||||||
uses: ./.github/workflows/release-calculate-hash.yml
|
|
||||||
needs: publish-tauri
|
|
||||||
with:
|
|
||||||
release_tag: ${{ needs.publish-tauri.outputs.release_tag || github.ref_name }}
|
|
||||||
secrets: inherit
|
|
||||||
@@ -12,7 +12,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build APK
|
name: Build APK
|
||||||
runs-on: custom-ubuntu-22.04
|
runs-on: custom-ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
ANDROID_HOME: ${{ github.workspace }}/android-sdk
|
ANDROID_HOME: ${{ github.workspace }}/android-sdk
|
||||||
NDK_VERSION: 25.2.9519653
|
NDK_VERSION: 25.2.9519653
|
||||||
@@ -22,10 +22,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Java
|
- name: Install Java
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
@@ -49,13 +49,21 @@ jobs:
|
|||||||
"build-tools;$SDK_BUILDTOOLS_VERSION"
|
"build-tools;$SDK_BUILDTOOLS_VERSION"
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@1.100.0
|
uses: dtolnay/rust-toolchain@1.70.0
|
||||||
|
|
||||||
- name: Install rust android targets
|
- name: Install rust android targets
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-linux-android \
|
rustup target add aarch64-linux-android \
|
||||||
x86_64-linux-android
|
x86_64-linux-android
|
||||||
|
|
||||||
|
- name: Build lib nym-socks5-listener
|
||||||
|
working-directory: sdk/lib/socks5-listener/
|
||||||
|
env:
|
||||||
|
RELEASE: true
|
||||||
|
RUSTFLAGS: "-C link-args=-Wl,--hash-style=gnu"
|
||||||
|
# build for arm64 and x86_64
|
||||||
|
run: ./build-android.sh aarch64 x86_64
|
||||||
|
|
||||||
- name: Build APKs (unsigned)
|
- name: Build APKs (unsigned)
|
||||||
working-directory: nym-connect/native/android
|
working-directory: nym-connect/native/android
|
||||||
env:
|
env:
|
||||||
@@ -76,7 +84,7 @@ jobs:
|
|||||||
apk/nyms5-arch64-release.apk
|
apk/nyms5-arch64-release.apk
|
||||||
|
|
||||||
- name: Upload APKs
|
- name: Upload APKs
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: nyms5-apk-arch64
|
name: nyms5-apk-arch64
|
||||||
path: |
|
path: |
|
||||||
@@ -89,14 +97,14 @@ jobs:
|
|||||||
runs-on: custom-linux
|
runs-on: custom-linux
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- name: Download binary artifact
|
- name: Download binary artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: nyms5-apk-arch64
|
name: nyms5-apk-arch64
|
||||||
path: apk
|
path: apk
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
apk/nyms5-arch64-debug.apk
|
apk/nyms5-arch64-debug.apk
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: arc-ubuntu-22.04
|
runs-on: ubuntu-20.04-16-core
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Setup yarn
|
- name: Setup yarn
|
||||||
@@ -29,9 +29,14 @@ jobs:
|
|||||||
run: cargo install wasm-opt
|
run: cargo install wasm-opt
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.7"
|
go-version: "1.20"
|
||||||
|
|
||||||
|
- name: Install TinyGo
|
||||||
|
uses: acifani/setup-tinygo@v1
|
||||||
|
with:
|
||||||
|
tinygo-version: "0.27.0"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Build and upload Credential Proxy container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-credential-proxy"
|
|
||||||
CONTAINER_NAME: "credential-proxy"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-credential-proxy/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if tag exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ steps.get_version.outputs.value }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ steps.get_version.outputs.value }} already exists"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
git push --delete origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/nym-credential-proxy/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Build and upload Data observatory container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-data-observatory"
|
|
||||||
CONTAINER_NAME: "data-observatory"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if tag exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ steps.get_version.outputs.value }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ steps.get_version.outputs.value }} already exists"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
git push --delete origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
name: Build and upload Network monitor container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "."
|
|
||||||
CONTAINER_NAME: "network-monitor"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-network-monitor/Cargo.toml
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
echo "Checking if tag ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} exists..."
|
|
||||||
if git rev-parse ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} already exists"
|
|
||||||
git push --delete origin ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f nym-network-monitor.dockerfile ${{ env.WORKING_DIRECTORY }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
name: Build and upload Node Status agent container to harbor.nymte.ch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
gateway_probe_git_ref:
|
|
||||||
type: string
|
|
||||||
default: nym-vpn-core-v1.4.0
|
|
||||||
required: true
|
|
||||||
description: Which gateway probe git ref to build the image with
|
|
||||||
release_image:
|
|
||||||
description: 'Tag image as a release'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-node-status-api/nym-node-status-agent"
|
|
||||||
CONTAINER_NAME: "node-status-agent"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml)
|
|
||||||
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: cleanup-gateway-probe-ref
|
|
||||||
id: cleanup_gateway_probe_ref
|
|
||||||
run: |
|
|
||||||
GATEWAY_PROBE_GIT_REF=${{ github.event.inputs.gateway_probe_git_ref }}
|
|
||||||
GIT_REF_SLUG="${GATEWAY_PROBE_GIT_REF//\//-}"
|
|
||||||
echo "git_ref=${GIT_REF_SLUG}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set GIT_TAG variable
|
|
||||||
run: echo "GIT_TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Initialize RELEASE_TAG
|
|
||||||
run: echo "RELEASE_TAG=" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set RELEASE_TAG for release
|
|
||||||
if: github.event.inputs.release_image == 'true'
|
|
||||||
run: echo "RELEASE_TAG=golden-" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set IMAGE_NAME_AND_TAGS variable
|
|
||||||
run: echo "IMAGE_NAME_AND_TAGS=${{ env.CONTAINER_NAME }}:${{ env.RELEASE_TAG }}${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: New env vars
|
|
||||||
run: echo "RELEASE_TAG='$RELEASE_TAG' GIT_TAG='$GIT_TAG' IMAGE_NAME_AND_TAGS='$IMAGE_NAME_AND_TAGS'"
|
|
||||||
|
|
||||||
# - name: Remove existing tag if exists
|
|
||||||
# run: |
|
|
||||||
# if git rev-parse $${{ env.GIT_TAG }} >/dev/null 2>&1; then
|
|
||||||
# git push --delete origin $${{ env.GIT_TAG }}
|
|
||||||
# git tag -d $${{ env.GIT_TAG }}
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# - name: Create tag
|
|
||||||
# run: |
|
|
||||||
# git tag -a $${{ env.GIT_TAG }} -m "Version ${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}"
|
|
||||||
# git push origin $${{ env.GIT_TAG }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build --build-arg GIT_REF=${{ github.event.inputs.gateway_probe_git_ref }} -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.IMAGE_NAME_AND_TAGS }}
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
name: Build and upload Node Status API container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
release_image:
|
|
||||||
description: 'Tag image as a release'
|
|
||||||
required: true
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-node-status-api/nym-node-status-api"
|
|
||||||
CONTAINER_NAME: "node-status-api"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml)
|
|
||||||
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set GIT_TAG variable
|
|
||||||
run: echo "GIT_TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Initialise RELEASE_TAG
|
|
||||||
run: echo "RELEASE_TAG=" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set RELEASE_TAG for release
|
|
||||||
if: github.event.inputs.release_image == 'true'
|
|
||||||
run: echo "RELEASE_TAG=golden-" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set IMAGE_NAME_AND_TAGS variable
|
|
||||||
run: echo "IMAGE_NAME_AND_TAGS=${{ env.CONTAINER_NAME }}:${{ env.RELEASE_TAG }}${{ steps.get_version.outputs.result }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: New env vars
|
|
||||||
run: echo "RELEASE_TAG='$RELEASE_TAG' GIT_TAG='$GIT_TAG' IMAGE_NAME_AND_TAGS='$IMAGE_NAME_AND_TAGS'"
|
|
||||||
|
|
||||||
# - name: Remove existing tag if exists, then create
|
|
||||||
# run: |
|
|
||||||
# if git rev-parse "$GIT_TAG" >/dev/null 2>&1; then
|
|
||||||
# echo "Tag '$GIT_TAG' already exists, deleting"
|
|
||||||
# git push --delete origin "$GIT_TAG"
|
|
||||||
# git tag -d "$GIT_TAG"
|
|
||||||
# echo "Tag '$GIT_TAG' deleted"
|
|
||||||
# else
|
|
||||||
# echo "Tag '$GIT_TAG' does not exist, creating it"
|
|
||||||
# git tag -a $GIT_TAG -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
# git push origin $GIT_TAG
|
|
||||||
# echo "Tag '$GIT_TAG' created"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile-pg . -t harbor.nymte.ch/nym/${{ env.IMAGE_NAME_AND_TAGS }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
name: Build and upload Nym APU container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "."
|
|
||||||
CONTAINER_NAME: "nym-api"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/nym-api/Cargo.toml
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
echo "Checking if tag ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} exists..."
|
|
||||||
if git rev-parse ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} already exists"
|
|
||||||
git push --delete origin ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.CONTAINER_NAME }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f nym-api.dockerfile ${{ env.WORKING_DIRECTORY }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Build and upload nym node container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-node"
|
|
||||||
CONTAINER_NAME: "nym-node"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if tag exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ steps.get_version.outputs.value }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ steps.get_version.outputs.value }} already exists"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
git push --delete origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
name: Build and upload Nym Statistics API container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-statistics-api"
|
|
||||||
CONTAINER_NAME: "nym-statistics-api"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Build and upload Nyx Chain Watcher container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nyx-chain-watcher"
|
|
||||||
CONTAINER_NAME: "nyx-chain-watcher"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check if tag exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ steps.get_version.outputs.value }} >/dev/null 2>&1; then
|
|
||||||
echo "Tag ${{ steps.get_version.outputs.value }} already exists"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
git push --delete origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
name: Build and upload Validator Rewarder container to harbor.nymte.ch
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKING_DIRECTORY: "nym-validator-rewarder"
|
|
||||||
CONTAINER_NAME: "validator-rewarder"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: arc-ubuntu-22.04-dind
|
|
||||||
steps:
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: harbor.nymte.ch
|
|
||||||
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure git identity
|
|
||||||
run: |
|
|
||||||
git config --global user.email "lawrence@nymtech.net"
|
|
||||||
git config --global user.name "Lawrence Stalder"
|
|
||||||
|
|
||||||
- name: Get version from cargo.toml
|
|
||||||
uses: mikefarah/yq@v4.47.1
|
|
||||||
id: get_version
|
|
||||||
with:
|
|
||||||
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
|
|
||||||
|
|
||||||
- name: Remove existing tag if exists
|
|
||||||
run: |
|
|
||||||
if git rev-parse ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} >/dev/null 2>&1; then
|
|
||||||
git push --delete origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
git tag -d ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create tag
|
|
||||||
run: |
|
|
||||||
git tag -a ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }} -m "Version ${{ steps.get_version.outputs.result }}"
|
|
||||||
git push origin ${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
|
|
||||||
|
|
||||||
- name: BuildAndPushImageOnHarbor
|
|
||||||
run: |
|
|
||||||
docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest
|
|
||||||
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|
|
||||||
@@ -20,17 +20,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
- uses: nymtech/nym/.github/actions/nym-hash-releases@develop
|
- uses: nymtech/nym/.github/actions/nym-hash-releases@develop
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
release-tag-or-name-or-id: ${{ inputs.release_tag }}
|
release-tag-or-name-or-id: ${{ inputs.release_tag }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Asset Hashes
|
name: Asset Hashes
|
||||||
path: hashes.json
|
path: hashes.json
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
const Handlebars = require('handlebars');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
async function addToContextAndValidate(context) {
|
||||||
|
if (!context.env.NYM_CI_WWW_LOCATION) {
|
||||||
|
throw new Error('Please ensure the env var NYM_CI_WWW_LOCATION is set');
|
||||||
|
}
|
||||||
|
if (!context.env.NYM_CI_WWW_BASE) {
|
||||||
|
throw new Error('Please ensure the env var NYM_CI_WWW_BASE is set');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getMessageBody(context) {
|
||||||
|
const source = fs
|
||||||
|
.readFileSync(
|
||||||
|
context.env.IS_SUCCESS === 'true'
|
||||||
|
? path.resolve(__dirname, 'templates', 'success')
|
||||||
|
: path.resolve(__dirname, 'templates', 'failure'),
|
||||||
|
)
|
||||||
|
.toString();
|
||||||
|
const template = Handlebars.compile(source);
|
||||||
|
return template(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
addToContextAndValidate,
|
||||||
|
getMessageBody,
|
||||||
|
};
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥
|
||||||
|
> :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:
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
|
||||||
|
> :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 }}:
|
||||||
|
```
|
||||||
|
{{ env.GIT_COMMIT_MESSAGE }}
|
||||||
|
```
|
||||||
+2
-16
@@ -35,13 +35,12 @@ validator-api/keypair
|
|||||||
contracts/mixnet/code_id
|
contracts/mixnet/code_id
|
||||||
contracts/mixnet/Justfile
|
contracts/mixnet/Justfile
|
||||||
contracts/mixnet/Makefile
|
contracts/mixnet/Makefile
|
||||||
artifacts
|
|
||||||
contracts/artifacts
|
|
||||||
validator-config
|
validator-config
|
||||||
*.patch
|
*.patch
|
||||||
validator-api-config.toml
|
validator-api-config.toml
|
||||||
dist
|
dist
|
||||||
storybook-static
|
storybook-static
|
||||||
|
envs/qwerty.env
|
||||||
.parcel-cache
|
.parcel-cache
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
cpu-cycles/libcpucycles/build
|
cpu-cycles/libcpucycles/build
|
||||||
@@ -49,17 +48,4 @@ foxyfox.env
|
|||||||
|
|
||||||
.next
|
.next
|
||||||
ppa-private-key.b64
|
ppa-private-key.b64
|
||||||
ppa-private-key.asc
|
ppa-private-key.asc
|
||||||
nym-network-monitor/topology.json
|
|
||||||
nym-network-monitor/__pycache__
|
|
||||||
nym-network-monitor/*.key
|
|
||||||
nym-network-monitor/.envrc
|
|
||||||
nym-network-monitor/.envrc
|
|
||||||
nym-api/redocly/formatted-openapi.json
|
|
||||||
|
|
||||||
|
|
||||||
*.sqlite
|
|
||||||
.build
|
|
||||||
|
|
||||||
**/settings.sql
|
|
||||||
**/enter_db.sh
|
|
||||||
+3
-1540
File diff suppressed because it is too large
Load Diff
@@ -1,686 +0,0 @@
|
|||||||
# CLAUDE.md
|
|
||||||
|
|
||||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
||||||
|
|
||||||
## Project Overview
|
|
||||||
|
|
||||||
Nym is a privacy platform that uses mixnet technology to protect against metadata surveillance. The platform consists of several key components:
|
|
||||||
- Mixnet nodes (mixnodes) for packet mixing
|
|
||||||
- Gateways (entry/exit points for the network)
|
|
||||||
- Clients for interacting with the network
|
|
||||||
- Network monitoring tools
|
|
||||||
- Validators for network consensus
|
|
||||||
- Various service providers and integrations
|
|
||||||
|
|
||||||
## Build Commands
|
|
||||||
|
|
||||||
### Rust Components
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Default build (debug)
|
|
||||||
cargo build
|
|
||||||
|
|
||||||
# Release build
|
|
||||||
cargo build --release
|
|
||||||
|
|
||||||
# Build a specific package
|
|
||||||
cargo build -p <package-name>
|
|
||||||
|
|
||||||
# Build main components
|
|
||||||
make build
|
|
||||||
|
|
||||||
# Build release versions of main binaries and contracts
|
|
||||||
make build-release
|
|
||||||
|
|
||||||
# Build specific binaries
|
|
||||||
make build-nym-cli
|
|
||||||
cargo build -p nym-node --release
|
|
||||||
cargo build -p nym-api --release
|
|
||||||
```
|
|
||||||
|
|
||||||
### Testing
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run clippy, unit tests, and formatting
|
|
||||||
make test
|
|
||||||
|
|
||||||
# Run all tests including slow tests
|
|
||||||
make test-all
|
|
||||||
|
|
||||||
# Run clippy on all workspaces
|
|
||||||
make clippy
|
|
||||||
|
|
||||||
# Run unit tests for a specific package
|
|
||||||
cargo test -p <package-name>
|
|
||||||
|
|
||||||
# Run only expensive/ignored tests
|
|
||||||
cargo test --workspace -- --ignored
|
|
||||||
|
|
||||||
# Run API tests
|
|
||||||
dotenv -f envs/sandbox.env -- cargo test --test public-api-tests
|
|
||||||
|
|
||||||
# Run tests with specific log level
|
|
||||||
RUST_LOG=debug cargo test -p <package-name>
|
|
||||||
|
|
||||||
# Run specific test scripts
|
|
||||||
./nym-node/tests/test_apis.sh
|
|
||||||
./scripts/wireguard-exit-policy/exit-policy-tests.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Linting and Formatting
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run rustfmt on all code
|
|
||||||
make fmt
|
|
||||||
|
|
||||||
# Check formatting without modifying
|
|
||||||
cargo fmt --all -- --check
|
|
||||||
|
|
||||||
# Run clippy with all targets
|
|
||||||
cargo clippy --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
# TypeScript linting
|
|
||||||
yarn lint
|
|
||||||
yarn lint:fix
|
|
||||||
yarn types:lint:fix
|
|
||||||
|
|
||||||
# Check dependencies for security/licensing issues
|
|
||||||
cargo deny check
|
|
||||||
```
|
|
||||||
|
|
||||||
### WASM Components
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build all WASM components
|
|
||||||
make sdk-wasm-build
|
|
||||||
|
|
||||||
# Build TypeScript SDK
|
|
||||||
yarn build:sdk
|
|
||||||
npx lerna run --scope @nymproject/sdk build --stream
|
|
||||||
|
|
||||||
# Build and test WASM components
|
|
||||||
make sdk-wasm
|
|
||||||
|
|
||||||
# Build specific WASM packages
|
|
||||||
cd wasm/client && make
|
|
||||||
cd wasm/mix-fetch && make
|
|
||||||
cd wasm/node-tester && make
|
|
||||||
```
|
|
||||||
|
|
||||||
### Contract Development
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build all contracts
|
|
||||||
make contracts
|
|
||||||
|
|
||||||
# Build contracts in release mode
|
|
||||||
make build-release-contracts
|
|
||||||
|
|
||||||
# Generate contract schemas
|
|
||||||
make contract-schema
|
|
||||||
|
|
||||||
# Run wasm-opt on contracts
|
|
||||||
make wasm-opt-contracts
|
|
||||||
|
|
||||||
# Check contracts with cosmwasm-check
|
|
||||||
make cosmwasm-check-contracts
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running Components
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run nym-node as a mixnode
|
|
||||||
cargo run -p nym-node -- run --mode mixnode
|
|
||||||
|
|
||||||
# Run nym-node as a gateway
|
|
||||||
cargo run -p nym-node -- run --mode gateway
|
|
||||||
|
|
||||||
# Run the network monitor
|
|
||||||
cargo run -p nym-network-monitor
|
|
||||||
|
|
||||||
# Run the API server
|
|
||||||
cargo run -p nym-api
|
|
||||||
|
|
||||||
# Run with specific environment
|
|
||||||
dotenv -f envs/sandbox.env -- cargo run -p nym-api
|
|
||||||
|
|
||||||
# Start a local network
|
|
||||||
./scripts/localnet_start.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
|
|
||||||
The Nym platform consists of various components organized as a monorepo:
|
|
||||||
|
|
||||||
1. **Core Mixnet Infrastructure**:
|
|
||||||
- `nym-node`: Core binary supporting mixnode and gateway modes
|
|
||||||
- `common/nymsphinx`: Implementation of the Sphinx packet format
|
|
||||||
- `common/topology`: Network topology management
|
|
||||||
- `common/types`: Shared data types across components
|
|
||||||
|
|
||||||
2. **Network Monitoring**:
|
|
||||||
- `nym-network-monitor`: Monitors the network's reliability and performance
|
|
||||||
- `nym-api`: API server for network stats and monitoring data
|
|
||||||
- Metrics tracking for nodes, routes, and overall network health
|
|
||||||
|
|
||||||
3. **Client Implementations**:
|
|
||||||
- `clients/native`: Native Rust client implementation
|
|
||||||
- `clients/socks5`: SOCKS5 proxy client for standard applications
|
|
||||||
- `wasm`: WebAssembly client implementations (for browsers)
|
|
||||||
- `nym-connect`: Desktop and mobile clients
|
|
||||||
|
|
||||||
4. **Blockchain & Smart Contracts**:
|
|
||||||
- `common/cosmwasm-smart-contracts`: Smart contract implementations
|
|
||||||
- `contracts`: CosmWasm contracts for the Nym network
|
|
||||||
- `common/ledger`: Blockchain integration
|
|
||||||
|
|
||||||
5. **Utilities & Tools**:
|
|
||||||
- `tools`: Various CLI tools and utilities
|
|
||||||
- `sdk`: SDKs for different languages and platforms
|
|
||||||
- `documentation`: Documentation generation and management
|
|
||||||
|
|
||||||
## Packet System
|
|
||||||
|
|
||||||
Nym uses a modified Sphinx packet format for its mixnet:
|
|
||||||
|
|
||||||
1. **Message Chunking**:
|
|
||||||
- Messages are divided into "sets" and "fragments"
|
|
||||||
- Each fragment fits in a single Sphinx packet
|
|
||||||
- The `common/nymsphinx/chunking` module handles message fragmentation
|
|
||||||
|
|
||||||
2. **Routing**:
|
|
||||||
- Packets traverse through 3 layers of mixnodes
|
|
||||||
- Routing information is encrypted in layers (onion routing)
|
|
||||||
- The final gateway receives and processes the messages
|
|
||||||
|
|
||||||
3. **Monitoring**:
|
|
||||||
- Monitoring system tracks packet delivery through the network
|
|
||||||
- Routes are analyzed for reliability statistics
|
|
||||||
- Node performance metrics are collected
|
|
||||||
|
|
||||||
## Network Protocol
|
|
||||||
|
|
||||||
Nym implements the Loopix mixnet design with several key privacy features:
|
|
||||||
|
|
||||||
1. **Continuous-time Mixing**:
|
|
||||||
- Each mixnode delays messages independently with an exponential distribution
|
|
||||||
- This creates random reordering of packets, destroying timing correlations
|
|
||||||
- Offers better anonymity properties than batch mixing approaches
|
|
||||||
|
|
||||||
2. **Cover Traffic**:
|
|
||||||
- Clients and nodes generate dummy "loop" packets that circulate through the network
|
|
||||||
- These packets are indistinguishable from real traffic
|
|
||||||
- Creates a baseline level of traffic that hides actual communication patterns
|
|
||||||
- Provides unobservability (hiding when and how much real traffic is being sent)
|
|
||||||
|
|
||||||
3. **Stratified Network Architecture**:
|
|
||||||
- Traffic flows through Entry Gateway → 3 Mixnode Layers → Exit Gateway
|
|
||||||
- Path selection is independent per-message (unlike Tor)
|
|
||||||
- Each node connects only to adjacent layers
|
|
||||||
|
|
||||||
4. **Anonymous Replies**:
|
|
||||||
- Single-Use Reply Blocks (SURBs) allow receiving messages without revealing identity
|
|
||||||
- Enables bidirectional communication while maintaining privacy
|
|
||||||
|
|
||||||
## Network Monitoring Architecture
|
|
||||||
|
|
||||||
The network monitoring system is a core component that measures mixnet reliability:
|
|
||||||
|
|
||||||
1. The `nym-network-monitor` sends test packets through the network
|
|
||||||
2. These packets follow predefined routes through multiple mixnodes
|
|
||||||
3. Metrics are collected about:
|
|
||||||
- Successful and failed packet deliveries
|
|
||||||
- Node reliability (percentage of successful packet handling)
|
|
||||||
- Route reliability (which specific route combinations work best)
|
|
||||||
4. Results are stored in the database and used by `nym-api` to:
|
|
||||||
- Present node performance statistics
|
|
||||||
- Determine network rewards
|
|
||||||
- Provide route selection guidance to clients
|
|
||||||
|
|
||||||
In the current branch, metrics collection is being enhanced with a fanout approach to submit to multiple API endpoints.
|
|
||||||
|
|
||||||
## Development Environment
|
|
||||||
|
|
||||||
### Required Dependencies
|
|
||||||
|
|
||||||
- Rust toolchain (stable, 1.80+)
|
|
||||||
- Node.js (v20+) and yarn for TypeScript components
|
|
||||||
- SQLite for local database development
|
|
||||||
- PostgreSQL for API database (optional, for full API functionality)
|
|
||||||
- CosmWasm tools for contract development
|
|
||||||
- For building contracts: `wasm-opt` tool from `binaryen`
|
|
||||||
- Python 3.8+ for some scripts
|
|
||||||
- Docker (optional, for containerized development)
|
|
||||||
- protoc (Protocol Buffers compiler) for some components
|
|
||||||
|
|
||||||
### Environment Configurations
|
|
||||||
|
|
||||||
The `envs/` directory contains pre-configured environments:
|
|
||||||
|
|
||||||
#### Available Environments
|
|
||||||
|
|
||||||
- **`local.env`**: Local development environment
|
|
||||||
- Points to local services (localhost)
|
|
||||||
- Uses test mnemonics and keys
|
|
||||||
- Ideal for testing without external dependencies
|
|
||||||
|
|
||||||
- **`sandbox.env`**: Sandbox test network
|
|
||||||
- Public test network with real nodes
|
|
||||||
- Test tokens available from faucet
|
|
||||||
- Contract addresses for sandbox deployment
|
|
||||||
- API: https://sandbox-nym-api1.nymtech.net
|
|
||||||
|
|
||||||
- **`mainnet.env`**: Production mainnet
|
|
||||||
- Real network with real tokens
|
|
||||||
- Production contract addresses
|
|
||||||
- API: https://validator.nymtech.net
|
|
||||||
- Use with caution!
|
|
||||||
|
|
||||||
- **`canary.env`**: Canary deployment
|
|
||||||
- Pre-release testing environment
|
|
||||||
- Tests new features before mainnet
|
|
||||||
|
|
||||||
- **`mainnet-local-api.env`**: Hybrid environment
|
|
||||||
- Uses mainnet contracts but local API
|
|
||||||
- Useful for API development against mainnet data
|
|
||||||
|
|
||||||
#### Key Environment Variables
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Network configuration
|
|
||||||
NETWORK_NAME=sandbox # Network identifier
|
|
||||||
BECH32_PREFIX=n # Address prefix (n for sandbox, n for mainnet)
|
|
||||||
NYM_API=https://sandbox-nym-api1.nymtech.net/api
|
|
||||||
NYXD=https://rpc.sandbox.nymtech.net
|
|
||||||
NYM_API_NETWORK=sandbox
|
|
||||||
|
|
||||||
# Contract addresses (network-specific)
|
|
||||||
MIXNET_CONTRACT_ADDRESS=n1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3sjkxkav
|
|
||||||
VESTING_CONTRACT_ADDRESS=n1unyuj8qnmygvzuex3dwmg9yzt9alhvyeat0uu0jedg2wj33efl5qackslz
|
|
||||||
# ... other contract addresses
|
|
||||||
|
|
||||||
# Mnemonic for testing (NEVER use in production)
|
|
||||||
MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become"
|
|
||||||
|
|
||||||
# API Keys and tokens
|
|
||||||
IPINFO_API_TOKEN=your_token_here
|
|
||||||
AUTHENTICATOR_PASSWORD=password_here
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
RUST_LOG=info # Options: error, warn, info, debug, trace
|
|
||||||
RUST_BACKTRACE=1 # Enable backtraces
|
|
||||||
|
|
||||||
# Database
|
|
||||||
DATABASE_URL=postgresql://user:pass@localhost/nym_api
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Using Environment Files
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Load environment and run command
|
|
||||||
dotenv -f envs/sandbox.env -- cargo run -p nym-api
|
|
||||||
|
|
||||||
# Export to shell
|
|
||||||
source envs/sandbox.env
|
|
||||||
|
|
||||||
# Use with make targets
|
|
||||||
dotenv -f envs/sandbox.env -- make run-api-tests
|
|
||||||
```
|
|
||||||
|
|
||||||
## Initial Setup
|
|
||||||
|
|
||||||
### First Time Setup
|
|
||||||
|
|
||||||
1. **Install Prerequisites**
|
|
||||||
```bash
|
|
||||||
# Install Rust
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
||||||
|
|
||||||
# Install Node.js and yarn
|
|
||||||
# Via nvm (recommended):
|
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
|
||||||
nvm install 20
|
|
||||||
npm install -g yarn
|
|
||||||
|
|
||||||
# Install build tools
|
|
||||||
# Ubuntu/Debian:
|
|
||||||
sudo apt-get install build-essential pkg-config libssl-dev protobuf-compiler libpq-dev
|
|
||||||
|
|
||||||
# macOS:
|
|
||||||
brew install protobuf postgresql
|
|
||||||
|
|
||||||
# Install wasm-opt for contract builds
|
|
||||||
npm install -g wasm-opt
|
|
||||||
|
|
||||||
# Add wasm target for Rust
|
|
||||||
rustup target add wasm32-unknown-unknown
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Clone and Setup Repository**
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/nymtech/nym.git
|
|
||||||
cd nym/nym
|
|
||||||
|
|
||||||
# Install JavaScript dependencies
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# Build the project
|
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Database Setup (Optional, for API development)**
|
|
||||||
```bash
|
|
||||||
# Install PostgreSQL
|
|
||||||
# Create database
|
|
||||||
createdb nym_api
|
|
||||||
|
|
||||||
# Run migrations (from nym-api directory)
|
|
||||||
cd nym-api
|
|
||||||
sqlx migrate run
|
|
||||||
```
|
|
||||||
|
|
||||||
### Quick Start
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run a mixnode locally
|
|
||||||
dotenv -f envs/sandbox.env -- cargo run -p nym-node -- run --mode mixnode --id my-mixnode
|
|
||||||
|
|
||||||
# Run a gateway locally
|
|
||||||
dotenv -f envs/sandbox.env -- cargo run -p nym-node -- run --mode gateway --id my-gateway
|
|
||||||
|
|
||||||
# Run the API server
|
|
||||||
dotenv -f envs/sandbox.env -- cargo run -p nym-api
|
|
||||||
|
|
||||||
# Run a client
|
|
||||||
cargo run -p nym-client -- init --id my-client
|
|
||||||
cargo run -p nym-client -- run --id my-client
|
|
||||||
```
|
|
||||||
|
|
||||||
## CI/CD Pipeline
|
|
||||||
|
|
||||||
The project uses GitHub Actions for CI/CD with several key workflows:
|
|
||||||
|
|
||||||
1. **Build and Test**:
|
|
||||||
- `ci-build.yml`: Main build workflow for Rust components
|
|
||||||
- Tests are run on multiple platforms (Linux, Windows, macOS)
|
|
||||||
- Includes formatting check (rustfmt) and linting (clippy)
|
|
||||||
|
|
||||||
2. **Release Process**:
|
|
||||||
- Binary artifacts are published on release tags
|
|
||||||
- Multiple platform builds are created
|
|
||||||
|
|
||||||
3. **Documentation**:
|
|
||||||
- Documentation is automatically built and deployed
|
|
||||||
|
|
||||||
## Database Structure
|
|
||||||
|
|
||||||
The system uses SQLite databases with tables like:
|
|
||||||
- `mixnode_status`: Status information about mixnodes
|
|
||||||
- `gateway_status`: Status information about gateways
|
|
||||||
- `routes`: Route performance information (success/failure of specific paths)
|
|
||||||
- `monitor_run`: Information about monitoring test runs
|
|
||||||
|
|
||||||
## Development Workflows
|
|
||||||
|
|
||||||
### Running a Node
|
|
||||||
|
|
||||||
To run the mixnode or gateway:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run nym-node as a mixnode with specified identity
|
|
||||||
cargo run -p nym-node -- run --mode mixnode --id my-mixnode
|
|
||||||
|
|
||||||
# Run nym-node as a gateway
|
|
||||||
cargo run -p nym-node -- run --mode gateway --id my-gateway
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configuration
|
|
||||||
|
|
||||||
Nodes can be configured with files in various locations:
|
|
||||||
- Command-line arguments
|
|
||||||
- Environment variables
|
|
||||||
- `.env` files specified with `--config-env-file`
|
|
||||||
|
|
||||||
### Monitoring
|
|
||||||
|
|
||||||
To monitor the health of your node:
|
|
||||||
- View logs for real-time information
|
|
||||||
- Use the node's HTTP API for status information
|
|
||||||
- Check the explorer for public node statistics
|
|
||||||
|
|
||||||
## Common Libraries
|
|
||||||
|
|
||||||
- `common/types`: Shared data types across all components
|
|
||||||
- `common/crypto`: Cryptographic primitives and wrappers
|
|
||||||
- `common/client-core`: Core client functionality
|
|
||||||
- `common/gateway-client`: Client-gateway communication
|
|
||||||
- `common/task`: Task management and concurrency utilities
|
|
||||||
- `common/nymsphinx`: Sphinx packet implementation for mixnet
|
|
||||||
- `common/topology`: Network topology management
|
|
||||||
- `common/credentials`: Credential system for privacy-preserving authentication
|
|
||||||
- `common/bandwidth-controller`: Bandwidth management and accounting
|
|
||||||
|
|
||||||
## Code Conventions
|
|
||||||
|
|
||||||
- Error handling: Use anyhow/thiserror for structured error handling
|
|
||||||
- Logging: Use the tracing framework for logging and diagnostics
|
|
||||||
- State management: Generally use Tokio/futures for async code
|
|
||||||
- Configuration: Use the config crate and env vars with defaults
|
|
||||||
- Database: Use sqlx for type-safe database queries
|
|
||||||
- Follow clippy recommendations and rustfmt formatting
|
|
||||||
- Use semantic commit messages: feat, fix, docs, refactor, test, chore
|
|
||||||
|
|
||||||
## When Making Changes
|
|
||||||
|
|
||||||
- Run `make test` before submitting PRs
|
|
||||||
- Follow Rust naming conventions
|
|
||||||
- Use `clippy` to check for common issues
|
|
||||||
- Update SQLx query caches when modifying DB queries: `cargo sqlx prepare`
|
|
||||||
- Consider backward compatibility for protocol changes
|
|
||||||
- Use lefthook pre-commit hooks for TypeScript formatting
|
|
||||||
- Run `cargo deny check` to verify dependency compliance
|
|
||||||
- Test against both sandbox and local environments when possible
|
|
||||||
- Update relevant documentation and CHANGELOG.md
|
|
||||||
|
|
||||||
## Development Tools
|
|
||||||
|
|
||||||
### Useful Cargo Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Check for outdated dependencies
|
|
||||||
cargo outdated
|
|
||||||
|
|
||||||
# Analyze binary size
|
|
||||||
cargo bloat --release -p nym-node
|
|
||||||
|
|
||||||
# Generate dependency graph
|
|
||||||
cargo tree -p nym-api
|
|
||||||
|
|
||||||
# Run with instrumentation
|
|
||||||
cargo run --features profiling -p nym-node
|
|
||||||
|
|
||||||
# Check for security advisories
|
|
||||||
cargo audit
|
|
||||||
```
|
|
||||||
|
|
||||||
### Database Tools
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# SQLx CLI for migrations
|
|
||||||
cargo install sqlx-cli
|
|
||||||
|
|
||||||
# Create new migration
|
|
||||||
cd nym-api && sqlx migrate add <migration_name>
|
|
||||||
|
|
||||||
# Prepare query metadata for offline compilation
|
|
||||||
cargo sqlx prepare --workspace
|
|
||||||
|
|
||||||
# View database schema
|
|
||||||
./nym-api/enter_db.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Development Scripts
|
|
||||||
|
|
||||||
- `scripts/build_topology.py`: Generate network topology files
|
|
||||||
- `scripts/node_api_check.py`: Verify node API endpoints
|
|
||||||
- `scripts/network_tunnel_manager.sh`: Manage network tunnels
|
|
||||||
- `scripts/localnet_start.sh`: Start a local test network
|
|
||||||
- Various deployment scripts in `deployment/` for different environments
|
|
||||||
|
|
||||||
## Debugging
|
|
||||||
|
|
||||||
- Enable more verbose logging with the RUST_LOG environment variable:
|
|
||||||
```
|
|
||||||
RUST_LOG=debug,nym_node=trace cargo run -p nym-node -- run --mode mixnode
|
|
||||||
```
|
|
||||||
- Use the HTTP API endpoints for status information
|
|
||||||
- Check monitoring data in the database for network performance metrics
|
|
||||||
- For complex issues, use tracing tools to follow packet flow
|
|
||||||
- Enable backtraces: `RUST_BACKTRACE=full`
|
|
||||||
- For WASM debugging: Use browser developer tools with source maps
|
|
||||||
|
|
||||||
## Deployment and Advanced Configurations
|
|
||||||
|
|
||||||
### Deployment Structure
|
|
||||||
|
|
||||||
The `deployment/` directory contains Ansible playbooks and configurations for various deployment scenarios:
|
|
||||||
|
|
||||||
- **`aws/`**: AWS-specific deployment configurations
|
|
||||||
- **`mixnode/`**: Mixnode deployment playbooks
|
|
||||||
- **`gateway/`**: Gateway deployment playbooks
|
|
||||||
- **`validator/`**: Validator node deployment
|
|
||||||
- **`sandbox-v2/`**: Complete sandbox environment setup
|
|
||||||
- **`big-dipper-2/`**: Block explorer deployment
|
|
||||||
|
|
||||||
### Sandbox V2 Deployment
|
|
||||||
|
|
||||||
The sandbox-v2 deployment (`deployment/sandbox-v2/`) provides a complete test environment:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Key playbooks:
|
|
||||||
- deploy.yaml # Main deployment orchestrator
|
|
||||||
- deploy-mixnodes.yaml # Deploy mixnodes
|
|
||||||
- deploy-gateways.yaml # Deploy gateways
|
|
||||||
- deploy-validators.yaml # Deploy validator nodes
|
|
||||||
- deploy-nym-api.yaml # Deploy API services
|
|
||||||
```
|
|
||||||
|
|
||||||
### Custom Environment Setup
|
|
||||||
|
|
||||||
To create a custom environment:
|
|
||||||
|
|
||||||
1. Copy an existing env file: `cp envs/sandbox.env envs/custom.env`
|
|
||||||
2. Modify the network endpoints and contract addresses
|
|
||||||
3. Update the `NETWORK_NAME` to your identifier
|
|
||||||
4. Set appropriate mnemonics and keys (use fresh ones for production!)
|
|
||||||
|
|
||||||
### Contract Addresses
|
|
||||||
|
|
||||||
Contract addresses are network-specific and defined in environment files:
|
|
||||||
- Mixnet contract: Manages mixnode/gateway registry
|
|
||||||
- Vesting contract: Handles token vesting schedules
|
|
||||||
- Coconut contracts: Privacy-preserving credentials
|
|
||||||
- Name service: Human-readable address mapping
|
|
||||||
- Ecash contract: Electronic cash functionality
|
|
||||||
|
|
||||||
### Local Network Setup
|
|
||||||
|
|
||||||
For a completely local network:
|
|
||||||
```bash
|
|
||||||
# Start local chain
|
|
||||||
./scripts/localnet_start.sh
|
|
||||||
|
|
||||||
# Deploy contracts
|
|
||||||
cd contracts
|
|
||||||
make deploy-local
|
|
||||||
|
|
||||||
# Start nodes with local config
|
|
||||||
dotenv -f envs/local.env -- cargo run -p nym-node -- run --mode mixnode
|
|
||||||
```
|
|
||||||
|
|
||||||
## Common Issues and Troubleshooting
|
|
||||||
|
|
||||||
### Database Issues
|
|
||||||
|
|
||||||
- When modifying database queries, you must update SQLx query caches:
|
|
||||||
```bash
|
|
||||||
cargo sqlx prepare
|
|
||||||
```
|
|
||||||
- If you see SQLx errors about missing query files, this is likely the cause
|
|
||||||
- For "database is locked" errors with SQLite, ensure only one process accesses the DB
|
|
||||||
- For PostgreSQL connection issues, verify DATABASE_URL and that the server is running
|
|
||||||
|
|
||||||
### API Connection Issues
|
|
||||||
|
|
||||||
- Check the environment variables pointing to the APIs (NYM_API, NYXD)
|
|
||||||
- Verify network connectivity and API health endpoints
|
|
||||||
- For authentication issues, check node keys and credentials
|
|
||||||
- Common endpoints to verify:
|
|
||||||
- API health: `$NYM_API/health`
|
|
||||||
- Chain status: `$NYXD/status`
|
|
||||||
- Contract info: `$NYXD/cosmwasm/wasm/v1/contract/$CONTRACT_ADDRESS`
|
|
||||||
|
|
||||||
### Build Problems
|
|
||||||
|
|
||||||
- Clean dependencies with `cargo clean` for a fresh build
|
|
||||||
- Check for compatible Rust version (1.80+ recommended)
|
|
||||||
- For smart contract builds, ensure wasm-opt is installed: `npm install -g wasm-opt`
|
|
||||||
- For cross-compilation issues, check target-specific dependencies
|
|
||||||
- WASM build issues: Ensure wasm32-unknown-unknown target is installed:
|
|
||||||
```bash
|
|
||||||
rustup target add wasm32-unknown-unknown
|
|
||||||
```
|
|
||||||
- For "cannot find -lpq" errors, install PostgreSQL development files:
|
|
||||||
```bash
|
|
||||||
# Ubuntu/Debian
|
|
||||||
sudo apt-get install libpq-dev
|
|
||||||
# macOS
|
|
||||||
brew install postgresql
|
|
||||||
```
|
|
||||||
|
|
||||||
### Environment Issues
|
|
||||||
|
|
||||||
- Contract address mismatches: Ensure you're using the correct environment file
|
|
||||||
- "Account sequence mismatch": The account nonce is out of sync, wait and retry
|
|
||||||
- Token decimal issues: Sandbox uses different decimal places than mainnet
|
|
||||||
- API version mismatches: Ensure your local API version matches the network
|
|
||||||
- "Insufficient funds": Get test tokens from faucet (sandbox) or check balance
|
|
||||||
- Gateway/mixnode bonding issues: Verify minimum stake requirements
|
|
||||||
|
|
||||||
## Working with Routes and Monitoring
|
|
||||||
|
|
||||||
1. Route monitoring metrics are stored in a `routes` table with:
|
|
||||||
- Layer node IDs (layer1, layer2, layer3, gw)
|
|
||||||
- Success flag (boolean)
|
|
||||||
- Timestamp
|
|
||||||
|
|
||||||
2. To analyze routes:
|
|
||||||
- Check `NetworkAccount` and `AccountingRoute` in `nym-network-monitor/src/accounting.rs`
|
|
||||||
- View monitoring logic in `common/nymsphinx/chunking/monitoring.rs`
|
|
||||||
- Observe how routes are submitted to the database in the `submit_accounting_routes_to_db` function
|
|
||||||
|
|
||||||
## Performance Optimization
|
|
||||||
|
|
||||||
### Profiling and Benchmarking
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run benchmarks
|
|
||||||
cargo bench -p nym-node
|
|
||||||
|
|
||||||
# Profile with perf (Linux)
|
|
||||||
cargo build --release --features profiling
|
|
||||||
perf record --call-graph=dwarf ./target/release/nym-node run --mode mixnode
|
|
||||||
perf report
|
|
||||||
|
|
||||||
# Generate flamegraph
|
|
||||||
cargo install flamegraph
|
|
||||||
cargo flamegraph --bin nym-node -- run --mode mixnode
|
|
||||||
```
|
|
||||||
|
|
||||||
### Common Performance Considerations
|
|
||||||
|
|
||||||
- Use bounded channels for backpressure
|
|
||||||
- Batch database operations where possible
|
|
||||||
- Monitor memory usage with `RUST_LOG=nym_node::metrics=debug`
|
|
||||||
- Use connection pooling for database connections
|
|
||||||
- Consider using `jemalloc` for better memory allocation performance
|
|
||||||
Generated
+4992
-5749
File diff suppressed because it is too large
Load Diff
+112
-305
@@ -14,51 +14,44 @@ panic = "abort"
|
|||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"clients/native",
|
"clients/native",
|
||||||
"clients/native/websocket-requests",
|
"clients/native/websocket-requests",
|
||||||
"clients/socks5",
|
"clients/socks5",
|
||||||
"common/async-file-watcher",
|
"common/async-file-watcher",
|
||||||
"common/authenticator-requests",
|
|
||||||
"common/bandwidth-controller",
|
"common/bandwidth-controller",
|
||||||
"common/bin-common",
|
"common/bin-common",
|
||||||
"common/client-core",
|
"common/client-core",
|
||||||
"common/client-core/config-types",
|
"common/client-core/config-types",
|
||||||
"common/client-core/gateways-storage",
|
|
||||||
"common/client-core/surb-storage",
|
"common/client-core/surb-storage",
|
||||||
|
"common/client-core/gateways-storage",
|
||||||
"common/client-libs/gateway-client",
|
"common/client-libs/gateway-client",
|
||||||
"common/client-libs/mixnet-client",
|
"common/client-libs/mixnet-client",
|
||||||
"common/client-libs/validator-client",
|
"common/client-libs/validator-client",
|
||||||
"common/commands",
|
"common/commands",
|
||||||
"common/config",
|
"common/config",
|
||||||
|
"common/cosmwasm-smart-contracts/coconut-bandwidth-contract",
|
||||||
"common/cosmwasm-smart-contracts/coconut-dkg",
|
"common/cosmwasm-smart-contracts/coconut-dkg",
|
||||||
"common/cosmwasm-smart-contracts/contracts-common",
|
"common/cosmwasm-smart-contracts/contracts-common",
|
||||||
"common/cosmwasm-smart-contracts/contracts-common-testing",
|
# "common/cosmwasm-smart-contracts/ephemera",
|
||||||
"common/cosmwasm-smart-contracts/easy_addr",
|
|
||||||
"common/cosmwasm-smart-contracts/ecash-contract",
|
|
||||||
"common/cosmwasm-smart-contracts/group-contract",
|
"common/cosmwasm-smart-contracts/group-contract",
|
||||||
"common/cosmwasm-smart-contracts/mixnet-contract",
|
"common/cosmwasm-smart-contracts/mixnet-contract",
|
||||||
"common/cosmwasm-smart-contracts/multisig-contract",
|
"common/cosmwasm-smart-contracts/multisig-contract",
|
||||||
"common/cosmwasm-smart-contracts/nym-performance-contract",
|
"common/cosmwasm-smart-contracts/name-service",
|
||||||
"common/cosmwasm-smart-contracts/nym-pool-contract",
|
"common/cosmwasm-smart-contracts/service-provider-directory",
|
||||||
"common/cosmwasm-smart-contracts/vesting-contract",
|
"common/cosmwasm-smart-contracts/vesting-contract",
|
||||||
"common/credential-proxy",
|
"common/country-group",
|
||||||
"common/credential-storage",
|
"common/credential-storage",
|
||||||
"common/credential-utils",
|
|
||||||
"common/credential-verification",
|
|
||||||
"common/credentials",
|
"common/credentials",
|
||||||
|
"common/credential-utils",
|
||||||
"common/credentials-interface",
|
"common/credentials-interface",
|
||||||
"common/crypto",
|
"common/crypto",
|
||||||
"common/dkg",
|
"common/dkg",
|
||||||
"common/ecash-signer-check",
|
"common/execute",
|
||||||
"common/ecash-signer-check-types",
|
|
||||||
"common/ecash-time",
|
|
||||||
"common/exit-policy",
|
"common/exit-policy",
|
||||||
"common/gateway-requests",
|
"common/http-api-client",
|
||||||
"common/gateway-stats-storage",
|
|
||||||
"common/gateway-storage",
|
|
||||||
"common/http-api-client", "common/http-api-client-macro",
|
|
||||||
"common/http-api-common",
|
"common/http-api-common",
|
||||||
"common/inclusion-probability",
|
"common/inclusion-probability",
|
||||||
"common/ip-packet-requests",
|
"common/ip-packet-requests",
|
||||||
@@ -67,11 +60,9 @@ members = [
|
|||||||
"common/network-defaults",
|
"common/network-defaults",
|
||||||
"common/node-tester-utils",
|
"common/node-tester-utils",
|
||||||
"common/nonexhaustive-delayqueue",
|
"common/nonexhaustive-delayqueue",
|
||||||
|
"common/nymcoconut",
|
||||||
"common/nym-id",
|
"common/nym-id",
|
||||||
"common/nym-metrics",
|
"common/nym-metrics",
|
||||||
"common/nym_offline_compact_ecash",
|
|
||||||
"common/nymnoise",
|
|
||||||
"common/nymnoise/keys",
|
|
||||||
"common/nymsphinx",
|
"common/nymsphinx",
|
||||||
"common/nymsphinx/acknowledgements",
|
"common/nymsphinx/acknowledgements",
|
||||||
"common/nymsphinx/addressing",
|
"common/nymsphinx/addressing",
|
||||||
@@ -85,98 +76,78 @@ members = [
|
|||||||
"common/nymsphinx/types",
|
"common/nymsphinx/types",
|
||||||
"common/nyxd-scraper",
|
"common/nyxd-scraper",
|
||||||
"common/pemstore",
|
"common/pemstore",
|
||||||
"common/serde-helpers",
|
|
||||||
"common/service-provider-requests-common",
|
|
||||||
"common/socks5-client-core",
|
"common/socks5-client-core",
|
||||||
"common/socks5/proxy-helpers",
|
"common/socks5/proxy-helpers",
|
||||||
"common/socks5/requests",
|
"common/socks5/requests",
|
||||||
"common/statistics",
|
"common/statistics",
|
||||||
"common/store-cipher",
|
"common/store-cipher",
|
||||||
"common/task", "common/test-utils",
|
"common/task",
|
||||||
"common/ticketbooks-merkle",
|
|
||||||
"common/topology",
|
"common/topology",
|
||||||
"common/tun",
|
"common/tun",
|
||||||
"common/types", "common/upgrade-mode-check",
|
"common/types",
|
||||||
"common/verloc",
|
|
||||||
"common/wasm/client-core",
|
"common/wasm/client-core",
|
||||||
"common/wasm/storage",
|
"common/wasm/storage",
|
||||||
"common/wasm/utils",
|
"common/wasm/utils",
|
||||||
"common/wireguard",
|
"common/wireguard",
|
||||||
"common/wireguard-private-metadata/client",
|
|
||||||
"common/wireguard-private-metadata/server",
|
|
||||||
"common/wireguard-private-metadata/shared",
|
|
||||||
"common/wireguard-private-metadata/tests",
|
|
||||||
"common/wireguard-types",
|
"common/wireguard-types",
|
||||||
"common/zulip-client",
|
"explorer-api",
|
||||||
"documentation/autodoc",
|
"explorer-api/explorer-api-requests",
|
||||||
|
"explorer-api/explorer-client",
|
||||||
"gateway",
|
"gateway",
|
||||||
"nym-api",
|
"gateway/gateway-requests",
|
||||||
"nym-api/nym-api-requests",
|
"integrations/bity",
|
||||||
"nym-authenticator-client",
|
"mixnode",
|
||||||
"nym-browser-extension/storage",
|
"sdk/lib/socks5-listener",
|
||||||
"nym-credential-proxy/nym-credential-proxy",
|
|
||||||
"nym-credential-proxy/nym-credential-proxy-requests",
|
|
||||||
"nym-credential-proxy/vpn-api-lib-wasm",
|
|
||||||
"nym-ip-packet-client",
|
|
||||||
"nym-network-monitor",
|
|
||||||
"nym-node",
|
|
||||||
"nym-node-status-api/nym-node-status-agent",
|
|
||||||
"nym-node-status-api/nym-node-status-api",
|
|
||||||
"nym-node-status-api/nym-node-status-client",
|
|
||||||
"nym-node/nym-node-metrics",
|
|
||||||
"nym-node/nym-node-requests",
|
|
||||||
"nym-outfox", "nym-signers-monitor",
|
|
||||||
"nym-statistics-api",
|
|
||||||
"nym-validator-rewarder",
|
|
||||||
"nym-wg-gateway-client",
|
|
||||||
"nyx-chain-watcher",
|
|
||||||
"sdk/ffi/cpp",
|
|
||||||
"sdk/ffi/go",
|
|
||||||
"sdk/ffi/shared",
|
|
||||||
"sdk/rust/nym-sdk",
|
"sdk/rust/nym-sdk",
|
||||||
"service-providers/common",
|
"service-providers/common",
|
||||||
"service-providers/ip-packet-router",
|
"service-providers/ip-packet-router",
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
"sqlx-pool-guard",
|
"service-providers/network-statistics",
|
||||||
"tools/echo-server",
|
"nym-api",
|
||||||
"tools/internal/contract-state-importer/importer-cli",
|
"nym-browser-extension/storage",
|
||||||
"tools/internal/contract-state-importer/importer-contract",
|
"nym-api/nym-api-requests",
|
||||||
"tools/internal/mixnet-connectivity-check",
|
"nym-node",
|
||||||
# "tools/internal/sdk-version-bump",
|
"nym-node/nym-node-http-api",
|
||||||
|
"nym-node/nym-node-requests",
|
||||||
|
"nym-outfox",
|
||||||
|
"nym-validator-rewarder",
|
||||||
"tools/internal/ssl-inject",
|
"tools/internal/ssl-inject",
|
||||||
"tools/internal/testnet-manager",
|
# "tools/internal/sdk-version-bump",
|
||||||
"tools/internal/testnet-manager",
|
|
||||||
"tools/internal/testnet-manager/dkg-bypass-contract",
|
|
||||||
"tools/internal/validator-status-check",
|
|
||||||
"tools/nym-cli",
|
"tools/nym-cli",
|
||||||
"tools/nym-id-cli",
|
"tools/nym-id-cli",
|
||||||
"tools/nym-nr-query",
|
"tools/nym-nr-query",
|
||||||
"tools/nymvisor",
|
"tools/nymvisor",
|
||||||
"tools/ts-rs-cli",
|
"tools/ts-rs-cli",
|
||||||
"wasm/client",
|
"wasm/client",
|
||||||
# "wasm/full-nym-wasm", # If we uncomment this again, remember to also uncomment the profile settings below
|
# "wasm/full-nym-wasm",
|
||||||
"wasm/mix-fetch",
|
"wasm/mix-fetch",
|
||||||
"wasm/node-tester",
|
"wasm/node-tester",
|
||||||
"wasm/zknym-lib",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
default-members = [
|
default-members = [
|
||||||
"clients/native",
|
"clients/native",
|
||||||
"clients/socks5",
|
"clients/socks5",
|
||||||
"nym-api",
|
"gateway",
|
||||||
"nym-credential-proxy/nym-credential-proxy",
|
|
||||||
"nym-node",
|
|
||||||
"nym-node-status-api/nym-node-status-agent",
|
|
||||||
"nym-node-status-api/nym-node-status-api",
|
|
||||||
"nym-statistics-api",
|
|
||||||
"nym-validator-rewarder",
|
|
||||||
"nyx-chain-watcher",
|
|
||||||
"service-providers/ip-packet-router",
|
|
||||||
"service-providers/network-requester",
|
"service-providers/network-requester",
|
||||||
|
"service-providers/network-statistics",
|
||||||
|
"mixnode",
|
||||||
|
"nym-api",
|
||||||
"tools/nymvisor",
|
"tools/nymvisor",
|
||||||
|
"explorer-api",
|
||||||
|
"nym-validator-rewarder",
|
||||||
|
"nym-node"
|
||||||
]
|
]
|
||||||
|
|
||||||
exclude = ["explorer", "contracts", "nym-wallet", "cpu-cycles"]
|
exclude = [
|
||||||
|
"explorer",
|
||||||
|
"contracts",
|
||||||
|
"nym-wallet",
|
||||||
|
"nym-connect/mobile/src-tauri",
|
||||||
|
"nym-connect/desktop",
|
||||||
|
"nym-vpn/ui/src-tauri",
|
||||||
|
"cpu-cycles",
|
||||||
|
"sdk/ffi/cpp",
|
||||||
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
authors = ["Nym Technologies SA"]
|
authors = ["Nym Technologies SA"]
|
||||||
@@ -185,249 +156,101 @@ homepage = "https://nymtech.net"
|
|||||||
documentation = "https://nymtech.net"
|
documentation = "https://nymtech.net"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
rust-version = "1.81"
|
|
||||||
readme = "README.md"
|
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
addr = "0.15.6"
|
anyhow = "1.0.71"
|
||||||
aead = "0.5.2"
|
async-trait = "0.1.68"
|
||||||
aes = "0.8.1"
|
|
||||||
aes-gcm = "0.10.1"
|
|
||||||
aes-gcm-siv = "0.11.1"
|
|
||||||
ammonia = "4"
|
|
||||||
anyhow = "1.0.98"
|
|
||||||
arc-swap = "1.7.1"
|
|
||||||
argon2 = "0.5.0"
|
|
||||||
async-trait = "0.1.88"
|
|
||||||
axum = "0.7.5"
|
axum = "0.7.5"
|
||||||
axum-client-ip = "0.6.1"
|
axum-extra = "0.9.3"
|
||||||
axum-extra = "0.9.4"
|
base64 = "0.21.4"
|
||||||
axum-test = "16.2.0"
|
bs58 = "0.5.0"
|
||||||
base64 = "0.22.1"
|
|
||||||
base85rs = "0.1.3"
|
|
||||||
bincode = "1.3.3"
|
|
||||||
bip39 = { version = "2.0.0", features = ["zeroize"] }
|
bip39 = { version = "2.0.0", features = ["zeroize"] }
|
||||||
bit-vec = "0.7.0" # can we unify those?
|
clap = "4.4.7"
|
||||||
bitvec = "1.0.0"
|
|
||||||
blake3 = "1.7.0"
|
|
||||||
bloomfilter = "3.0.1"
|
|
||||||
bs58 = "0.5.1"
|
|
||||||
bytecodec = "0.4.15"
|
|
||||||
bytes = "1.10.1"
|
|
||||||
cargo_metadata = "0.19.2"
|
|
||||||
celes = "2.6.0"
|
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
chacha20 = "0.9.0"
|
|
||||||
chacha20poly1305 = "0.10.1"
|
|
||||||
chrono = "0.4.41"
|
|
||||||
cipher = "0.4.3"
|
|
||||||
clap = "4.5.38"
|
|
||||||
clap_complete = "4.5"
|
|
||||||
clap_complete_fig = "4.5"
|
|
||||||
colored = "2.2"
|
|
||||||
comfy-table = "7.1.4"
|
|
||||||
console = "0.16.0"
|
|
||||||
console-subscriber = "0.4.1"
|
|
||||||
console_error_panic_hook = "0.1"
|
|
||||||
const-str = "0.5.6"
|
|
||||||
const_format = "0.2.34"
|
|
||||||
criterion = "0.5"
|
|
||||||
csv = "1.3.1"
|
|
||||||
ctr = "0.9.1"
|
|
||||||
cupid = "0.6.1"
|
|
||||||
curve25519-dalek = "4.1"
|
|
||||||
dashmap = "5.5.3"
|
dashmap = "5.5.3"
|
||||||
# We want https://github.com/DefGuard/wireguard-rs/pull/64 , but there's no crates.io release being pushed out anymore
|
|
||||||
defguard_wireguard_rs = { git = "https://github.com/DefGuard/wireguard-rs.git", rev = "v0.4.7" }
|
|
||||||
digest = "0.10.7"
|
|
||||||
dirs = "5.0"
|
|
||||||
doc-comment = "0.3"
|
|
||||||
dotenvy = "0.15.6"
|
dotenvy = "0.15.6"
|
||||||
dyn-clone = "1.0.19"
|
futures = "0.3.28"
|
||||||
ecdsa = "0.16"
|
|
||||||
ed25519-dalek = "2.1"
|
|
||||||
encoding_rs = "0.8.35"
|
|
||||||
env_logger = "0.11.8"
|
|
||||||
envy = "0.4"
|
|
||||||
etherparse = "0.13.0"
|
|
||||||
eyre = "0.6.9"
|
|
||||||
fastrand = "2.1.1"
|
|
||||||
flate2 = "1.1.1"
|
|
||||||
futures = "0.3.31"
|
|
||||||
futures-util = "0.3"
|
|
||||||
generic-array = "0.14.7"
|
generic-array = "0.14.7"
|
||||||
getrandom = "0.2.10"
|
getrandom = "0.2.10"
|
||||||
getset = "0.1.5"
|
|
||||||
handlebars = "3.5.5"
|
|
||||||
headers = "0.4.0"
|
headers = "0.4.0"
|
||||||
hex = "0.4.3"
|
|
||||||
hex-literal = "0.3.3"
|
|
||||||
hickory-resolver = "0.25"
|
|
||||||
hkdf = "0.12.3"
|
|
||||||
hmac = "0.12.1"
|
|
||||||
http = "1"
|
|
||||||
http-body-util = "0.1"
|
|
||||||
httpcodec = "0.2.3"
|
|
||||||
human-repr = "1.1.0"
|
|
||||||
humantime = "2.2.0"
|
|
||||||
humantime-serde = "1.1.1"
|
humantime-serde = "1.1.1"
|
||||||
hyper = "1.6.0"
|
hyper = "1.3.1"
|
||||||
hyper-util = "0.1"
|
|
||||||
indicatif = "0.18.0"
|
|
||||||
inquire = "0.6.2"
|
|
||||||
inventory = "0.3.21"
|
|
||||||
ip_network = "0.4.1"
|
|
||||||
ipnetwork = "0.20"
|
|
||||||
itertools = "0.14.0"
|
|
||||||
jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] }
|
|
||||||
k256 = "0.13"
|
k256 = "0.13"
|
||||||
lazy_static = "1.5.0"
|
lazy_static = "1.4.0"
|
||||||
ledger-transport = "0.10.0"
|
|
||||||
ledger-transport-hid = "0.10.0"
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
maxminddb = "0.23.0"
|
once_cell = "1.7.2"
|
||||||
mime = "0.3.17"
|
parking_lot = "0.12.1"
|
||||||
moka = { version = "0.12", features = ["future"] }
|
|
||||||
nix = "0.27.1"
|
|
||||||
notify = "5.1.0"
|
|
||||||
okapi = "0.7.0"
|
|
||||||
once_cell = "1.21.3"
|
|
||||||
opentelemetry = "0.19.0"
|
|
||||||
opentelemetry-jaeger = "0.18.0"
|
|
||||||
parking_lot = "0.12.3"
|
|
||||||
pem = "0.8"
|
|
||||||
petgraph = "0.6.5"
|
|
||||||
pin-project = "1.1"
|
|
||||||
pin-project-lite = "0.2.16"
|
|
||||||
publicsuffix = "2.3.0"
|
|
||||||
proc_pidinfo = "0.1.3"
|
|
||||||
quote = "1"
|
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand_chacha = "0.3"
|
reqwest = { version = "0.12.4", default-features = false }
|
||||||
rand_core = "0.6.3"
|
schemars = "0.8.1"
|
||||||
rand_distr = "0.4"
|
serde = "1.0.152"
|
||||||
rand_pcg = "0.3.1"
|
serde_json = "1.0.91"
|
||||||
rand_seeder = "0.2.3"
|
sqlx = "0.6.3"
|
||||||
rayon = "1.5.1"
|
|
||||||
regex = "1.10.6"
|
|
||||||
reqwest = { version = "0.12.15", default-features = false }
|
|
||||||
rs_merkle = "1.5.0"
|
|
||||||
safer-ffi = "0.1.13"
|
|
||||||
schemars = "0.8.22"
|
|
||||||
semver = "1.0.26"
|
|
||||||
serde = "1.0.219"
|
|
||||||
serde_bytes = "0.11.17"
|
|
||||||
serde_derive = "1.0"
|
|
||||||
serde_json = "1.0.140"
|
|
||||||
serde_json_path = "0.7.2"
|
|
||||||
serde_repr = "0.1"
|
|
||||||
serde_with = "3.9.0"
|
|
||||||
serde_yaml = "0.9.25"
|
|
||||||
serde_plain = "1.0.2"
|
|
||||||
sha2 = "0.10.9"
|
|
||||||
si-scale = "0.2.3"
|
|
||||||
snow = "0.9.6"
|
|
||||||
sphinx-packet = "=0.6.0"
|
|
||||||
sqlx = "0.8.6"
|
|
||||||
strum = "0.27.2"
|
|
||||||
strum_macros = "0.27.2"
|
|
||||||
subtle-encoding = "0.5"
|
|
||||||
syn = "2"
|
|
||||||
sysinfo = "0.37.0"
|
|
||||||
tap = "1.0.1"
|
tap = "1.0.1"
|
||||||
tar = "0.4.44"
|
time = "0.3.30"
|
||||||
test-with = { version = "0.15.4", default-features = false }
|
thiserror = "1.0.48"
|
||||||
tempfile = "3.20"
|
tokio = "1.33.0"
|
||||||
thiserror = "2.0"
|
tokio-util = "0.7.10"
|
||||||
time = "0.3.41"
|
|
||||||
tokio = "1.47"
|
|
||||||
tokio-postgres = "0.7"
|
|
||||||
tokio-stream = "0.1.17"
|
|
||||||
tokio-test = "0.4.4"
|
|
||||||
tokio-tun = "0.11.5"
|
|
||||||
tokio-tungstenite = { version = "0.20.1" }
|
tokio-tungstenite = { version = "0.20.1" }
|
||||||
tokio-util = "0.7.15"
|
tracing = "0.1.37"
|
||||||
toml = "0.8.22"
|
|
||||||
tower = "0.5.2"
|
|
||||||
tower-http = "0.5.2"
|
|
||||||
tracing = "0.1.41"
|
|
||||||
tracing-log = "0.2"
|
|
||||||
tracing-opentelemetry = "0.19.0"
|
|
||||||
tracing-subscriber = "0.3.19"
|
|
||||||
tracing-tree = "0.2.2"
|
|
||||||
tracing-indicatif = "0.3.9"
|
|
||||||
ts-rs = "10.1.0"
|
|
||||||
tungstenite = { version = "0.20.1", default-features = false }
|
tungstenite = { version = "0.20.1", default-features = false }
|
||||||
uniffi = "0.29.2"
|
ts-rs = "7.0.0"
|
||||||
uniffi_build = "0.29.0"
|
utoipa = "4.2.0"
|
||||||
url = "2.5"
|
utoipa-swagger-ui = "6.0.0"
|
||||||
utoipa = "5.2"
|
url = "2.4"
|
||||||
utoipa-swagger-ui = "8.1"
|
zeroize = "1.6.0"
|
||||||
utoipauto = "0.2"
|
|
||||||
uuid = "*"
|
|
||||||
vergen = { version = "=8.3.1", default-features = false }
|
|
||||||
walkdir = "2"
|
|
||||||
x25519-dalek = "2.0.0"
|
|
||||||
zeroize = "1.7.0"
|
|
||||||
|
|
||||||
prometheus = { version = "0.14.0" }
|
prometheus = { version = "0.13.0" }
|
||||||
|
|
||||||
# coconut/DKG related
|
# coconut/DKG related
|
||||||
# unfortunately until https://github.com/zkcrypto/bls12_381/issues/10 is resolved, we have to rely on the fork
|
# unfortunately until https://github.com/zkcrypto/bls12_381/issues/10 is resolved, we have to rely on the fork
|
||||||
# as we need to be able to serialize Gt so that we could create the lookup table for baby-step-giant-step algorithm
|
# as we need to be able to serialize Gt so that we could create the lookup table for baby-step-giant-step algorithm
|
||||||
# plus to make our live easier we need serde support from https://github.com/zkcrypto/bls12_381/pull/125
|
bls12_381 = { git = "https://github.com/jstuczyn/bls12_381", branch = "feature/gt-serialization-0.8.0" }
|
||||||
bls12_381 = { git = "https://github.com/jstuczyn/bls12_381", default-features = false, branch = "temp/experimental-serdect-updated" }
|
group = "0.13.0"
|
||||||
group = { version = "0.13.0", default-features = false }
|
ff = "0.13.0"
|
||||||
ff = { version = "0.13.1", default-features = false }
|
|
||||||
subtle = "2.5.0"
|
|
||||||
|
|
||||||
# cosmwasm-related
|
# cosmwasm-related
|
||||||
cosmwasm-schema = "=2.2.2"
|
cosmwasm-derive = "=1.4.3"
|
||||||
cosmwasm-std = "=2.2.2"
|
cosmwasm-schema = "=1.4.3"
|
||||||
|
cosmwasm-std = "=1.4.3"
|
||||||
|
# use 0.5.0 as that's the version used by cosmwasm-std 1.4.3
|
||||||
|
# (and ideally we don't want to pull the same dependency twice)
|
||||||
|
serde-json-wasm = "=0.5.0"
|
||||||
|
cosmwasm-storage = "=1.4.3"
|
||||||
# same version as used by cosmwasm
|
# same version as used by cosmwasm
|
||||||
cw-utils = "=2.0.0"
|
cw-utils = "=1.0.1"
|
||||||
cw-storage-plus = "=2.0.0"
|
cw-storage-plus = "=1.2.0"
|
||||||
cw2 = { version = "=2.0.0" }
|
cw2 = { version = "=1.1.2" }
|
||||||
cw3 = { version = "=2.0.0" }
|
cw3 = { version = "=1.1.2" }
|
||||||
cw4 = { version = "=2.0.0" }
|
cw4 = { version = "=1.1.2" }
|
||||||
cw-controllers = { version = "=2.0.0" }
|
cw-controllers = { version = "=1.1.0" }
|
||||||
cw-multi-test = "=2.3.2"
|
|
||||||
|
|
||||||
# cosmrs-related
|
# cosmrs-related
|
||||||
bip32 = { version = "0.5.3", default-features = false }
|
bip32 = "0.5.1"
|
||||||
|
|
||||||
|
# temporarily using a fork again (yay.) because we need staking and slashing support
|
||||||
cosmrs = { version = "0.21.1" }
|
cosmrs = { git = "https://github.com/jstuczyn/cosmos-rust", branch = "nym-temp/all-validator-features" }
|
||||||
tendermint = "0.40.4"
|
#cosmrs = { git = "https://github.com/jstuczyn/cosmos-rust", branch = "nym-temp/all-validator-features" } # unfortuntely we need a fork by yours truly to get the staking support
|
||||||
tendermint-rpc = "0.40.4"
|
tendermint = "0.34" # same version as used by cosmrs
|
||||||
prost = { version = "0.13", default-features = false }
|
tendermint-rpc = "0.34" # same version as used by cosmrs
|
||||||
|
prost = "0.12"
|
||||||
|
|
||||||
# wasm-related dependencies
|
# wasm-related dependencies
|
||||||
gloo-utils = "0.2.0"
|
gloo-utils = "0.1.7"
|
||||||
gloo-net = "0.6.0"
|
js-sys = "0.3.63"
|
||||||
|
serde-wasm-bindgen = "0.5.0"
|
||||||
indexed_db_futures = "0.6.4"
|
|
||||||
js-sys = "0.3.76"
|
|
||||||
serde-wasm-bindgen = "0.6.5"
|
|
||||||
tsify = "0.4.5"
|
tsify = "0.4.5"
|
||||||
wasm-bindgen = "0.2.99"
|
wasm-bindgen = "0.2.86"
|
||||||
wasm-bindgen-futures = "0.4.49"
|
wasm-bindgen-futures = "0.4.37"
|
||||||
wasm-bindgen-test = "0.3.49"
|
wasmtimer = "0.2.0"
|
||||||
wasmtimer = "0.4.1"
|
web-sys = "0.3.63"
|
||||||
web-sys = "0.3.76"
|
|
||||||
|
|
||||||
|
|
||||||
# for local development:
|
|
||||||
#[patch.crates-io]
|
|
||||||
#sphinx-packet = { path = "../sphinx" }
|
|
||||||
|
|
||||||
# Profile settings for individual crates
|
# Profile settings for individual crates
|
||||||
|
|
||||||
# Compile-time verified queries do quite a bit of work at compile time. Incremental
|
[profile.release.package.nym-socks5-listener]
|
||||||
# actions like cargo check and cargo build can be significantly faster when
|
strip = true
|
||||||
# using an optimized build
|
codegen-units = 1
|
||||||
[profile.dev.package.sqlx-macros]
|
|
||||||
opt-level = 3
|
|
||||||
|
|
||||||
[profile.release.package.nym-client-wasm]
|
[profile.release.package.nym-client-wasm]
|
||||||
# lto = true
|
# lto = true
|
||||||
@@ -437,26 +260,10 @@ opt-level = 'z'
|
|||||||
# lto = true
|
# lto = true
|
||||||
opt-level = 'z'
|
opt-level = 'z'
|
||||||
|
|
||||||
# Commented out since the crate is also commented out from the inclusion in the
|
[profile.release.package.nym-wasm-sdk]
|
||||||
# workspace above. We should uncomment this if we re-include it in the
|
# lto = true
|
||||||
# workspace
|
opt-level = 'z'
|
||||||
#[profile.release.package.nym-wasm-sdk]
|
|
||||||
## lto = true
|
|
||||||
#opt-level = 'z'
|
|
||||||
|
|
||||||
[profile.release.package.mix-fetch-wasm]
|
[profile.release.package.mix-fetch-wasm]
|
||||||
# lto = true
|
# lto = true
|
||||||
opt-level = 'z'
|
opt-level = 'z'
|
||||||
|
|
||||||
[workspace.lints.rust]
|
|
||||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
|
|
||||||
|
|
||||||
[workspace.lints.clippy]
|
|
||||||
unwrap_used = "deny"
|
|
||||||
expect_used = "deny"
|
|
||||||
todo = "deny"
|
|
||||||
dbg_macro = "deny"
|
|
||||||
exit = "deny"
|
|
||||||
panic = "deny"
|
|
||||||
unimplemented = "deny"
|
|
||||||
unreachable = "deny"
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
Boost Software License - Version 1.0 - August 17th, 2003
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person or organization
|
|
||||||
obtaining a copy of the software and accompanying documentation covered by
|
|
||||||
this license (the "Software") to use, reproduce, display, distribute,
|
|
||||||
execute, and transmit the Software, and to prepare derivative works of the
|
|
||||||
Software, and to permit third-parties to whom the Software is furnished to
|
|
||||||
do so, all subject to the following:
|
|
||||||
|
|
||||||
The copyright notices in the Software and this entire statement, including
|
|
||||||
the above license grant, this restriction and the following disclaimer,
|
|
||||||
must be included in all copies of the Software, in whole or in part, and
|
|
||||||
all derivative works of the Software, unless such copies or derivative
|
|
||||||
works are solely in the form of machine-executable object code generated by
|
|
||||||
a source language processor.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
||||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -12,11 +12,7 @@ help:
|
|||||||
@echo " clippy: run clippy for all workspaces"
|
@echo " clippy: run clippy for all workspaces"
|
||||||
@echo " test: run clippy, unit tests, and formatting."
|
@echo " test: run clippy, unit tests, and formatting."
|
||||||
@echo " test-all: like test, but also includes the expensive tests"
|
@echo " test-all: like test, but also includes the expensive tests"
|
||||||
@echo " deb: build debian packages"
|
@echo " deb: build debian packages
|
||||||
@echo ""
|
|
||||||
@echo "Contract building targets:"
|
|
||||||
@echo " contracts: build contracts for development (includes wasm-opt)"
|
|
||||||
@echo " publish-contracts: build contracts using Docker optimizer (deterministic)"
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Meta targets
|
# Meta targets
|
||||||
@@ -96,6 +92,7 @@ endef
|
|||||||
$(eval $(call add_cargo_workspace,main,.))
|
$(eval $(call add_cargo_workspace,main,.))
|
||||||
$(eval $(call add_cargo_workspace,contracts,contracts,--lib --target wasm32-unknown-unknown,RUSTFLAGS='-C link-arg=-s'))
|
$(eval $(call add_cargo_workspace,contracts,contracts,--lib --target wasm32-unknown-unknown,RUSTFLAGS='-C link-arg=-s'))
|
||||||
$(eval $(call add_cargo_workspace,wallet,nym-wallet))
|
$(eval $(call add_cargo_workspace,wallet,nym-wallet))
|
||||||
|
$(eval $(call add_cargo_workspace,connect,nym-connect/desktop))
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# SDK
|
# SDK
|
||||||
@@ -108,7 +105,6 @@ sdk-wasm-build:
|
|||||||
$(MAKE) -C wasm/client
|
$(MAKE) -C wasm/client
|
||||||
$(MAKE) -C wasm/node-tester
|
$(MAKE) -C wasm/node-tester
|
||||||
$(MAKE) -C wasm/mix-fetch
|
$(MAKE) -C wasm/mix-fetch
|
||||||
$(MAKE) -C wasm/zknym-lib
|
|
||||||
#$(MAKE) -C wasm/full-nym-wasm
|
#$(MAKE) -C wasm/full-nym-wasm
|
||||||
|
|
||||||
# run this from npm/yarn to ensure tools are in the path, e.g. yarn build:sdk from root of repo
|
# run this from npm/yarn to ensure tools are in the path, e.g. yarn build:sdk from root of repo
|
||||||
@@ -119,7 +115,7 @@ sdk-typescript-build:
|
|||||||
yarn --cwd sdk/typescript/codegen/contract-clients build
|
yarn --cwd sdk/typescript/codegen/contract-clients build
|
||||||
|
|
||||||
# NOTE: These targets are part of the main workspace (but not as wasm32-unknown-unknown)
|
# NOTE: These targets are part of the main workspace (but not as wasm32-unknown-unknown)
|
||||||
WASM_CRATES = extension-storage nym-client-wasm nym-node-tester-wasm zknym-lib
|
WASM_CRATES = extension-storage nym-client-wasm nym-node-tester-wasm
|
||||||
|
|
||||||
sdk-wasm-test:
|
sdk-wasm-test:
|
||||||
#cargo test $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
#cargo test $(addprefix -p , $(WASM_CRATES)) --target wasm32-unknown-unknown -- -Dwarnings
|
||||||
@@ -134,69 +130,20 @@ cargo-test: sdk-wasm-test
|
|||||||
clippy: sdk-wasm-lint
|
clippy: sdk-wasm-lint
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Build CosmWasm contracts (deterministic docker build)
|
# Build contracts ready for deploy
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CONTRACTS=vesting_contract mixnet_contract nym_service_provider_directory nym_name_service
|
||||||
|
CONTRACTS_WASM=$(addsuffix .wasm, $(CONTRACTS))
|
||||||
|
CONTRACTS_OUT_DIR=contracts/target/wasm32-unknown-unknown/release
|
||||||
|
|
||||||
WASM_CONTRACT_DIR := contracts/target/wasm32-unknown-unknown/release
|
contracts: build-release-contracts wasm-opt-contracts
|
||||||
# Find every direct contract folder that contains a Cargo.toml
|
|
||||||
CONTRACT_DIRS := $(shell find contracts -type f -name Cargo.toml \( ! -path "contracts/Cargo.toml" \) | grep -v integration-tests | xargs -n1 dirname | sort -u)
|
|
||||||
|
|
||||||
CONTRACTS_OUT_DIR = contracts/artifacts
|
|
||||||
|
|
||||||
# Build all contracts via the official CosmWasm optimizer image (one invocation per contract)
|
|
||||||
# See : https://github.com/CosmWasm/optimizer?tab=readme-ov-file#contracts-excluded-from-workspace
|
|
||||||
# The optimizer ships separate multi-arch images. ARM builds are *not* bit-for-bit identical to the
|
|
||||||
# canonical x86_64 build (see README notice in CosmWasm/optimizer). For reproducible artefacts we
|
|
||||||
# therefore always run the amd64 variant by default.
|
|
||||||
# Override with :
|
|
||||||
# $ COSMWASM_OPTIMIZER_IMAGE=cosmwasm/optimizer-arm64:0.17.0 make contracts-publish
|
|
||||||
#
|
|
||||||
COSMWASM_OPTIMIZER_IMAGE ?= cosmwasm/optimizer:0.17.0
|
|
||||||
COSMWASM_OPTIMIZER_PLATFORM ?= linux/amd64
|
|
||||||
|
|
||||||
# Ensure clean build environment and run the optimizer
|
|
||||||
optimize-contracts:
|
|
||||||
@rm -rf artifacts 2>/dev/null || true
|
|
||||||
@echo "=== Ensuring clean build environment"
|
|
||||||
docker volume rm nym_contracts_cache 2>/dev/null || true
|
|
||||||
docker volume rm registry_cache 2>/dev/null || true
|
|
||||||
@for DIR in $(CONTRACT_DIRS); do \
|
|
||||||
echo "=== Optimizing $${DIR}"; \
|
|
||||||
docker run --rm --platform $(COSMWASM_OPTIMIZER_PLATFORM) \
|
|
||||||
-v $(CURDIR):/code \
|
|
||||||
--mount type=volume,source=nym_contracts_cache,target=/target \
|
|
||||||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
|
|
||||||
-e CARGO_BUILD_INCREMENTAL=false \
|
|
||||||
-e RUSTFLAGS="-C target-cpu=generic -C debuginfo=0" \
|
|
||||||
-e SOURCE_DATE_EPOCH=1 \
|
|
||||||
$(COSMWASM_OPTIMIZER_IMAGE) $${DIR}; \
|
|
||||||
done
|
|
||||||
@mkdir -p $(CONTRACTS_OUT_DIR)
|
|
||||||
@cp artifacts/*.wasm $(CONTRACTS_OUT_DIR)/ 2>/dev/null || true
|
|
||||||
|
|
||||||
@cd $(CONTRACTS_OUT_DIR) && sha256sum *.wasm > checksums.txt
|
|
||||||
# Cleanup temporary artefacts directory
|
|
||||||
@rm -rf artifacts 2>/dev/null || true
|
|
||||||
|
|
||||||
wasm-opt-contracts:
|
wasm-opt-contracts:
|
||||||
@for WASM in $(WASM_CONTRACT_DIR)/*.wasm; do \
|
for contract in $(CONTRACTS_WASM); do \
|
||||||
echo "Running wasm-opt on $$WASM"; \
|
wasm-opt --signext-lowering -Os $(CONTRACTS_OUT_DIR)/$$contract -o $(CONTRACTS_OUT_DIR)/$$contract; \
|
||||||
wasm-opt --signext-lowering -Os $$WASM -o $$WASM ; \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
cosmwasm-check-contracts:
|
|
||||||
@for WASM in $(WASM_CONTRACT_DIR)/*.wasm; do \
|
|
||||||
echo "Checking $$WASM"; \
|
|
||||||
cosmwasm-check $$WASM ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Default development build
|
|
||||||
contracts: build-release-contracts wasm-opt-contracts cosmwasm-check-contracts
|
|
||||||
|
|
||||||
# Publishing build used by CI – deterministic Docker optimiser
|
|
||||||
publish-contracts: optimize-contracts cosmwasm-check-contracts
|
|
||||||
|
|
||||||
# Consider adding 's' to make plural consistent (beware: used in github workflow)
|
# Consider adding 's' to make plural consistent (beware: used in github workflow)
|
||||||
contract-schema:
|
contract-schema:
|
||||||
$(MAKE) -C contracts schema
|
$(MAKE) -C contracts schema
|
||||||
@@ -205,9 +152,18 @@ contract-schema:
|
|||||||
# Convenience targets for crates that are already part of the main workspace
|
# Convenience targets for crates that are already part of the main workspace
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
build-explorer-api:
|
||||||
|
cargo build -p explorer-api
|
||||||
|
|
||||||
build-nym-cli:
|
build-nym-cli:
|
||||||
cargo build -p nym-cli --release
|
cargo build -p nym-cli --release
|
||||||
|
|
||||||
|
build-nym-gateway:
|
||||||
|
cargo build -p nym-gateway --release
|
||||||
|
|
||||||
|
build-nym-mixnode:
|
||||||
|
cargo build -p nym-mixnode --release
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Misc
|
# Misc
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@@ -216,12 +172,17 @@ generate-typescript:
|
|||||||
cd tools/ts-rs-cli && cargo run && cd ../..
|
cd tools/ts-rs-cli && cargo run && cd ../..
|
||||||
yarn types:lint:fix
|
yarn types:lint:fix
|
||||||
|
|
||||||
# Run the integration tests for public nym-api endpoints
|
|
||||||
run-api-tests:
|
run-api-tests:
|
||||||
dotenv -f envs/sandbox.env -- cargo test --test public-api-tests
|
cd nym-api/tests/functional_test && yarn test:qa
|
||||||
|
|
||||||
# Build debian package, and update PPA
|
# Build debian package, and update PPA
|
||||||
|
deb-mixnode: build-nym-mixnode
|
||||||
|
cargo deb -p nym-mixnode
|
||||||
|
|
||||||
|
deb-gateway: build-nym-gateway
|
||||||
|
cargo deb -p nym-gateway
|
||||||
|
|
||||||
deb-cli: build-nym-cli
|
deb-cli: build-nym-cli
|
||||||
cargo deb -p nym-cli
|
cargo deb -p nym-cli
|
||||||
|
|
||||||
deb: deb-cli
|
deb: deb-mixnode deb-gateway deb-cli
|
||||||
@@ -7,73 +7,86 @@ SPDX-License-Identifier: Apache-2.0
|
|||||||
|
|
||||||
The platform is composed of multiple Rust crates. Top-level executable binary crates include:
|
The platform is composed of multiple Rust crates. Top-level executable binary crates include:
|
||||||
|
|
||||||
* `nym-node` - a tool for running a node within the Nym network. Nym Nodes containing functionality such as `mixnode`, `entry-gateway` and `exit-gateway` are fundamental components of Nym Mixnet architecture. Nym Nodes are ran by decentralised node operators. Read more about `nym-node` in [Operators Guide documentation](https://nymtech.net/operators/nodes/nym-node.html). Network functionality of `nym-node` (labeled with `--mode` flag) can be:
|
* nym-mixnode - shuffles [Sphinx](https://github.com/nymtech/sphinx) packets together to provide privacy against network-level attackers.
|
||||||
- `mixnode` - shuffles [Sphinx](https://github.com/nymtech/sphinx) packets together to provide privacy against network-level attackers.
|
* nym-client - an executable which you can build into your own applications. Use it for interacting with Nym nodes.
|
||||||
- `gateway` - acts sort of like a mailbox for mixnet messages, which removes the need for direct delivery to potentially offline or firewalled devices. Gateways can be further categorized as `entry-gateway` and `exit-gateway`. The latter has an extra embedded IP packet router and Network requester to route data to the internet.
|
* nym-socks5-client - a Socks5 proxy you can run on your machine and use with existing applications.
|
||||||
* `nym-client` - an executable which you can build into your own applications. Use it for interacting with Nym nodes.
|
* nym-gateway - acts sort of like a mailbox for mixnet messages, which removes the need for direct delivery to potentially offline or firewalled devices.
|
||||||
* `nym-socks5-client` - a Socks5 proxy you can run on your machine and use with existing applications.
|
* nym-network-monitor - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing").
|
||||||
* `nym-explorer` - a (projected) block explorer and (existing) mixnet viewer.
|
* nym-explorer - a (projected) block explorer and (existing) mixnet viewer.
|
||||||
* `nym-wallet` - a desktop wallet implemented using the [Tauri](https://tauri.app)) framework.
|
* nym-wallet - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
|
||||||
* `nym-cli` - a tool for interacting with the network from the CLI.
|
|
||||||
<!-- coming soon
|
|
||||||
* `nym-network-monitor` - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing").
|
|
||||||
-->
|
|
||||||
|
|
||||||
```ascii
|
|
||||||
┌─►mix──┐ mix mix
|
|
||||||
│ │
|
|
||||||
Entry │ │ Exit
|
|
||||||
client ───► Gateway ──┘ mix │ mix ┌─►mix ───► Gateway ───► internet
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
mix └─►mix──┘ mix
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
[](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
|
[](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
|
||||||
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
* Platform build instructions are available on Nym [Operators Guide documentation](https://nymtech.net/operators/binaries/building-nym.html).
|
Platform build instructions are available on [our docs site](https://nymtech.net/docs/binaries/pre-built-binaries.html).
|
||||||
* Wallet build instructions are available [here](https://github.com/nymtech/nym/tree/master/nym-wallet#installation-prerequisites---linux--mac).
|
Wallet build instructions are also available on [our docs site](https://nymtech.net/docs/wallet/desktop-wallet.html).
|
||||||
|
|
||||||
### Developing
|
### Developing
|
||||||
|
|
||||||
References for developers:
|
There's a `.env.sample-dev` file provided which you can rename to `.env` if you want convenient logging, backtrace, or other environment variables pre-set. The `.env` file is ignored so you don't need to worry about checking it in.
|
||||||
|
|
||||||
* [Dev Docs](https://nym.com/docs/developers)
|
For Typescript components, please see [ts-packages](./ts-packages).
|
||||||
* [SDKs](https://nym.com/docs/developers/rust)
|
|
||||||
* [Network Docs](https://nym.com/docs/network)
|
|
||||||
* [Release Cycle - git flow](https://nym.com/docs/operators/release-cycle)
|
|
||||||
|
|
||||||
### Developer chat
|
### Developer chat
|
||||||
|
|
||||||
You can chat to us in the #dev channel on [Matrix](https://matrix.to/#/#dev:nymtech.chat) or on the [Nym Forum](https://forum.nymtech.net).
|
> We used to use Keybase for developer chats, but we have since migrated to Matrix and Discord. We no longer check the old **nymtech.friends** Keybase team.
|
||||||
|
|
||||||
### Tokenomics & Rewards
|
You can chat to us in two places:
|
||||||
|
* The #dev channel on [Matrix](https://matrix.to/#/#dev:nymtech.chat)
|
||||||
|
* The various developer channels on [Discord](https://discord.gg/nym)
|
||||||
|
|
||||||
Nym network economic incentives, operator and validator rewards, and scalability of the network are determined according to the principles laid out in the section 6 of [Nym Whitepaper](https://nymtech.net/nym-whitepaper.pdf).
|
### Rewards
|
||||||
Initial reward pool is set to 250 million Nym, making the circulating supply 750 million Nym.
|
|
||||||
|
Node, node operator and delegator rewards are determined according to the principles laid out in the section 6 of [Nym Whitepaper](https://nymtech.net/nym-whitepaper.pdf). Below is a TLDR of the variables and formulas involved in calculating the epoch rewards. Initial reward pool is set to 250 million Nym, making the circulating supply 750 million Nym.
|
||||||
|
|
||||||
|
|Symbol|Definition|
|
||||||
|
|---|---|
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=R#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}R#gh-dark-mode-only">|global share of rewards available, starts at 2% of the reward pool.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=R_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}R_{i}#gh-dark-mode-only">|node reward for mixnode `i`.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=\sigma_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\sigma_{i}#gh-dark-mode-only">|ratio of total node stake (node bond + all delegations) to the token circulating supply.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=\lambda_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\lambda_{i}#gh-dark-mode-only">|ratio of stake operator has pledged to their node to the token circulating supply.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=\omega_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\omega_{i}#gh-dark-mode-only">|fraction of total effort undertaken by node `i`, set to `1/k`.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=k#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}k#gh-dark-mode-only">|number of nodes stakeholders are incentivised to create, set by the validators, a matter of governance. Currently determined by the `reward set` size, and set to 720 in testnet Sandbox.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=\alpha#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}\alpha#gh-dark-mode-only">|A Sybil attack resistance parameter - the higher this parameter is set, the stronger the reduction in competitiveness for a Sybil attacker.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=PM_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PM_{i}#gh-dark-mode-only">|declared profit margin of operator `i`, defaults to 10%.
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=PF_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PF_{i}#gh-dark-mode-only">|uptime of node `i`, scaled to 0 - 1, for the rewarding epoch
|
||||||
|
|<img src="https://render.githubusercontent.com/render/math?math=PP_{i}#gh-light-mode-only"><img src="https://render.githubusercontent.com/render/math?math=\color{white}PP_{i}#gh-dark-mode-only">|cost of operating node `i` for the duration of the rewarding epoch, set to 40 NYMs.
|
||||||
|
|
||||||
|
Node reward for node `i` is determined as:
|
||||||
|
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=R_{i}=PF_{i} \cdot R \cdot (\sigma^'_{i} \cdot \omega_{i} \cdot k %2b \alpha \cdot \lambda^'_{i} \cdot \sigma^'_{i} \cdot k)/(1 %2b \alpha)#gh-light-mode-only">
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\color{white}R_{i}=PF_{i} \cdot R \cdot (\sigma^'_{i} \cdot \omega_{i} \cdot k %2b \alpha \cdot \lambda^'_{i} \cdot \sigma^'_{i} \cdot k)/(1 %2b \alpha)#gh-dark-mode-only">
|
||||||
|
where:
|
||||||
|
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\sigma^'_{i} = min\{\sigma_{i}, 1/k\}#gh-light-mode-only">
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\color{white}\sigma^'_{i} = min\{\sigma_{i}, 1/k\}#gh-dark-mode-only">
|
||||||
|
|
||||||
|
and
|
||||||
|
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\lambda^'_{i} = min\{\lambda_{i}, 1/k\}#gh-light-mode-only">
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\color{white}\lambda^'_{i} = min\{\lambda_{i}, 1/k\}#gh-dark-mode-only">
|
||||||
|
|
||||||
|
Operator of node `i` is credited with the following amount:
|
||||||
|
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=min\{PP_{i},R_{i})\} %2b max\{0, (PM_{i} %2b (1 - PM_{i}) \cdot \lambda_{i}/\delta_{i}) \cdot (R_{i} - PP_{i})\}#gh-light-mode-only">
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\color{white}min\{PP_{i},R_{i})\} %2b max\{0, (PM_{i} %2b (1 - PM_{i}) \cdot \lambda_{i}/\delta_{i}) \cdot (R_{i} - PP_{i})\}#gh-dark-mode-only">
|
||||||
|
|
||||||
|
Delegate with stake `s` receives:
|
||||||
|
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=max\{0, (1-PM_{i}) \cdot (s^'/\sigma_{i}) \cdot (R_{i} - PP_{i})\}#gh-light-mode-only">
|
||||||
|
<img src="https://render.githubusercontent.com/render/math?math=\color{white}max\{0, (1-PM_{i}) \cdot (s^'/\sigma_{i}) \cdot (R_{i} - PP_{i})\}#gh-dark-mode-only">
|
||||||
|
|
||||||
|
where `s'` is stake `s` scaled over total token circulating supply.
|
||||||
|
|
||||||
### Licensing and copyright information
|
### Licensing and copyright information
|
||||||
|
|
||||||
This is a monorepo and components that make up Nym as a system are licensed individually, so for accurate information, please check individual files.
|
This is a monorepo and components that make up Nym as a system are licensed individually, so for accurate information, please check individual files.
|
||||||
|
|
||||||
As a general approach, licensing is as follows this pattern:
|
As a general approach, licensing is as follows this pattern:
|
||||||
|
|
||||||
- applications and binaries are GPLv3
|
- applications and binaries are GPLv3
|
||||||
- libraries and components are Apache 2.0 or MIT
|
- libraries and components are Apache 2.0 or MIT
|
||||||
- documentation is Apache 2.0 or CC0-1.0
|
- documentation is Apache 2.0 or CC0-1.0
|
||||||
|
|
||||||
Nym Node Operators and Validators Terms and Conditions can be found [here](https://nym.com/operators-validators-terms).
|
Again, for accurate information, please check individual files.
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
|
|||||||
+56
-68
@@ -3,23 +3,37 @@ Critical bug or security issue 💥
|
|||||||
If you're here because you're trying to figure out how to notify us of a security issue, send us a PGP encrypted email to:
|
If you're here because you're trying to figure out how to notify us of a security issue, send us a PGP encrypted email to:
|
||||||
|
|
||||||
```
|
```
|
||||||
security@nym.com
|
security@nymte.ch
|
||||||
```
|
```
|
||||||
|
|
||||||
Encrypted with our public key which is available below in plain text and also on keyservers:
|
Encrypted with our public key which is available below in plain text and also on keyservers:
|
||||||
|
|
||||||
```
|
```
|
||||||
sec rsa4096/7C3C727F05090550 2023-10-30 [SC] [expire : 2026-10-29]
|
pub rsa4096 2023-10-30 [SC] [expire : 2026-10-29]
|
||||||
24B2592E801A5AAA8666C8BA7C3C727F05090550
|
24B2592E801A5AAA8666C8BA7C3C727F05090550
|
||||||
uid [ ultime ] Security Nym Technologies <security@nym.com>
|
uid [ ultime ] Security Nym Technologies <security@nymte.ch>
|
||||||
ssb rsa4096/ACD0FBD79DC70ACC 2023-10-30 [E] [expire : 2026-10-29]
|
sub rsa4096 2023-10-30 [E] [expire : 2026-10-29]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The fingerprint of the key is on the second line above.
|
The fingerprint of the key is on the second line above.
|
||||||
|
|
||||||
|
If you need to chat __urgently__ to our team for a __critical__ security issue:
|
||||||
|
|
||||||
|
go to Matrix, and alert the core engineers with a private direct message:
|
||||||
|
|
||||||
|
Jedrzej Stuczynski @jstuczyn:nymtech.chat
|
||||||
|
Mark Sinclair @mark:nymtech.chat
|
||||||
|
Raphaël Walther @raphael:nymtech.chat
|
||||||
|
|
||||||
Please avoid opening public issues on GitHub that contain information about a potential security vulnerability as this makes it difficult to reduce the impact and harm of valid security issues.
|
Please avoid opening public issues on GitHub that contain information about a potential security vulnerability as this makes it difficult to reduce the impact and harm of valid security issues.
|
||||||
|
|
||||||
|
If you don't know what Matrix is, you can follow this documentation to create an account on this federation of instant messaging servers:
|
||||||
|
|
||||||
|
[Matrix for Instant Messaging](https://matrix.org/docs/chat_basics/matrix-for-im/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
@@ -34,69 +48,43 @@ vMFUIzBMHOPXH16036zGyFMC1esRd2qqil4b9KtLgCOkrD1VgpjcveoA0VyMJCN6
|
|||||||
LmKTrVjwjjDMxby+d49BolRWGnCofXozXwvNQx+CYv8M2WPErTpyYoofYFtpqr7A
|
LmKTrVjwjjDMxby+d49BolRWGnCofXozXwvNQx+CYv8M2WPErTpyYoofYFtpqr7A
|
||||||
fIufc/e0+um3zoGIbHejrhsbuH9Qf+MKsI+Ng93bdDtjeHz6MEgAlsTm0qeizYpj
|
fIufc/e0+um3zoGIbHejrhsbuH9Qf+MKsI+Ng93bdDtjeHz6MEgAlsTm0qeizYpj
|
||||||
IyKZIObPmfvrAm08hFZ8JnGk+XuooF36XWbJYjCCy0bOyMw1r7ZG99TcSwARAQAB
|
IyKZIObPmfvrAm08hFZ8JnGk+XuooF36XWbJYjCCy0bOyMw1r7ZG99TcSwARAQAB
|
||||||
tCxTZWN1cml0eSBOeW0gVGVjaG5vbG9naWVzIDxzZWN1cml0eUBueW0uY29tPokC
|
tC1TZWN1cml0eSBOeW0gVGVjaG5vbG9naWVzIDxzZWN1cml0eUBueW10ZS5jaD6J
|
||||||
VAQTAQoAPhYhBCSyWS6AGlqqhmbIunw8cn8FCQVQBQJnSd5VAhsDBQkFo5qABQsJ
|
AlQEEwEKAD4WIQQkslkugBpaqoZmyLp8PHJ/BQkFUAUCZT9elwIbAwUJBaOagAUL
|
||||||
CAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEHw8cn8FCQVQPPIP/ipGz2zLAjE2dSE3
|
CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8PHJ/BQkFUL7dD/9zO73uI5VR+SWx
|
||||||
VcqOvras0DfqIL9HDm26Dg6QO2D/4YRntw0RqVyuy+zFnRUm+RZCKLPLUzbQ9Wjb
|
PFmJW+9QsPiQbVRvGwNZurctmQ2s2Pe0vHRELFeqD5oYvSx2Lequ3Ir+zn/C3kDM
|
||||||
G/Og5ttQVYQMu5eKu7OMvXkrbRo3teZFU+8IL08zIW6pyf9haxO6YMhLRy6cLYwW
|
kNs40obSL6jCBiLPkxEY0JqzPM9jZr7EjvlibWV3f6DxooRIqEyfN57I3OBGlqZE
|
||||||
0EYC6Qzn5gz3kI7VkI8fWfs2Dk4XEV3D+SVtBoF6KRxMXT6HZvpzoMSEJZBoNj8S
|
0Mx7sQuCcgau8C70DF952QhKUwXC2cmpmDKHVEEoio1xGSD4dQhGapCB32RQGtna
|
||||||
jw0TF8TFUQf49jUQbIHumukMswolrHi8a5ej8DSfNwSgz+Tt8oh5lu01kyUJiHn7
|
OGfAO9celNMvSq0Lp+aJxeACmWFY5T4/y79JPcT5vSs/yEIRmaH/fn2piwaFBsIq
|
||||||
nuHaY4Y9cHUVAOSwq/hovG52+ZE1r3aiswvle/B19o9pKeWWVvacSptGxDQagBtQ
|
gHJJMxO3740P1hF8j7KWUoUofuFaEALHBpEpjWTOj8ej1wmFlu+5F+jSVoc781Wb
|
||||||
igoNLdRvY0XN2TEyX9pOHR0AoVOxtIW11CpkKuDbQG9vPwovqJ2L6+Fh3pzHYzcI
|
ZZXu04cOBXnGTogzSxMpBe9TtLb28zd6WzFotC25KTI3pngMzXsQGLJLOwvoZKiS
|
||||||
2GIShNm/Z2SZBiUqbljJe9H4UAT/aHgMINkEG8qzUKwO42MA5HJT7YbHTR17/QSF
|
LFjPRjg1rwobmB3Q3J2W5GYSveia0CDsZGP+g87GVVf/oD2Djpa68xyVYwIYeA6T
|
||||||
Il5dhneRzmSbNcW2rdRwx/BmzrcsFJfqCt4JG/WDF293xSOjhFqQYvU4gCO+OB7o
|
3DNdS77qHiRuGiS4kWXyVjDqOICboR4uCvt09zlkBuLDdTWqWYARUvZjtjs4w/Ol
|
||||||
KXjX907XXDjS2KEJ71OGqVfk/P7BqEfQNfrLtb02TyXJAPQXHhybv23c4E7zUs9V
|
rdrBI3A88ti8fRldYaNpu17ME1ilpN44yKoJtqiWc3Tisk8eYLfx6c7FQF3PrRva
|
||||||
lMjNizzxYB96uwJb0LAB2ijzEwoP91uGT2tFjk6F08x2QiArmXUdgrv44b39Stia
|
mr7FZvhFsYML5CeNFHTEzN6Y3jjKN/60DvCfodWnWFK47Txkl8UAXGY2W9B0fWqQ
|
||||||
gJS0GYKqSzyr10xHhUuDA+GKYtcitC1TZWN1cml0eSBOeW0gVGVjaG5vbG9naWVz
|
wUVr8uLuMyyMiKbeoufi7rGOj6AMErkCDQRlP16XARAA8FGmD5J3tM1BOM1niJxZ
|
||||||
IDxzZWN1cml0eUBueW10ZS5jaD6JAjYEMAEKACAWIQQkslkugBpaqoZmyLp8PHJ/
|
JTdCauzEtxEoBL0RuqGBkR8U29sRM6DwuzjU7PwscFnBaGyU+eU73GwGkH3ozFfF
|
||||||
BQkFUAUCZ0nftQIdIAAKCRB8PHJ/BQkFUFHDEACtyNuUEjKCLAT5mSfow85PjFgo
|
tllYhQrhP/kkN+0rEO5Xi+nR+4JCFRqrf3nJXAAPfiksURMp8er1dUOY2/e1ZSoL
|
||||||
o8kHjQr/IIQ7ZbBOHeJJcrxDuypssiLh5XUjF3x5BiBfZ6vCxSb81RRwsDMp0mA1
|
tS+nzUivV8CfE+pgj/5YtGwPC+KYHLATkKkMELCrbW4UO06VWOqQsvr6kivXuJQQ
|
||||||
qzv9G8sgW0HTQUnZ9oH6CYut2NgzAnQpmuacrunm9Zy0FJ3ejbmwUY/NqK6gJkle
|
LdEAMpBlADmXFG45DmPKQzsBWUgvTwyGy3LX0nys8cgpex9BH8hhr01QmGyP469s
|
||||||
66duHKhAy7DWjj7amd0C8bPDR+PA44fI3MezDHkQNaauKZTRqd1TqH8Qk5PAl4cB
|
N3cNrtFuu8U6RAsiCD/8mlBuD3EQEU5SF0lc7kCICAZk+wElmXnimEi0TOYsbz6k
|
||||||
o5gVzeZh/U7/usvtGhazAIUF5BqK6bTmDnYopg+2x8jjwrG4+08GrttZkNjBLXeA
|
90lteicX70rA9GNeyI76H+VSOYvWpkRwaJAgUdzrAM1o9SHASq+cZ6nD85OZioQk
|
||||||
Y/2U064yMz12LPv01qqAFdZ+coRy/ps/gOQTz34/VeW0CFy7TMqs4t3vSBWTqU7w
|
DWM6+Q+sf2oen0qJnnGmUr93kJIC0PIdgrXRrtiNfeRa1Z/H0LmREyyEMoFiVivn
|
||||||
hnw/qj6cM33fdxctj6KDgJSCkZdx2fvwXgxiPqUa5+j9FlFBeD5RDAl6g6t8N1/K
|
z1vVk85Oq6Sf3ltUwvmDzuuJOtsp2Qp6+x6Snn/yKauI4uf4Cf/wKUch4r6Bwgg5
|
||||||
Xca+zNYuSZgc297q1D+mtSD1C7uJNPxoAl+Bv5KNKpsjfQ+m04++CIFtGyX22aCA
|
Dw49ky7lwlnALio4GIVoGLpLef93wWoDmp4Klyh3ZPf2nB0U91u3bHRUo7m+D7QJ
|
||||||
h2/tHwQZIXhOiMAKOoupidDVDhgxtCJ3Ps416xL0sTZfsPfg+j1Uv/Em9pzPClEl
|
98cyKtqLLzjg7szGf60pIWNWRsadYQT3bSncynqknAjOV3BCvx6/ivsnpj//QjYR
|
||||||
fX6+1O4DdSyZUQ4VsjMu/H5W/NQdbHgmqFrxQ6WX/0s5GMwO6GMDiPe8sOrwz9wD
|
HtviUAcQ1DBB6UC6q23FIs0AEQEAAYkCPAQYAQoAJhYhBCSyWS6AGlqqhmbIunw8
|
||||||
WYtyjafxXOHEZ1OjYX5gr7bGaG4oKc2btTJN0B3Phg4dStnHCNjEYccxuV3507fj
|
cn8FCQVQBQJlP16XAhsMBQkFo5qAAAoJEHw8cn8FCQVQzukP/iLxjOxT+UpPR//c
|
||||||
HnNotkpXF2nGLxy+PYkCVAQTAQoAPhYhBCSyWS6AGlqqhmbIunw8cn8FCQVQBQJl
|
prDVSLkP4pF5bmw36U07jvqpS+/KTXsxiiQleffRabOpNLcd+K1ueavyt9nnIwHH
|
||||||
P16XAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEHw8cn8FCQVQ
|
tHS9kM9A7DBw3LnpEbXki46QDCCI6niGijlLOEeAWqnocwMNTT05wVVgCtO3DQP2
|
||||||
vt0P/3M7ve4jlVH5JbE8WYlb71Cw+JBtVG8bA1m6ty2ZDazY97S8dEQsV6oPmhi9
|
MoSCcqHpXDChvOyr5d5xjYLVJhlctIMSomcVzGryjknPu0Yj/TkC/4c+m86ZWQUD
|
||||||
LHYt6q7civ7Of8LeQMyQ2zjShtIvqMIGIs+TERjQmrM8z2NmvsSO+WJtZXd/oPGi
|
HqMHQIuiEenvb62/F4c5OJIRZPEn70wdddkgJuJU3eHdHrnuhCkjCC93GQGbGj03
|
||||||
hEioTJ83nsjc4EaWpkTQzHuxC4JyBq7wLvQMX3nZCEpTBcLZyamYModUQSiKjXEZ
|
Zqos6699y6hmPeD3U5IUv8ujwZYVCCuDm8gJfrp3R6WLfeZeK9WmTVBpCzsDg3fV
|
||||||
IPh1CEZqkIHfZFAa2do4Z8A71x6U0y9KrQun5onF4AKZYVjlPj/Lv0k9xPm9Kz/I
|
hSwmOk6pp8DAq1/Dev3yRkFggCEyGK6c9b+a0CRBncl8e5Q0QQIzNiS/uExQP3h+
|
||||||
QhGZof9+famLBoUGwiqAckkzE7fvjQ/WEXyPspZShSh+4VoQAscGkSmNZM6Px6PX
|
ELJs3P0MLP+6FWhNUry09n3lnWkr1hY+v1M0GAxbfdv/tsCN1Pq/VQEz+CTqXqya
|
||||||
CYWW77kX6NJWhzvzVZtlle7Thw4FecZOiDNLEykF71O0tvbzN3pbMWi0LbkpMjem
|
ftWldOHWw6Hh+gtwxcHjG4MBOrO5oICQ3lh2hGwQ58cDgZYSK/OGgJ9BggFl1CcM
|
||||||
eAzNexAYsks7C+hkqJIsWM9GODWvChuYHdDcnZbkZhK96JrQIOxkY/6DzsZVV/+g
|
0uGC0/TRCI1zt/4y+7efSZQMZkHo7VC/3MFbp2hcNejpW+BxVuwKTunFvWK3TLhq
|
||||||
PYOOlrrzHJVjAhh4DpPcM11LvuoeJG4aJLiRZfJWMOo4gJuhHi4K+3T3OWQG4sN1
|
sSlQ5yyhqchooepsFHq9bosKFjLJC01uprBv1rinoNduOy43FbyS7JPRRspANN0R
|
||||||
NapZgBFS9mO2OzjD86Wt2sEjcDzy2Lx9GV1ho2m7XswTWKWk3jjIqgm2qJZzdOKy
|
iC2pMbWdE0ZTQaFq6tPIg058pjqi
|
||||||
Tx5gt/HpzsVAXc+tG9qavsVm+EWxgwvkJ40UdMTM3pjeOMo3/rQO8J+h1adYUrjt
|
=nqgX
|
||||||
PGSXxQBcZjZb0HR9apDBRWvy4u4zLIyIpt6i5+LusY6PoAwSuQINBGU/XpcBEADw
|
|
||||||
UaYPkne0zUE4zWeInFklN0Jq7MS3ESgEvRG6oYGRHxTb2xEzoPC7ONTs/CxwWcFo
|
|
||||||
bJT55TvcbAaQfejMV8W2WViFCuE/+SQ37SsQ7leL6dH7gkIVGqt/eclcAA9+KSxR
|
|
||||||
Eynx6vV1Q5jb97VlKgu1L6fNSK9XwJ8T6mCP/li0bA8L4pgcsBOQqQwQsKttbhQ7
|
|
||||||
TpVY6pCy+vqSK9e4lBAt0QAykGUAOZcUbjkOY8pDOwFZSC9PDIbLctfSfKzxyCl7
|
|
||||||
H0EfyGGvTVCYbI/jr2w3dw2u0W67xTpECyIIP/yaUG4PcRARTlIXSVzuQIgIBmT7
|
|
||||||
ASWZeeKYSLRM5ixvPqT3SW16JxfvSsD0Y17Ijvof5VI5i9amRHBokCBR3OsAzWj1
|
|
||||||
IcBKr5xnqcPzk5mKhCQNYzr5D6x/ah6fSomecaZSv3eQkgLQ8h2CtdGu2I195FrV
|
|
||||||
n8fQuZETLIQygWJWK+fPW9WTzk6rpJ/eW1TC+YPO64k62ynZCnr7HpKef/Ipq4ji
|
|
||||||
5/gJ//ApRyHivoHCCDkPDj2TLuXCWcAuKjgYhWgYukt5/3fBagOangqXKHdk9/ac
|
|
||||||
HRT3W7dsdFSjub4PtAn3xzIq2osvOODuzMZ/rSkhY1ZGxp1hBPdtKdzKeqScCM5X
|
|
||||||
cEK/Hr+K+yemP/9CNhEe2+JQBxDUMEHpQLqrbcUizQARAQABiQI8BBgBCgAmFiEE
|
|
||||||
JLJZLoAaWqqGZsi6fDxyfwUJBVAFAmU/XpcCGwwFCQWjmoAACgkQfDxyfwUJBVDO
|
|
||||||
6Q/+IvGM7FP5Sk9H/9ymsNVIuQ/ikXlubDfpTTuO+qlL78pNezGKJCV599Fps6k0
|
|
||||||
tx34rW55q/K32ecjAce0dL2Qz0DsMHDcuekRteSLjpAMIIjqeIaKOUs4R4Baqehz
|
|
||||||
Aw1NPTnBVWAK07cNA/YyhIJyoelcMKG87Kvl3nGNgtUmGVy0gxKiZxXMavKOSc+7
|
|
||||||
RiP9OQL/hz6bzplZBQMeowdAi6IR6e9vrb8Xhzk4khFk8SfvTB112SAm4lTd4d0e
|
|
||||||
ue6EKSMIL3cZAZsaPTdmqizrr33LqGY94PdTkhS/y6PBlhUIK4ObyAl+undHpYt9
|
|
||||||
5l4r1aZNUGkLOwODd9WFLCY6TqmnwMCrX8N6/fJGQWCAITIYrpz1v5rQJEGdyXx7
|
|
||||||
lDRBAjM2JL+4TFA/eH4Qsmzc/Qws/7oVaE1SvLT2feWdaSvWFj6/UzQYDFt92/+2
|
|
||||||
wI3U+r9VATP4JOperJp+1aV04dbDoeH6C3DFweMbgwE6s7mggJDeWHaEbBDnxwOB
|
|
||||||
lhIr84aAn0GCAWXUJwzS4YLT9NEIjXO3/jL7t59JlAxmQejtUL/cwVunaFw16Olb
|
|
||||||
4HFW7ApO6cW9YrdMuGqxKVDnLKGpyGih6mwUer1uiwoWMskLTW6msG/WuKeg1247
|
|
||||||
LjcVvJLsk9FGykA03RGILakxtZ0TRlNBoWrq08iDTnymOqI=
|
|
||||||
=QPTf
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
+10
-27
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-client"
|
name = "nym-client"
|
||||||
version = "1.1.62"
|
version = "1.1.34"
|
||||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
|
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||||
description = "Implementation of the Nym Client"
|
description = "Implementation of the Nym Client"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -23,50 +23,33 @@ url = { workspace = true }
|
|||||||
|
|
||||||
bs58 = { workspace = true }
|
bs58 = { workspace = true }
|
||||||
clap = { workspace = true, features = ["cargo", "derive"] }
|
clap = { workspace = true, features = ["cargo", "derive"] }
|
||||||
dirs = { workspace = true }
|
dirs = "4.0"
|
||||||
log = { workspace = true } # self explanatory
|
log = { workspace = true } # self explanatory
|
||||||
rand = { workspace = true }
|
rand = { version = "0.7.3", features = ["wasm-bindgen"] } # rng-related traits + some rng implementation to use
|
||||||
serde = { workspace = true, features = [
|
serde = { workspace = true, features = ["derive"] } # for config serialization/deserialization
|
||||||
"derive",
|
|
||||||
] } # for config serialization/deserialization
|
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tap = { workspace = true }
|
tap = "1.0.1"
|
||||||
time = { workspace = true }
|
time = { workspace = true }
|
||||||
tokio = { workspace = true, features = [
|
tokio = { workspace = true, features = ["rt-multi-thread", "net", "signal"] } # async runtime
|
||||||
"rt-multi-thread",
|
|
||||||
"net",
|
|
||||||
"signal",
|
|
||||||
] } # async runtime
|
|
||||||
tokio-tungstenite = { workspace = true }
|
tokio-tungstenite = { workspace = true }
|
||||||
zeroize = { workspace = true }
|
zeroize = { workspace = true }
|
||||||
|
|
||||||
## internal
|
## internal
|
||||||
nym-bandwidth-controller = { path = "../../common/bandwidth-controller" }
|
nym-bandwidth-controller = { path = "../../common/bandwidth-controller" }
|
||||||
nym-bin-common = { path = "../../common/bin-common", features = [
|
nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] }
|
||||||
"output_format",
|
nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage", "fs-gateways-storage", "cli"] }
|
||||||
"clap",
|
|
||||||
"basic_tracing",
|
|
||||||
] }
|
|
||||||
nym-client-core = { path = "../../common/client-core", features = [
|
|
||||||
"fs-credentials-storage",
|
|
||||||
"fs-surb-storage",
|
|
||||||
"fs-gateways-storage",
|
|
||||||
"cli",
|
|
||||||
] }
|
|
||||||
nym-config = { path = "../../common/config" }
|
nym-config = { path = "../../common/config" }
|
||||||
nym-credential-storage = { path = "../../common/credential-storage" }
|
nym-credential-storage = { path = "../../common/credential-storage" }
|
||||||
nym-credentials = { path = "../../common/credentials" }
|
nym-credentials = { path = "../../common/credentials" }
|
||||||
nym-crypto = { path = "../../common/crypto" }
|
nym-crypto = { path = "../../common/crypto" }
|
||||||
nym-gateway-requests = { path = "../../common/gateway-requests" }
|
nym-gateway-requests = { path = "../../gateway/gateway-requests" }
|
||||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||||
nym-pemstore = { path = "../../common/pemstore" }
|
nym-pemstore = { path = "../../common/pemstore" }
|
||||||
nym-task = { path = "../../common/task" }
|
nym-task = { path = "../../common/task" }
|
||||||
nym-topology = { path = "../../common/topology" }
|
nym-topology = { path = "../../common/topology" }
|
||||||
nym-validator-client = { path = "../../common/client-libs/validator-client", features = [
|
nym-validator-client = { path = "../../common/client-libs/validator-client", features = ["http-client"] }
|
||||||
"http-client",
|
|
||||||
] }
|
|
||||||
nym-client-websocket-requests = { path = "websocket-requests" }
|
nym-client-websocket-requests = { path = "websocket-requests" }
|
||||||
nym-id = { path = "../../common/nym-id" }
|
nym-id = { path = "../../common/nym-id" }
|
||||||
|
|
||||||
|
|||||||
+242
-85
@@ -744,18 +744,6 @@
|
|||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/braces": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
|
||||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"fill-range": "^7.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.20.2",
|
"version": "4.20.2",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
|
||||||
@@ -874,6 +862,51 @@
|
|||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chokidar/node_modules/braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/chokidar/node_modules/fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/chokidar/node_modules/is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/chokidar/node_modules/to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/chrome-trace-event": {
|
"node_modules/chrome-trace-event": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
|
||||||
@@ -1560,6 +1593,39 @@
|
|||||||
"node": ">=8.6.0"
|
"node": ">=8.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fast-glob/node_modules/braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fast-glob/node_modules/fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fast-glob/node_modules/is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fast-glob/node_modules/micromatch": {
|
"node_modules/fast-glob/node_modules/micromatch": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
||||||
@@ -1573,6 +1639,18 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fast-glob/node_modules/to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fast-json-stable-stringify": {
|
"node_modules/fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||||
@@ -1605,18 +1683,6 @@
|
|||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fill-range": {
|
|
||||||
"version": "7.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
|
||||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"to-regex-range": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/finalhandler": {
|
"node_modules/finalhandler": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||||
@@ -2048,11 +2114,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/http-proxy-middleware": {
|
"node_modules/http-proxy-middleware": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.4.tgz",
|
||||||
"integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==",
|
"integrity": "sha512-m/4FxX17SUvz4lJ5WPXOHDUuCwIqXLfLHs1s0uZ3oYjhoXlx9csYxaOa0ElDEJ+h8Q4iJ1s+lTMbiCa4EXIJqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/http-proxy": "^1.17.8",
|
"@types/http-proxy": "^1.17.8",
|
||||||
"http-proxy": "^1.18.1",
|
"http-proxy": "^1.18.1",
|
||||||
@@ -2072,6 +2137,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/http-proxy-middleware/node_modules/braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/http-proxy-middleware/node_modules/fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/http-proxy-middleware/node_modules/is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/http-proxy-middleware/node_modules/micromatch": {
|
"node_modules/http-proxy-middleware/node_modules/micromatch": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
||||||
@@ -2085,6 +2183,18 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/http-proxy-middleware/node_modules/to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/human-signals": {
|
"node_modules/human-signals": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
||||||
@@ -2251,15 +2361,6 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-number": {
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-path-cwd": {
|
"node_modules/is-path-cwd": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
||||||
@@ -3752,18 +3853,6 @@
|
|||||||
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
|
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/to-regex-range": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"is-number": "^7.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/toidentifier": {
|
"node_modules/toidentifier": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
@@ -5124,15 +5213,6 @@
|
|||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"braces": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
|
||||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"fill-range": "^7.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"version": "4.20.2",
|
"version": "4.20.2",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
|
||||||
@@ -5203,6 +5283,41 @@
|
|||||||
"is-glob": "~4.0.1",
|
"is-glob": "~4.0.1",
|
||||||
"normalize-path": "~3.0.0",
|
"normalize-path": "~3.0.0",
|
||||||
"readdirp": "~3.6.0"
|
"readdirp": "~3.6.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"chrome-trace-event": {
|
"chrome-trace-event": {
|
||||||
@@ -5737,6 +5852,30 @@
|
|||||||
"micromatch": "^4.0.4"
|
"micromatch": "^4.0.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
||||||
@@ -5746,6 +5885,15 @@
|
|||||||
"braces": "^3.0.1",
|
"braces": "^3.0.1",
|
||||||
"picomatch": "^2.2.3"
|
"picomatch": "^2.2.3"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5778,15 +5926,6 @@
|
|||||||
"websocket-driver": ">=0.5.1"
|
"websocket-driver": ">=0.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fill-range": {
|
|
||||||
"version": "7.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
|
||||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"to-regex-range": "^5.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"finalhandler": {
|
"finalhandler": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||||
@@ -6096,9 +6235,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-proxy-middleware": {
|
"http-proxy-middleware": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.4.tgz",
|
||||||
"integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==",
|
"integrity": "sha512-m/4FxX17SUvz4lJ5WPXOHDUuCwIqXLfLHs1s0uZ3oYjhoXlx9csYxaOa0ElDEJ+h8Q4iJ1s+lTMbiCa4EXIJqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/http-proxy": "^1.17.8",
|
"@types/http-proxy": "^1.17.8",
|
||||||
@@ -6108,6 +6247,30 @@
|
|||||||
"micromatch": "^4.0.2"
|
"micromatch": "^4.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
|
||||||
@@ -6117,6 +6280,15 @@
|
|||||||
"braces": "^3.0.1",
|
"braces": "^3.0.1",
|
||||||
"picomatch": "^2.2.3"
|
"picomatch": "^2.2.3"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -6235,12 +6407,6 @@
|
|||||||
"is-extglob": "^2.1.1"
|
"is-extglob": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is-number": {
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"is-path-cwd": {
|
"is-path-cwd": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
||||||
@@ -7358,15 +7524,6 @@
|
|||||||
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
|
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-regex-range": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-number": "^7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toidentifier": {
|
"toidentifier": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ pub mod old_config_v1_1_13;
|
|||||||
pub mod old_config_v1_1_20;
|
pub mod old_config_v1_1_20;
|
||||||
pub mod old_config_v1_1_20_2;
|
pub mod old_config_v1_1_20_2;
|
||||||
pub mod old_config_v1_1_33;
|
pub mod old_config_v1_1_33;
|
||||||
pub mod old_config_v1_1_54;
|
|
||||||
mod persistence;
|
mod persistence;
|
||||||
mod template;
|
mod template;
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ pub fn default_data_directory<P: AsRef<Path>>(id: P) -> PathBuf {
|
|||||||
.join(DEFAULT_DATA_DIR)
|
.join(DEFAULT_DATA_DIR)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Serialize, Clone)]
|
#[derive(Debug, Deserialize, PartialEq, Serialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub base: BaseClientConfig,
|
pub base: BaseClientConfig,
|
||||||
@@ -95,10 +94,6 @@ impl CliClientConfig for Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
pub fn base(&self) -> BaseClientConfig {
|
|
||||||
self.base.clone()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn new<S: AsRef<str>>(id: S) -> Self {
|
pub fn new<S: AsRef<str>>(id: S) -> Self {
|
||||||
Config {
|
Config {
|
||||||
base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")),
|
base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")),
|
||||||
@@ -214,7 +209,7 @@ impl SocketType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)]
|
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize)]
|
||||||
#[serde(default, deny_unknown_fields)]
|
#[serde(default, deny_unknown_fields)]
|
||||||
pub struct Socket {
|
pub struct Socket {
|
||||||
pub socket_type: SocketType,
|
pub socket_type: SocketType,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
use crate::client::config::persistence::ClientPaths;
|
use crate::client::config::persistence::ClientPaths;
|
||||||
use crate::client::config::{default_config_filepath, Socket, SocketType};
|
use crate::client::config::{default_config_filepath, Config, Socket, SocketType};
|
||||||
use crate::error::ClientError;
|
use crate::error::ClientError;
|
||||||
use nym_bin_common::logging::LoggingSettings;
|
use nym_bin_common::logging::LoggingSettings;
|
||||||
use nym_client_core::config::disk_persistence::old_v1_1_33::CommonClientPathsV1_1_33;
|
use nym_client_core::config::disk_persistence::old_v1_1_33::CommonClientPathsV1_1_33;
|
||||||
@@ -14,8 +14,6 @@ use std::io;
|
|||||||
use std::net::{IpAddr, Ipv4Addr};
|
use std::net::{IpAddr, Ipv4Addr};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use super::old_config_v1_1_54::ConfigV1_1_54;
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)]
|
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)]
|
||||||
pub struct ClientPathsV1_1_33 {
|
pub struct ClientPathsV1_1_33 {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
@@ -35,21 +33,6 @@ pub struct ConfigV1_1_33 {
|
|||||||
pub logging: LoggingSettings,
|
pub logging: LoggingSettings,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<ConfigV1_1_33> for ConfigV1_1_54 {
|
|
||||||
type Error = ClientError;
|
|
||||||
|
|
||||||
fn try_from(value: ConfigV1_1_33) -> Result<Self, Self::Error> {
|
|
||||||
Ok(ConfigV1_1_54 {
|
|
||||||
base: value.base.into(),
|
|
||||||
socket: value.socket.into(),
|
|
||||||
storage_paths: ClientPaths {
|
|
||||||
common_paths: value.storage_paths.common_paths.upgrade_default()?,
|
|
||||||
},
|
|
||||||
logging: value.logging,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ConfigV1_1_33 {
|
impl ConfigV1_1_33 {
|
||||||
pub fn read_from_toml_file<P: AsRef<Path>>(path: P) -> io::Result<Self> {
|
pub fn read_from_toml_file<P: AsRef<Path>>(path: P) -> io::Result<Self> {
|
||||||
read_config_from_toml_file(path)
|
read_config_from_toml_file(path)
|
||||||
@@ -58,6 +41,17 @@ impl ConfigV1_1_33 {
|
|||||||
pub fn read_from_default_path<P: AsRef<Path>>(id: P) -> io::Result<Self> {
|
pub fn read_from_default_path<P: AsRef<Path>>(id: P) -> io::Result<Self> {
|
||||||
Self::read_from_toml_file(default_config_filepath(id))
|
Self::read_from_toml_file(default_config_filepath(id))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn try_upgrade(self) -> Result<Config, ClientError> {
|
||||||
|
Ok(Config {
|
||||||
|
base: self.base.into(),
|
||||||
|
socket: self.socket.into(),
|
||||||
|
storage_paths: ClientPaths {
|
||||||
|
common_paths: self.storage_paths.common_paths.upgrade_default()?,
|
||||||
|
},
|
||||||
|
logging: self.logging,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone, Copy)]
|
#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone, Copy)]
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
use std::{io, path::Path};
|
|
||||||
|
|
||||||
use nym_bin_common::logging::LoggingSettings;
|
|
||||||
use nym_client_core::config::old_config_v1_1_54::ConfigV1_1_54 as BaseConfigV1_1_54;
|
|
||||||
use nym_config::read_config_from_toml_file;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
use crate::error::ClientError;
|
|
||||||
|
|
||||||
use super::{default_config_filepath, persistence::ClientPaths, Config, Socket};
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Serialize, Clone)]
|
|
||||||
pub struct ConfigV1_1_54 {
|
|
||||||
#[serde(flatten)]
|
|
||||||
pub base: BaseConfigV1_1_54,
|
|
||||||
|
|
||||||
pub socket: Socket,
|
|
||||||
|
|
||||||
pub storage_paths: ClientPaths,
|
|
||||||
|
|
||||||
pub logging: LoggingSettings,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ConfigV1_1_54 {
|
|
||||||
pub fn read_from_toml_file<P: AsRef<Path>>(path: P) -> io::Result<Self> {
|
|
||||||
read_config_from_toml_file(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn read_from_default_path<P: AsRef<Path>>(id: P) -> io::Result<Self> {
|
|
||||||
Self::read_from_toml_file(default_config_filepath(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn try_upgrade(self) -> Result<Config, ClientError> {
|
|
||||||
Ok(Config {
|
|
||||||
base: self.base.into(),
|
|
||||||
socket: self.socket,
|
|
||||||
storage_paths: self.storage_paths,
|
|
||||||
logging: self.logging,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -92,19 +92,15 @@ host = '{{ socket.host }}'
|
|||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
|
||||||
|
[debug.traffic]
|
||||||
|
average_packet_delay = '{{ debug.traffic.average_packet_delay }}'
|
||||||
|
message_sending_average_delay = '{{ debug.traffic.message_sending_average_delay }}'
|
||||||
|
|
||||||
[debug.acknowledgements]
|
[debug.acknowledgements]
|
||||||
average_ack_delay = '{{ debug.acknowledgements.average_ack_delay }}'
|
average_ack_delay = '{{ debug.acknowledgements.average_ack_delay }}'
|
||||||
|
|
||||||
[debug.cover_traffic]
|
[debug.cover_traffic]
|
||||||
loop_cover_traffic_average_delay = '{{ debug.cover_traffic.loop_cover_traffic_average_delay }}'
|
loop_cover_traffic_average_delay = '{{ debug.cover_traffic.loop_cover_traffic_average_delay }}'
|
||||||
|
|
||||||
[debug.stats_reporting]
|
|
||||||
enabled = {{ debug.stats_reporting.enabled }}
|
|
||||||
provider_address = '{{ debug.stats_reporting.provider_address }}'
|
|
||||||
reporting_interval = '{{ debug.stats_reporting.reporting_interval }}'
|
|
||||||
|
|
||||||
[debug.forget_me]
|
|
||||||
client = {{ debug.forget_me.client }}
|
|
||||||
stats = {{ debug.forget_me.stats }}
|
|
||||||
|
|
||||||
"#;
|
"#;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use nym_client_core::client::base_client::{
|
|||||||
BaseClientBuilder, ClientInput, ClientOutput, ClientState,
|
BaseClientBuilder, ClientInput, ClientOutput, ClientState,
|
||||||
};
|
};
|
||||||
use nym_sphinx::params::PacketType;
|
use nym_sphinx::params::PacketType;
|
||||||
use nym_task::ShutdownManager;
|
use nym_task::TaskHandle;
|
||||||
use nym_validator_client::QueryHttpRpcNyxdClient;
|
use nym_validator_client::QueryHttpRpcNyxdClient;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
@@ -20,7 +20,7 @@ pub use nym_sphinx::addressing::clients::Recipient;
|
|||||||
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|
||||||
type NativeClientBuilder = BaseClientBuilder<QueryHttpRpcNyxdClient, OnDiskPersistent>;
|
type NativeClientBuilder<'a> = BaseClientBuilder<'a, QueryHttpRpcNyxdClient, OnDiskPersistent>;
|
||||||
|
|
||||||
pub struct SocketClient {
|
pub struct SocketClient {
|
||||||
/// Client configuration options, including, among other things, packet sending rates,
|
/// Client configuration options, including, among other things, packet sending rates,
|
||||||
@@ -29,20 +29,13 @@ pub struct SocketClient {
|
|||||||
|
|
||||||
/// Optional path to a .json file containing standalone network details.
|
/// Optional path to a .json file containing standalone network details.
|
||||||
custom_mixnet: Option<PathBuf>,
|
custom_mixnet: Option<PathBuf>,
|
||||||
|
|
||||||
shutdown_manager: ShutdownManager,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SocketClient {
|
impl SocketClient {
|
||||||
pub fn config(&self) -> Config {
|
|
||||||
self.config.clone()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn new(config: Config, custom_mixnet: Option<PathBuf>) -> Self {
|
pub fn new(config: Config, custom_mixnet: Option<PathBuf>) -> Self {
|
||||||
SocketClient {
|
SocketClient {
|
||||||
config,
|
config,
|
||||||
custom_mixnet,
|
custom_mixnet,
|
||||||
shutdown_manager: Default::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +45,7 @@ impl SocketClient {
|
|||||||
client_output: ClientOutput,
|
client_output: ClientOutput,
|
||||||
client_state: ClientState,
|
client_state: ClientState,
|
||||||
self_address: &Recipient,
|
self_address: &Recipient,
|
||||||
shutdown_token: nym_task::ShutdownToken,
|
shutdown: nym_task::TaskClient,
|
||||||
packet_type: PacketType,
|
packet_type: PacketType,
|
||||||
) {
|
) {
|
||||||
info!("Starting websocket listener...");
|
info!("Starting websocket listener...");
|
||||||
@@ -80,24 +73,19 @@ impl SocketClient {
|
|||||||
shared_lane_queue_lengths,
|
shared_lane_queue_lengths,
|
||||||
reply_controller_sender,
|
reply_controller_sender,
|
||||||
Some(packet_type),
|
Some(packet_type),
|
||||||
shutdown_token.clone(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
websocket::Listener::new(
|
websocket::Listener::new(config.socket.host, config.socket.listening_port)
|
||||||
config.socket.host,
|
.start(websocket_handler, shutdown);
|
||||||
config.socket.listening_port,
|
|
||||||
shutdown_token.child_token(),
|
|
||||||
)
|
|
||||||
.start(websocket_handler);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// blocking version of `start_socket` method. Will run forever (or until SIGINT is sent)
|
/// blocking version of `start_socket` method. Will run forever (or until SIGINT is sent)
|
||||||
pub async fn run_socket_forever(self) -> Result<(), Box<dyn Error + Send + Sync>> {
|
pub async fn run_socket_forever(self) -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||||
let mut shutdown = self.start_socket().await?;
|
let shutdown = self.start_socket().await?;
|
||||||
|
|
||||||
shutdown.run_until_shutdown().await;
|
let res = shutdown.wait_for_shutdown().await;
|
||||||
log::info!("Stopping nym-client");
|
log::info!("Stopping nym-client");
|
||||||
Ok(())
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn initialise_storage(&self) -> Result<OnDiskPersistent, ClientError> {
|
async fn initialise_storage(&self) -> Result<OnDiskPersistent, ClientError> {
|
||||||
@@ -114,16 +102,12 @@ impl SocketClient {
|
|||||||
let dkg_query_client = if self.config.base.client.disabled_credentials_mode {
|
let dkg_query_client = if self.config.base.client.disabled_credentials_mode {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(default_query_dkg_client_from_config(&self.config.base)?)
|
Some(default_query_dkg_client_from_config(&self.config.base))
|
||||||
};
|
};
|
||||||
|
|
||||||
let storage = self.initialise_storage().await?;
|
let storage = self.initialise_storage().await?;
|
||||||
let user_agent = nym_bin_common::bin_info!().into();
|
|
||||||
|
|
||||||
let mut base_client =
|
let mut base_client = BaseClientBuilder::new(&self.config.base, storage, dkg_query_client);
|
||||||
BaseClientBuilder::new(self.config().base(), storage, dkg_query_client)
|
|
||||||
.with_shutdown(self.shutdown_manager.shutdown_tracker_owned())
|
|
||||||
.with_user_agent(user_agent);
|
|
||||||
|
|
||||||
if let Some(custom_mixnet) = &self.custom_mixnet {
|
if let Some(custom_mixnet) = &self.custom_mixnet {
|
||||||
base_client = base_client.with_stored_topology(custom_mixnet)?;
|
base_client = base_client.with_stored_topology(custom_mixnet)?;
|
||||||
@@ -132,7 +116,7 @@ impl SocketClient {
|
|||||||
Ok(base_client)
|
Ok(base_client)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn start_socket(self) -> Result<ShutdownManager, ClientError> {
|
pub async fn start_socket(self) -> Result<TaskHandle, ClientError> {
|
||||||
if !self.config.socket.socket_type.is_websocket() {
|
if !self.config.socket.socket_type.is_websocket() {
|
||||||
return Err(ClientError::InvalidSocketMode);
|
return Err(ClientError::InvalidSocketMode);
|
||||||
}
|
}
|
||||||
@@ -151,13 +135,13 @@ impl SocketClient {
|
|||||||
client_output,
|
client_output,
|
||||||
client_state,
|
client_state,
|
||||||
&self_address,
|
&self_address,
|
||||||
self.shutdown_manager.child_shutdown_token(),
|
started_client.task_handle.get_handle(),
|
||||||
packet_type,
|
packet_type,
|
||||||
);
|
);
|
||||||
|
|
||||||
info!("Client startup finished!");
|
info!("Client startup finished!");
|
||||||
info!("The address of this client is: {self_address}");
|
info!("The address of this client is: {self_address}");
|
||||||
|
|
||||||
Ok(self.shutdown_manager)
|
Ok(started_client.task_handle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ impl AsRef<CommonClientAddGatewayArgs> for Args {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn execute(args: Args) -> Result<(), ClientError> {
|
pub(crate) async fn execute(args: Args) -> Result<(), ClientError> {
|
||||||
let user_agent = nym_bin_common::bin_info!().into();
|
|
||||||
let output = args.output;
|
let output = args.output;
|
||||||
let res = add_gateway::<CliNativeClient, _>(args, Some(user_agent)).await?;
|
let res = add_gateway::<CliNativeClient, _>(args).await?;
|
||||||
|
|
||||||
println!("{}", output.format(&res));
|
println!("{}", output.format(&res));
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use crate::commands::CliNativeClient;
|
|
||||||
use crate::error::ClientError;
|
|
||||||
use nym_client_core::cli_helpers::client_import_coin_index_signatures::{
|
|
||||||
import_coin_index_signatures, CommonClientImportCoinIndexSignaturesArgs,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) async fn execute(
|
|
||||||
args: CommonClientImportCoinIndexSignaturesArgs,
|
|
||||||
) -> Result<(), ClientError> {
|
|
||||||
import_coin_index_signatures::<CliNativeClient, _>(args).await?;
|
|
||||||
println!("successfully imported coin index signatures!");
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use crate::commands::CliNativeClient;
|
|
||||||
use crate::error::ClientError;
|
|
||||||
use nym_client_core::cli_helpers::client_import_credential::{
|
|
||||||
import_credential, CommonClientImportTicketBookArgs,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) async fn execute(args: CommonClientImportTicketBookArgs) -> Result<(), ClientError> {
|
|
||||||
import_credential::<CliNativeClient, _>(args).await?;
|
|
||||||
println!("successfully imported credential!");
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use crate::commands::CliNativeClient;
|
|
||||||
use crate::error::ClientError;
|
|
||||||
use nym_client_core::cli_helpers::client_import_expiration_date_signatures::{
|
|
||||||
import_expiration_date_signatures, CommonClientImportExpirationDateSignaturesArgs,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) async fn execute(
|
|
||||||
args: CommonClientImportExpirationDateSignaturesArgs,
|
|
||||||
) -> Result<(), ClientError> {
|
|
||||||
import_expiration_date_signatures::<CliNativeClient, _>(args).await?;
|
|
||||||
println!("successfully imported expiration date signatures!");
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use crate::commands::CliNativeClient;
|
|
||||||
use crate::error::ClientError;
|
|
||||||
use nym_client_core::cli_helpers::client_import_master_verification_key::{
|
|
||||||
import_master_verification_key, CommonClientImportMasterVerificationKeyArgs,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) async fn execute(
|
|
||||||
args: CommonClientImportMasterVerificationKeyArgs,
|
|
||||||
) -> Result<(), ClientError> {
|
|
||||||
import_master_verification_key::<CliNativeClient, _>(args).await?;
|
|
||||||
println!("successfully imported master verification key!");
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use clap::{Args, Subcommand};
|
|
||||||
use nym_client_core::cli_helpers::client_import_coin_index_signatures::CommonClientImportCoinIndexSignaturesArgs;
|
|
||||||
use nym_client_core::cli_helpers::client_import_credential::CommonClientImportTicketBookArgs;
|
|
||||||
use nym_client_core::cli_helpers::client_import_expiration_date_signatures::CommonClientImportExpirationDateSignaturesArgs;
|
|
||||||
use nym_client_core::cli_helpers::client_import_master_verification_key::CommonClientImportMasterVerificationKeyArgs;
|
|
||||||
use std::error::Error;
|
|
||||||
|
|
||||||
pub(crate) mod import_coin_index_signatures;
|
|
||||||
pub(crate) mod import_credential;
|
|
||||||
pub(crate) mod import_expiration_date_signatures;
|
|
||||||
pub(crate) mod import_master_verification_key;
|
|
||||||
pub(crate) mod show_ticketbooks;
|
|
||||||
|
|
||||||
#[derive(Args)]
|
|
||||||
#[clap(args_conflicts_with_subcommands = true, subcommand_required = true)]
|
|
||||||
pub struct Ecash {
|
|
||||||
#[clap(subcommand)]
|
|
||||||
pub command: EcashCommands,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Ecash {
|
|
||||||
pub async fn execute(self) -> Result<(), Box<dyn Error + Send + Sync>> {
|
|
||||||
match self.command {
|
|
||||||
EcashCommands::ShowTicketBooks(args) => show_ticketbooks::execute(args).await?,
|
|
||||||
EcashCommands::ImportTicketBook(args) => import_credential::execute(args).await?,
|
|
||||||
EcashCommands::ImportCoinIndexSignatures(args) => {
|
|
||||||
import_coin_index_signatures::execute(args).await?
|
|
||||||
}
|
|
||||||
EcashCommands::ImportExpirationDateSignatures(args) => {
|
|
||||||
import_expiration_date_signatures::execute(args).await?
|
|
||||||
}
|
|
||||||
EcashCommands::ImportMasterVerificationKey(args) => {
|
|
||||||
import_master_verification_key::execute(args).await?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
|
||||||
pub enum EcashCommands {
|
|
||||||
/// Display information associated with the imported ticketbooks,
|
|
||||||
ShowTicketBooks(show_ticketbooks::Args),
|
|
||||||
|
|
||||||
/// Import a pre-generated ticketbook
|
|
||||||
ImportTicketBook(CommonClientImportTicketBookArgs),
|
|
||||||
|
|
||||||
/// Import coin index signatures needed for ticketbooks
|
|
||||||
ImportCoinIndexSignatures(CommonClientImportCoinIndexSignaturesArgs),
|
|
||||||
|
|
||||||
/// Import expiration date signatures needed for ticketbooks
|
|
||||||
ImportExpirationDateSignatures(CommonClientImportExpirationDateSignaturesArgs),
|
|
||||||
|
|
||||||
/// Import master verification key needed for ticketbooks
|
|
||||||
ImportMasterVerificationKey(CommonClientImportMasterVerificationKeyArgs),
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
use crate::commands::CliNativeClient;
|
|
||||||
use crate::error::ClientError;
|
|
||||||
use nym_bin_common::output_format::OutputFormat;
|
|
||||||
use nym_client_core::cli_helpers::client_show_ticketbooks::{
|
|
||||||
show_ticketbooks, CommonShowTicketbooksArgs,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(clap::Args)]
|
|
||||||
pub(crate) struct Args {
|
|
||||||
#[command(flatten)]
|
|
||||||
common_args: CommonShowTicketbooksArgs,
|
|
||||||
|
|
||||||
#[arg(short, long, default_value_t = OutputFormat::default())]
|
|
||||||
output: OutputFormat,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl AsRef<CommonShowTicketbooksArgs> for Args {
|
|
||||||
fn as_ref(&self) -> &CommonShowTicketbooksArgs {
|
|
||||||
&self.common_args
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) async fn execute(args: Args) -> Result<(), ClientError> {
|
|
||||||
let output = args.output;
|
|
||||||
let res = show_ticketbooks::<CliNativeClient, _>(args).await?;
|
|
||||||
|
|
||||||
println!("{}", output.format(&res));
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
use crate::commands::CliNativeClient;
|
||||||
|
use crate::error::ClientError;
|
||||||
|
use nym_client_core::cli_helpers::client_import_credential::{
|
||||||
|
import_credential, CommonClientImportCredentialArgs,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub(crate) async fn execute(args: CommonClientImportCredentialArgs) -> Result<(), ClientError> {
|
||||||
|
import_credential::<CliNativeClient, _>(args).await?;
|
||||||
|
println!("successfully imported credential!");
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
@@ -81,8 +81,6 @@ impl From<Init> for OverrideConfig {
|
|||||||
|
|
||||||
nyxd_urls: init_config.common_args.nyxd_urls,
|
nyxd_urls: init_config.common_args.nyxd_urls,
|
||||||
enabled_credentials_mode: init_config.common_args.enabled_credentials_mode,
|
enabled_credentials_mode: init_config.common_args.enabled_credentials_mode,
|
||||||
stats_reporting_address: init_config.common_args.stats_reporting_address,
|
|
||||||
forget_me: init_config.common_args.forget_me.into(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,9 +114,8 @@ impl Display for InitResults {
|
|||||||
pub(crate) async fn execute(args: Init) -> Result<(), ClientError> {
|
pub(crate) async fn execute(args: Init) -> Result<(), ClientError> {
|
||||||
eprintln!("Initialising client...");
|
eprintln!("Initialising client...");
|
||||||
|
|
||||||
let user_agent = nym_bin_common::bin_info!().into();
|
|
||||||
let output = args.output;
|
let output = args.output;
|
||||||
let res = initialise_client::<CliNativeClient>(args, Some(user_agent)).await?;
|
let res = initialise_client::<CliNativeClient>(args).await?;
|
||||||
|
|
||||||
let init_results = InitResults::new(res);
|
let init_results = InitResults::new(res);
|
||||||
println!("{}", output.format(&init_results));
|
println!("{}", output.format(&init_results));
|
||||||
|
|||||||
@@ -5,19 +5,16 @@ use crate::client::config::old_config_v1_1_13::OldConfigV1_1_13;
|
|||||||
use crate::client::config::old_config_v1_1_20::ConfigV1_1_20;
|
use crate::client::config::old_config_v1_1_20::ConfigV1_1_20;
|
||||||
use crate::client::config::old_config_v1_1_20_2::ConfigV1_1_20_2;
|
use crate::client::config::old_config_v1_1_20_2::ConfigV1_1_20_2;
|
||||||
use crate::client::config::old_config_v1_1_33::ConfigV1_1_33;
|
use crate::client::config::old_config_v1_1_33::ConfigV1_1_33;
|
||||||
use crate::client::config::old_config_v1_1_54::ConfigV1_1_54;
|
|
||||||
use crate::client::config::{BaseClientConfig, Config};
|
use crate::client::config::{BaseClientConfig, Config};
|
||||||
use crate::commands::ecash::Ecash;
|
|
||||||
use crate::error::ClientError;
|
use crate::error::ClientError;
|
||||||
use clap::CommandFactory;
|
use clap::CommandFactory;
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use nym_bin_common::bin_info;
|
use nym_bin_common::bin_info;
|
||||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||||
use nym_client::client::Recipient;
|
use nym_client_core::cli_helpers::client_import_credential::CommonClientImportCredentialArgs;
|
||||||
use nym_client_core::cli_helpers::CliClient;
|
use nym_client_core::cli_helpers::CliClient;
|
||||||
use nym_client_core::client::base_client::storage::migration_helpers::v1_1_33;
|
use nym_client_core::client::base_client::storage::migration_helpers::v1_1_33;
|
||||||
use nym_client_core::config::ForgetMe;
|
|
||||||
use nym_config::OptionalSet;
|
use nym_config::OptionalSet;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
@@ -25,7 +22,7 @@ use std::sync::OnceLock;
|
|||||||
|
|
||||||
mod add_gateway;
|
mod add_gateway;
|
||||||
pub(crate) mod build_info;
|
pub(crate) mod build_info;
|
||||||
pub(crate) mod ecash;
|
pub(crate) mod import_credential;
|
||||||
pub(crate) mod init;
|
pub(crate) mod init;
|
||||||
mod list_gateways;
|
mod list_gateways;
|
||||||
pub(crate) mod run;
|
pub(crate) mod run;
|
||||||
@@ -75,8 +72,8 @@ pub(crate) enum Commands {
|
|||||||
/// Run the Nym client with provided configuration client optionally overriding set parameters
|
/// Run the Nym client with provided configuration client optionally overriding set parameters
|
||||||
Run(run::Run),
|
Run(run::Run),
|
||||||
|
|
||||||
/// Ecash-related functionalities
|
/// Import a pre-generated credential
|
||||||
Ecash(Ecash),
|
ImportCredential(CommonClientImportCredentialArgs),
|
||||||
|
|
||||||
/// List all registered with gateways
|
/// List all registered with gateways
|
||||||
ListGateways(list_gateways::Args),
|
ListGateways(list_gateways::Args),
|
||||||
@@ -107,8 +104,6 @@ pub(crate) struct OverrideConfig {
|
|||||||
no_cover: bool,
|
no_cover: bool,
|
||||||
nyxd_urls: Option<Vec<url::Url>>,
|
nyxd_urls: Option<Vec<url::Url>>,
|
||||||
enabled_credentials_mode: Option<bool>,
|
enabled_credentials_mode: Option<bool>,
|
||||||
stats_reporting_address: Option<Recipient>,
|
|
||||||
forget_me: ForgetMe,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
|
pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||||
@@ -117,7 +112,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync
|
|||||||
match args.command {
|
match args.command {
|
||||||
Commands::Init(m) => init::execute(m).await?,
|
Commands::Init(m) => init::execute(m).await?,
|
||||||
Commands::Run(m) => run::execute(m).await?,
|
Commands::Run(m) => run::execute(m).await?,
|
||||||
Commands::Ecash(ecash) => ecash.execute().await?,
|
Commands::ImportCredential(m) => import_credential::execute(m).await?,
|
||||||
Commands::ListGateways(args) => list_gateways::execute(args).await?,
|
Commands::ListGateways(args) => list_gateways::execute(args).await?,
|
||||||
Commands::AddGateway(args) => add_gateway::execute(args).await?,
|
Commands::AddGateway(args) => add_gateway::execute(args).await?,
|
||||||
Commands::SwitchGateway(args) => switch_gateway::execute(args).await?,
|
Commands::SwitchGateway(args) => switch_gateway::execute(args).await?,
|
||||||
@@ -136,7 +131,6 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
|||||||
args.fastmode,
|
args.fastmode,
|
||||||
)
|
)
|
||||||
.with_base(BaseClientConfig::with_disabled_cover_traffic, args.no_cover)
|
.with_base(BaseClientConfig::with_disabled_cover_traffic, args.no_cover)
|
||||||
.with_base(BaseClientConfig::with_forget_me, args.forget_me)
|
|
||||||
.with_optional(Config::with_port, args.port)
|
.with_optional(Config::with_port, args.port)
|
||||||
.with_optional(Config::with_host, args.host)
|
.with_optional(Config::with_host, args.host)
|
||||||
.with_optional_custom_env_ext(
|
.with_optional_custom_env_ext(
|
||||||
@@ -155,11 +149,6 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
|||||||
BaseClientConfig::with_disabled_credentials,
|
BaseClientConfig::with_disabled_credentials,
|
||||||
args.enabled_credentials_mode.map(|b| !b),
|
args.enabled_credentials_mode.map(|b| !b),
|
||||||
)
|
)
|
||||||
.with_optional_env_ext(
|
|
||||||
BaseClientConfig::with_enabled_stats_reporting_address,
|
|
||||||
args.stats_reporting_address,
|
|
||||||
nym_network_defaults::var_names::CLIENT_STATS_COLLECTION_PROVIDER,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn try_upgrade_v1_1_13_config(id: &str) -> Result<bool, ClientError> {
|
async fn try_upgrade_v1_1_13_config(id: &str) -> Result<bool, ClientError> {
|
||||||
@@ -178,8 +167,7 @@ async fn try_upgrade_v1_1_13_config(id: &str) -> Result<bool, ClientError> {
|
|||||||
let updated_step2: ConfigV1_1_20_2 = updated_step1.into();
|
let updated_step2: ConfigV1_1_20_2 = updated_step1.into();
|
||||||
let (updated_step3, gateway_config) = updated_step2.upgrade()?;
|
let (updated_step3, gateway_config) = updated_step2.upgrade()?;
|
||||||
let old_paths = updated_step3.storage_paths.clone();
|
let old_paths = updated_step3.storage_paths.clone();
|
||||||
let updated_step4: ConfigV1_1_54 = updated_step3.try_into()?;
|
let updated = updated_step3.try_upgrade()?;
|
||||||
let updated = updated_step4.try_upgrade()?;
|
|
||||||
|
|
||||||
v1_1_33::migrate_gateway_details(
|
v1_1_33::migrate_gateway_details(
|
||||||
&old_paths.common_paths,
|
&old_paths.common_paths,
|
||||||
@@ -207,8 +195,7 @@ async fn try_upgrade_v1_1_20_config(id: &str) -> Result<bool, ClientError> {
|
|||||||
let updated_step1: ConfigV1_1_20_2 = old_config.into();
|
let updated_step1: ConfigV1_1_20_2 = old_config.into();
|
||||||
let (updated_step2, gateway_config) = updated_step1.upgrade()?;
|
let (updated_step2, gateway_config) = updated_step1.upgrade()?;
|
||||||
let old_paths = updated_step2.storage_paths.clone();
|
let old_paths = updated_step2.storage_paths.clone();
|
||||||
let updated_step3: ConfigV1_1_54 = updated_step2.try_into()?;
|
let updated = updated_step2.try_upgrade()?;
|
||||||
let updated = updated_step3.try_upgrade()?;
|
|
||||||
|
|
||||||
v1_1_33::migrate_gateway_details(
|
v1_1_33::migrate_gateway_details(
|
||||||
&old_paths.common_paths,
|
&old_paths.common_paths,
|
||||||
@@ -232,8 +219,7 @@ async fn try_upgrade_v1_1_20_2_config(id: &str) -> Result<bool, ClientError> {
|
|||||||
|
|
||||||
let (updated_step1, gateway_config) = old_config.upgrade()?;
|
let (updated_step1, gateway_config) = old_config.upgrade()?;
|
||||||
let old_paths = updated_step1.storage_paths.clone();
|
let old_paths = updated_step1.storage_paths.clone();
|
||||||
let updated_step2: ConfigV1_1_54 = updated_step1.try_into()?;
|
let updated = updated_step1.try_upgrade()?;
|
||||||
let updated = updated_step2.try_upgrade()?;
|
|
||||||
|
|
||||||
v1_1_33::migrate_gateway_details(
|
v1_1_33::migrate_gateway_details(
|
||||||
&old_paths.common_paths,
|
&old_paths.common_paths,
|
||||||
@@ -256,8 +242,7 @@ async fn try_upgrade_v1_1_33_config(id: &str) -> Result<bool, ClientError> {
|
|||||||
info!("It is going to get updated to the current specification.");
|
info!("It is going to get updated to the current specification.");
|
||||||
|
|
||||||
let old_paths = old_config.storage_paths.clone();
|
let old_paths = old_config.storage_paths.clone();
|
||||||
let updated_step1: ConfigV1_1_54 = old_config.try_into()?;
|
let updated = old_config.try_upgrade()?;
|
||||||
let updated = updated_step1.try_upgrade()?;
|
|
||||||
|
|
||||||
v1_1_33::migrate_gateway_details(
|
v1_1_33::migrate_gateway_details(
|
||||||
&old_paths.common_paths,
|
&old_paths.common_paths,
|
||||||
@@ -270,22 +255,6 @@ async fn try_upgrade_v1_1_33_config(id: &str) -> Result<bool, ClientError> {
|
|||||||
Ok(true)
|
Ok(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn try_upgrade_v1_1_54_config(id: &str) -> Result<bool, ClientError> {
|
|
||||||
// explicitly load it as v1.1.54 (which is incompatible with the current one, i.e. +1.1.55)
|
|
||||||
let Ok(old_config) = ConfigV1_1_54::read_from_default_path(id) else {
|
|
||||||
// if we failed to load it, there might have been nothing to upgrade
|
|
||||||
// or maybe it was an even older file. in either way. just ignore it and carry on with our day
|
|
||||||
return Ok(false);
|
|
||||||
};
|
|
||||||
info!("It seems the client is using <= v1.1.54 config template.");
|
|
||||||
info!("It is going to get updated to the current specification.");
|
|
||||||
|
|
||||||
let updated = old_config.try_upgrade()?;
|
|
||||||
|
|
||||||
updated.save_to_default_location()?;
|
|
||||||
Ok(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn try_upgrade_config(id: &str) -> Result<(), ClientError> {
|
async fn try_upgrade_config(id: &str) -> Result<(), ClientError> {
|
||||||
if try_upgrade_v1_1_13_config(id).await? {
|
if try_upgrade_v1_1_13_config(id).await? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
@@ -299,9 +268,6 @@ async fn try_upgrade_config(id: &str) -> Result<(), ClientError> {
|
|||||||
if try_upgrade_v1_1_33_config(id).await? {
|
if try_upgrade_v1_1_33_config(id).await? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
if try_upgrade_v1_1_54_config(id).await? {
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,13 @@
|
|||||||
|
|
||||||
use crate::commands::try_load_current_config;
|
use crate::commands::try_load_current_config;
|
||||||
use crate::{
|
use crate::{
|
||||||
client::SocketClient,
|
client::{config::Config, SocketClient},
|
||||||
commands::{override_config, OverrideConfig},
|
commands::{override_config, OverrideConfig},
|
||||||
|
error::ClientError,
|
||||||
};
|
};
|
||||||
use clap::Args;
|
use clap::Args;
|
||||||
|
use log::*;
|
||||||
|
use nym_bin_common::version_checker::is_minor_version_compatible;
|
||||||
use nym_client_core::cli_helpers::client_run::CommonClientRunArgs;
|
use nym_client_core::cli_helpers::client_run::CommonClientRunArgs;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
@@ -40,8 +43,25 @@ impl From<Run> for OverrideConfig {
|
|||||||
no_cover: run_config.common_args.no_cover,
|
no_cover: run_config.common_args.no_cover,
|
||||||
nyxd_urls: run_config.common_args.nyxd_urls,
|
nyxd_urls: run_config.common_args.nyxd_urls,
|
||||||
enabled_credentials_mode: run_config.common_args.enabled_credentials_mode,
|
enabled_credentials_mode: run_config.common_args.enabled_credentials_mode,
|
||||||
stats_reporting_address: run_config.common_args.stats_reporting_address,
|
}
|
||||||
forget_me: run_config.common_args.forget_me.into(),
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// this only checks compatibility between config the binary. It does not take into consideration
|
||||||
|
// network version. It might do so in the future.
|
||||||
|
fn version_check(cfg: &Config) -> bool {
|
||||||
|
let binary_version = env!("CARGO_PKG_VERSION");
|
||||||
|
let config_version = &cfg.base.client.version;
|
||||||
|
if binary_version == config_version {
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
warn!("The native-client binary has different version than what is specified in config file! {} and {}", binary_version, config_version);
|
||||||
|
if is_minor_version_compatible(binary_version, config_version) {
|
||||||
|
info!("but they are still semver compatible. However, consider running the `upgrade` command");
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
error!("and they are semver incompatible! - please run the `upgrade` command before attempting `run` again");
|
||||||
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,6 +72,11 @@ pub(crate) async fn execute(args: Run) -> Result<(), Box<dyn Error + Send + Sync
|
|||||||
let mut config = try_load_current_config(&args.common_args.id).await?;
|
let mut config = try_load_current_config(&args.common_args.id).await?;
|
||||||
config = override_config(config, OverrideConfig::from(args.clone()));
|
config = override_config(config, OverrideConfig::from(args.clone()));
|
||||||
|
|
||||||
|
if !version_check(&config) {
|
||||||
|
error!("failed the local version check");
|
||||||
|
return Err(Box::new(ClientError::FailedLocalVersionCheck));
|
||||||
|
}
|
||||||
|
|
||||||
SocketClient::new(config, args.common_args.custom_mixnet)
|
SocketClient::new(config, args.common_args.custom_mixnet)
|
||||||
.run_socket_forever()
|
.run_socket_forever()
|
||||||
.await
|
.await
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ pub enum ClientError {
|
|||||||
#[error("Failed to validate the loaded config")]
|
#[error("Failed to validate the loaded config")]
|
||||||
ConfigValidationFailure,
|
ConfigValidationFailure,
|
||||||
|
|
||||||
|
#[error("Failed local version check, client and config mismatch")]
|
||||||
|
FailedLocalVersionCheck,
|
||||||
|
|
||||||
#[error("Attempted to start the client in invalid socket mode")]
|
#[error("Attempted to start the client in invalid socket mode")]
|
||||||
InvalidSocketMode,
|
InvalidSocketMode,
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
|
||||||
use clap::{crate_name, crate_version, Parser};
|
use clap::{crate_name, crate_version, Parser};
|
||||||
use nym_bin_common::logging::{maybe_print_banner, setup_tracing_logger};
|
use nym_bin_common::logging::{maybe_print_banner, setup_logging};
|
||||||
use nym_network_defaults::setup_env;
|
use nym_network_defaults::setup_env;
|
||||||
|
|
||||||
pub mod client;
|
pub mod client;
|
||||||
@@ -20,7 +20,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
|||||||
if !args.no_banner {
|
if !args.no_banner {
|
||||||
maybe_print_banner(crate_name!(), crate_version!());
|
maybe_print_banner(crate_name!(), crate_version!());
|
||||||
}
|
}
|
||||||
setup_tracing_logger();
|
setup_logging();
|
||||||
|
|
||||||
if let Err(err) = commands::execute(args).await {
|
if let Err(err) = commands::execute(args).await {
|
||||||
log::error!("{err}");
|
log::error!("{err}");
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ use nym_sphinx::receiver::ReconstructedMessage;
|
|||||||
use nym_task::connections::{
|
use nym_task::connections::{
|
||||||
ConnectionCommand, ConnectionCommandSender, ConnectionId, LaneQueueLengths, TransmissionLane,
|
ConnectionCommand, ConnectionCommandSender, ConnectionId, LaneQueueLengths, TransmissionLane,
|
||||||
};
|
};
|
||||||
use nym_task::ShutdownToken;
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio::time::Instant;
|
use tokio::time::Instant;
|
||||||
@@ -44,11 +43,9 @@ pub(crate) struct HandlerBuilder {
|
|||||||
lane_queue_lengths: LaneQueueLengths,
|
lane_queue_lengths: LaneQueueLengths,
|
||||||
reply_controller_sender: ReplyControllerSender,
|
reply_controller_sender: ReplyControllerSender,
|
||||||
packet_type: Option<PacketType>,
|
packet_type: Option<PacketType>,
|
||||||
shutdown_token: ShutdownToken,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HandlerBuilder {
|
impl HandlerBuilder {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
msg_input: InputMessageSender,
|
msg_input: InputMessageSender,
|
||||||
client_connection_tx: ConnectionCommandSender,
|
client_connection_tx: ConnectionCommandSender,
|
||||||
@@ -57,7 +54,6 @@ impl HandlerBuilder {
|
|||||||
lane_queue_lengths: LaneQueueLengths,
|
lane_queue_lengths: LaneQueueLengths,
|
||||||
reply_controller_sender: ReplyControllerSender,
|
reply_controller_sender: ReplyControllerSender,
|
||||||
packet_type: Option<PacketType>,
|
packet_type: Option<PacketType>,
|
||||||
shutdown_token: ShutdownToken,
|
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
msg_input,
|
msg_input,
|
||||||
@@ -67,13 +63,11 @@ impl HandlerBuilder {
|
|||||||
lane_queue_lengths,
|
lane_queue_lengths,
|
||||||
reply_controller_sender,
|
reply_controller_sender,
|
||||||
packet_type,
|
packet_type,
|
||||||
shutdown_token,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: make sure we only ever have one active handler
|
// TODO: make sure we only ever have one active handler
|
||||||
pub fn create_active_handler(&self) -> Handler {
|
pub fn create_active_handler(&self) -> Handler {
|
||||||
let shutdown_token = self.shutdown_token.clone();
|
|
||||||
Handler {
|
Handler {
|
||||||
msg_input: self.msg_input.clone(),
|
msg_input: self.msg_input.clone(),
|
||||||
client_connection_tx: self.client_connection_tx.clone(),
|
client_connection_tx: self.client_connection_tx.clone(),
|
||||||
@@ -84,7 +78,6 @@ impl HandlerBuilder {
|
|||||||
lane_queue_lengths: self.lane_queue_lengths.clone(),
|
lane_queue_lengths: self.lane_queue_lengths.clone(),
|
||||||
reply_controller_sender: self.reply_controller_sender.clone(),
|
reply_controller_sender: self.reply_controller_sender.clone(),
|
||||||
packet_type: self.packet_type,
|
packet_type: self.packet_type,
|
||||||
shutdown_token,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,14 +92,17 @@ pub(crate) struct Handler {
|
|||||||
lane_queue_lengths: LaneQueueLengths,
|
lane_queue_lengths: LaneQueueLengths,
|
||||||
reply_controller_sender: ReplyControllerSender,
|
reply_controller_sender: ReplyControllerSender,
|
||||||
packet_type: Option<PacketType>,
|
packet_type: Option<PacketType>,
|
||||||
shutdown_token: ShutdownToken,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for Handler {
|
impl Drop for Handler {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
let _ = self
|
if self
|
||||||
.buffer_requester
|
.buffer_requester
|
||||||
.unbounded_send(ReceivedBufferMessage::ReceiverDisconnect);
|
.unbounded_send(ReceivedBufferMessage::ReceiverDisconnect)
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
|
error!("we failed to disconnect the receiver from the buffer! presumably the shutdown procedure has been initiated!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,23 +125,10 @@ impl Handler {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// get the number of pending replies waiting for reply surbs
|
// get the number of pending replies waiting for reply surbs
|
||||||
let reply_queue_length = match self
|
let reply_queue_length = self
|
||||||
.reply_controller_sender
|
.reply_controller_sender
|
||||||
.get_lane_queue_length(connection_id)
|
.get_lane_queue_length(connection_id)
|
||||||
.await
|
.await;
|
||||||
{
|
|
||||||
Ok(length) => length,
|
|
||||||
Err(err) => {
|
|
||||||
if !self.shutdown_token.is_cancelled() {
|
|
||||||
error!(
|
|
||||||
"Failed to get reply queue length for connection {connection_id}: {err}"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// We're just going to assume that the queue is empty, and I think that's okay
|
|
||||||
// during shutdown.
|
|
||||||
0
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let queue_length = base_length + reply_queue_length;
|
let queue_length = base_length + reply_queue_length;
|
||||||
|
|
||||||
@@ -185,11 +168,10 @@ impl Handler {
|
|||||||
|
|
||||||
// the ack control is now responsible for chunking, etc.
|
// the ack control is now responsible for chunking, etc.
|
||||||
let input_msg = InputMessage::new_regular(recipient, message, lane, self.packet_type);
|
let input_msg = InputMessage::new_regular(recipient, message, lane, self.packet_type);
|
||||||
if let Err(err) = self.msg_input.send(input_msg).await {
|
self.msg_input
|
||||||
if !self.shutdown_token.is_cancelled() {
|
.send(input_msg)
|
||||||
error!("Failed to send message to the input buffer: {err}");
|
.await
|
||||||
}
|
.expect("InputMessageReceiver has stopped receiving!");
|
||||||
}
|
|
||||||
|
|
||||||
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
||||||
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
||||||
@@ -218,11 +200,10 @@ impl Handler {
|
|||||||
|
|
||||||
let input_msg =
|
let input_msg =
|
||||||
InputMessage::new_anonymous(recipient, message, reply_surbs, lane, self.packet_type);
|
InputMessage::new_anonymous(recipient, message, reply_surbs, lane, self.packet_type);
|
||||||
if let Err(err) = self.msg_input.send(input_msg).await {
|
self.msg_input
|
||||||
if !self.shutdown_token.is_cancelled() {
|
.send(input_msg)
|
||||||
error!("Failed to send anonymous message to the input buffer: {err}");
|
.await
|
||||||
}
|
.expect("InputMessageReceiver has stopped receiving!");
|
||||||
}
|
|
||||||
|
|
||||||
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
||||||
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
||||||
@@ -246,11 +227,10 @@ impl Handler {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let input_msg = InputMessage::new_reply(recipient_tag, message, lane, self.packet_type);
|
let input_msg = InputMessage::new_reply(recipient_tag, message, lane, self.packet_type);
|
||||||
if let Err(err) = self.msg_input.send(input_msg).await {
|
self.msg_input
|
||||||
if !self.shutdown_token.is_cancelled() {
|
.send(input_msg)
|
||||||
error!("Failed to send reply message to the input buffer: {err}");
|
.await
|
||||||
}
|
.expect("InputMessageReceiver has stopped receiving!");
|
||||||
}
|
|
||||||
|
|
||||||
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
// Only reply back with a `LaneQueueLength` if the sender providided a connection id
|
||||||
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
let TransmissionLane::ConnectionId(connection_id) = lane else {
|
||||||
@@ -265,14 +245,9 @@ impl Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn handle_closed_connection(&self, connection_id: u64) -> Option<ServerResponse> {
|
fn handle_closed_connection(&self, connection_id: u64) -> Option<ServerResponse> {
|
||||||
if let Err(err) = self
|
self.client_connection_tx
|
||||||
.client_connection_tx
|
|
||||||
.unbounded_send(ConnectionCommand::Close(connection_id))
|
.unbounded_send(ConnectionCommand::Close(connection_id))
|
||||||
{
|
.unwrap();
|
||||||
if !self.shutdown_token.is_cancelled() {
|
|
||||||
error!("Failed to send close connection command: {err}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +287,7 @@ impl Handler {
|
|||||||
|
|
||||||
async fn handle_text_message(&mut self, msg: String) -> Option<WsMessage> {
|
async fn handle_text_message(&mut self, msg: String) -> Option<WsMessage> {
|
||||||
debug!("Handling text message request");
|
debug!("Handling text message request");
|
||||||
trace!("Content: {msg:?}");
|
trace!("Content: {:?}", msg);
|
||||||
|
|
||||||
self.received_response_type = ReceivedResponseType::Text;
|
self.received_response_type = ReceivedResponseType::Text;
|
||||||
let client_request = ClientRequest::try_from_text(msg);
|
let client_request = ClientRequest::try_from_text(msg);
|
||||||
@@ -387,15 +362,13 @@ impl Handler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn listen_for_requests(&mut self, mut msg_receiver: ReconstructedMessagesReceiver) {
|
async fn listen_for_requests(
|
||||||
let shutdown_token = self.shutdown_token.clone();
|
&mut self,
|
||||||
|
mut msg_receiver: ReconstructedMessagesReceiver,
|
||||||
loop {
|
mut task_client: nym_task::TaskClient,
|
||||||
|
) {
|
||||||
|
while !task_client.is_shutdown() {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = shutdown_token.cancelled() => {
|
|
||||||
log::trace!("Websocket handler: Received shutdown");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// we can either get a client request from the websocket
|
// we can either get a client request from the websocket
|
||||||
socket_msg = self.next_websocket_request() => {
|
socket_msg = self.next_websocket_request() => {
|
||||||
if socket_msg.is_none() {
|
if socket_msg.is_none() {
|
||||||
@@ -433,13 +406,24 @@ impl Handler {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_ = task_client.recv() => {
|
||||||
|
log::trace!("Websocket handler: Received shutdown");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log::debug!("Websocket handler: Exiting");
|
log::debug!("Websocket handler: Exiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
// consume self to make sure `drop` is called after this is done
|
// consume self to make sure `drop` is called after this is done
|
||||||
pub(crate) async fn handle_connection(mut self, socket: TcpStream) {
|
pub(crate) async fn handle_connection(
|
||||||
|
mut self,
|
||||||
|
socket: TcpStream,
|
||||||
|
mut task_client: nym_task::TaskClient,
|
||||||
|
) {
|
||||||
|
// We don't want a crash in the connection handler to trigger a shutdown of the whole
|
||||||
|
// process.
|
||||||
|
task_client.mark_as_success();
|
||||||
|
|
||||||
let ws_stream = match accept_async(socket).await {
|
let ws_stream = match accept_async(socket).await {
|
||||||
Ok(ws_stream) => ws_stream,
|
Ok(ws_stream) => ws_stream,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -452,18 +436,14 @@ impl Handler {
|
|||||||
let (reconstructed_sender, reconstructed_receiver) = mpsc::unbounded();
|
let (reconstructed_sender, reconstructed_receiver) = mpsc::unbounded();
|
||||||
|
|
||||||
// tell the buffer to start sending stuff to us
|
// tell the buffer to start sending stuff to us
|
||||||
if let Err(err) =
|
self.buffer_requester
|
||||||
self.buffer_requester
|
.unbounded_send(ReceivedBufferMessage::ReceiverAnnounce(
|
||||||
.unbounded_send(ReceivedBufferMessage::ReceiverAnnounce(
|
reconstructed_sender,
|
||||||
reconstructed_sender,
|
))
|
||||||
))
|
.expect("the buffer request failed!");
|
||||||
{
|
|
||||||
if !self.shutdown_token.is_cancelled() {
|
|
||||||
error!("failed to announce the receiver to the buffer: {err}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.listen_for_requests(reconstructed_receiver).await;
|
self.listen_for_requests(reconstructed_receiver, task_client)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
use super::handler::HandlerBuilder;
|
use super::handler::HandlerBuilder;
|
||||||
use log::*;
|
use log::*;
|
||||||
use nym_task::ShutdownToken;
|
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
use std::{net::SocketAddr, process, sync::Arc};
|
use std::{net::SocketAddr, process, sync::Arc};
|
||||||
use tokio::io::AsyncWriteExt;
|
use tokio::io::AsyncWriteExt;
|
||||||
@@ -23,19 +22,21 @@ impl State {
|
|||||||
pub(crate) struct Listener {
|
pub(crate) struct Listener {
|
||||||
address: SocketAddr,
|
address: SocketAddr,
|
||||||
state: State,
|
state: State,
|
||||||
shutdown_token: ShutdownToken,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Listener {
|
impl Listener {
|
||||||
pub(crate) fn new(host: IpAddr, port: u16, shutdown_token: ShutdownToken) -> Self {
|
pub(crate) fn new(host: IpAddr, port: u16) -> Self {
|
||||||
Listener {
|
Listener {
|
||||||
address: SocketAddr::new(host, port),
|
address: SocketAddr::new(host, port),
|
||||||
state: State::AwaitingConnection,
|
state: State::AwaitingConnection,
|
||||||
shutdown_token,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn run(&mut self, handler: HandlerBuilder) {
|
pub(crate) async fn run(
|
||||||
|
&mut self,
|
||||||
|
handler: HandlerBuilder,
|
||||||
|
mut task_client: nym_task::TaskClient,
|
||||||
|
) {
|
||||||
let tcp_listener = match tokio::net::TcpListener::bind(self.address).await {
|
let tcp_listener = match tokio::net::TcpListener::bind(self.address).await {
|
||||||
Ok(listener) => listener,
|
Ok(listener) => listener,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -46,11 +47,11 @@ impl Listener {
|
|||||||
|
|
||||||
let notify = Arc::new(Notify::new());
|
let notify = Arc::new(Notify::new());
|
||||||
|
|
||||||
while !self.shutdown_token.is_cancelled() {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
// When the handler finishes we check if shutdown is signalled
|
// When the handler finishes we check if shutdown is signalled
|
||||||
_ = notify.notified() => {
|
_ = notify.notified() => {
|
||||||
if self.shutdown_token.is_cancelled() {
|
if task_client.is_shutdown() {
|
||||||
log::trace!("Websocket listener: detected shutdown after connection closed");
|
log::trace!("Websocket listener: detected shutdown after connection closed");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -59,7 +60,7 @@ impl Listener {
|
|||||||
}
|
}
|
||||||
// ... but when there is no connected client at the time of shutdown being
|
// ... but when there is no connected client at the time of shutdown being
|
||||||
// signalled, we handle it here.
|
// signalled, we handle it here.
|
||||||
_ = self.shutdown_token.cancelled() => {
|
_ = task_client.recv() => {
|
||||||
if !self.state.is_connected() {
|
if !self.state.is_connected() {
|
||||||
log::trace!("Not connected: shutting down");
|
log::trace!("Not connected: shutting down");
|
||||||
break;
|
break;
|
||||||
@@ -68,9 +69,9 @@ impl Listener {
|
|||||||
new_conn = tcp_listener.accept() => {
|
new_conn = tcp_listener.accept() => {
|
||||||
match new_conn {
|
match new_conn {
|
||||||
Ok((mut socket, remote_addr)) => {
|
Ok((mut socket, remote_addr)) => {
|
||||||
debug!("Received connection from {remote_addr:?}");
|
debug!("Received connection from {:?}", remote_addr);
|
||||||
if self.state.is_connected() {
|
if self.state.is_connected() {
|
||||||
warn!("Tried to open a duplicate websocket connection. The request came from {remote_addr}");
|
warn!("Tried to open a duplicate websocket connection. The request came from {}", remote_addr);
|
||||||
// if we've already got a connection, don't allow another one
|
// if we've already got a connection, don't allow another one
|
||||||
// while we only ever want to accept a single connection, we don't want
|
// while we only ever want to accept a single connection, we don't want
|
||||||
// to leave clients hanging (and also allow for reconnection if it somehow
|
// to leave clients hanging (and also allow for reconnection if it somehow
|
||||||
@@ -87,8 +88,9 @@ impl Listener {
|
|||||||
// hanging because the executor doesn't come back here
|
// hanging because the executor doesn't come back here
|
||||||
let notify_clone = Arc::clone(¬ify);
|
let notify_clone = Arc::clone(¬ify);
|
||||||
let fresh_handler = handler.create_active_handler();
|
let fresh_handler = handler.create_active_handler();
|
||||||
|
let task_client_handler = task_client.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
fresh_handler.handle_connection(socket).await;
|
fresh_handler.handle_connection(socket, task_client_handler).await;
|
||||||
notify_clone.notify_one();
|
notify_clone.notify_one();
|
||||||
});
|
});
|
||||||
self.state = State::Connected;
|
self.state = State::Connected;
|
||||||
@@ -102,9 +104,13 @@ impl Listener {
|
|||||||
log::debug!("Websocket listener: Exiting");
|
log::debug!("Websocket listener: Exiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn start(mut self, handler: HandlerBuilder) -> JoinHandle<()> {
|
pub(crate) fn start(
|
||||||
|
mut self,
|
||||||
|
handler: HandlerBuilder,
|
||||||
|
shutdown: nym_task::TaskClient,
|
||||||
|
) -> JoinHandle<()> {
|
||||||
info!("Running websocket on {:?}", self.address.to_string());
|
info!("Running websocket on {:?}", self.address.to_string());
|
||||||
|
|
||||||
tokio::spawn(async move { self.run(handler).await })
|
tokio::spawn(async move { self.run(handler, shutdown).await })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-26
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nym-socks5-client"
|
name = "nym-socks5-client"
|
||||||
version = "1.1.62"
|
version = "1.1.34"
|
||||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
||||||
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
|
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -11,45 +11,31 @@ license.workspace = true
|
|||||||
bs58 = { workspace = true }
|
bs58 = { workspace = true }
|
||||||
clap = { workspace = true, features = ["cargo", "derive"] }
|
clap = { workspace = true, features = ["cargo", "derive"] }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
serde = { workspace = true, features = [
|
serde = { workspace = true, features = ["derive"] } # for config serialization/deserialization
|
||||||
"derive",
|
|
||||||
] } # for config serialization/deserialization
|
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tap = { workspace = true }
|
tap = "1.0.1"
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "net", "signal"] }
|
tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] }
|
||||||
rand = { workspace = true }
|
rand = "0.7.3"
|
||||||
time = { workspace = true }
|
time = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
zeroize = { workspace = true }
|
zeroize = { workspace = true }
|
||||||
|
|
||||||
# internal
|
# internal
|
||||||
nym-bin-common = { path = "../../common/bin-common", features = [
|
nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] }
|
||||||
"output_format",
|
nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage", "fs-gateways-storage", "cli"] }
|
||||||
"clap",
|
|
||||||
"basic_tracing",
|
|
||||||
] }
|
|
||||||
nym-client-core = { path = "../../common/client-core", features = [
|
|
||||||
"fs-credentials-storage",
|
|
||||||
"fs-surb-storage",
|
|
||||||
"fs-gateways-storage",
|
|
||||||
"cli",
|
|
||||||
] }
|
|
||||||
nym-config = { path = "../../common/config" }
|
nym-config = { path = "../../common/config" }
|
||||||
nym-credential-storage = { path = "../../common/credential-storage" }
|
|
||||||
nym-credentials = { path = "../../common/credentials" }
|
nym-credentials = { path = "../../common/credentials" }
|
||||||
nym-crypto = { path = "../../common/crypto" }
|
nym-crypto = { path = "../../common/crypto" }
|
||||||
nym-gateway-requests = { path = "../../common/gateway-requests" }
|
nym-gateway-requests = { path = "../../gateway/gateway-requests" }
|
||||||
nym-id = { path = "../../common/nym-id" }
|
nym-credential-storage = { path = "../../common/credential-storage" }
|
||||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||||
|
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||||
nym-ordered-buffer = { path = "../../common/socks5/ordered-buffer" }
|
nym-ordered-buffer = { path = "../../common/socks5/ordered-buffer" }
|
||||||
nym-pemstore = { path = "../../common/pemstore" }
|
nym-pemstore = { path = "../../common/pemstore" }
|
||||||
nym-socks5-client-core = { path = "../../common/socks5-client-core" }
|
|
||||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
|
||||||
nym-topology = { path = "../../common/topology" }
|
nym-topology = { path = "../../common/topology" }
|
||||||
nym-validator-client = { path = "../../common/client-libs/validator-client", features = [
|
nym-socks5-client-core = { path = "../../common/socks5-client-core" }
|
||||||
"http-client",
|
nym-id = { path = "../../common/nym-id" }
|
||||||
] }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ impl AsRef<CommonClientAddGatewayArgs> for Args {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn execute(args: Args) -> Result<(), Socks5ClientError> {
|
pub(crate) async fn execute(args: Args) -> Result<(), Socks5ClientError> {
|
||||||
let user_agent = nym_bin_common::bin_info!().into();
|
|
||||||
let output = args.output;
|
let output = args.output;
|
||||||
let res = add_gateway::<CliSocks5Client, _>(args, Some(user_agent)).await?;
|
let res = add_gateway::<CliSocks5Client, _>(args).await?;
|
||||||
|
|
||||||
println!("{}", output.format(&res));
|
println!("{}", output.format(&res));
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user