Skip to content

Commit ec992f1

Browse files
committed
Merge
2 parents 346a5b8 + cfa4b55 commit ec992f1

File tree

95 files changed

+576
-3301
lines changed

Some content is hidden

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

95 files changed

+576
-3301
lines changed

.github/workflows/cache.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,13 @@ jobs:
9696
- name: Cleanup npm caches
9797
if: always()
9898
run: |
99-
set -euxo pipefail # stop on errors, print commands, fail on pipe fails
100-
10199
# remove all but the latest cache, leaving only the cache we just saved
102-
set +e; gh extension install actions/gh-actions-cache; set -e
103100
echo "Fetching list of cache key"
104-
cacheKeys=$(gh actions-cache list --sort created-at --order desc --limit 100 -R "${{ github.repository }}" --key "npm-${{ runner.os }}-${{ runner.arch }}-" | cut -f 1 | tail -n +3)
101+
cacheKeys=$(gh cache list --sort created_at --order desc --limit 100 -R "${{ github.repository }}" --key "npm-${{ runner.os }}-${{ runner.arch }}-" | cut -f 1 | tail -n +3)
105102
echo caches to be removed:
106103
echo "${cacheKeys}"
107104
set +e
108105
for cacheKey in $cacheKeys
109106
do
110-
gh actions-cache delete "$cacheKey" -R "${{ github.repository }}" --confirm
107+
gh cache delete "$cacheKey" -R "${{ github.repository }}"
111108
done

demos/client-example-server/src/controllers/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { blake2b } from "@noble/hashes/blake2b";
1616
import { u8aToHex } from "@polkadot/util";
1717
import { randomAsHex } from "@polkadot/util-crypto";
1818
import { ProsopoEnvError } from "@prosopo/common";
19-
import { getPairAsync } from "@prosopo/contract";
19+
import { getPairAsync } from "@prosopo/keyring";
2020
import { ProsopoServer } from "@prosopo/server";
2121
import {
2222
ApiParams,

demos/client-example-server/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
{
1111
"path": "../../packages/common"
1212
},
13-
{
14-
"path": "../../packages/contract"
15-
},
1613
{
1714
"path": "../../packages/dotenv"
1815
},

demos/cypress-shared/cypress/e2e/captcha.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import "@cypress/xpath";
1616
import { u8aToHex } from "@polkadot/util";
1717
import { ProsopoDatasetError } from "@prosopo/common";
18-
import { getPairAsync } from "@prosopo/contract";
1918
import { datasetWithSolutionHashes } from "@prosopo/datasets";
19+
import { getPairAsync } from "@prosopo/keyring";
2020
import {
2121
AdminApiPaths,
2222
type Captcha,

demos/cypress-shared/cypress/e2e/correct.captcha.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import "@cypress/xpath";
1616
import { u8aToHex } from "@polkadot/util";
1717
import { ProsopoDatasetError } from "@prosopo/common";
18-
import { getPairAsync } from "@prosopo/contract";
1918
import { datasetWithSolutionHashes } from "@prosopo/datasets";
19+
import { getPairAsync } from "@prosopo/keyring";
2020
import {
2121
AdminApiPaths,
2222
type Captcha,

demos/cypress-shared/cypress/e2e/correct.captcha.signup.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import "@cypress/xpath";
1616
import { u8aToHex } from "@polkadot/util";
1717
import { ProsopoDatasetError } from "@prosopo/common";
18-
import { getPairAsync } from "@prosopo/contract";
1918
import { datasetWithSolutionHashes } from "@prosopo/datasets";
19+
import { getPairAsync } from "@prosopo/keyring";
2020
import {
2121
AdminApiPaths,
2222
type Captcha,

dev/config/src/projectInfo.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ export const getCliPkgDir = () => `${getPackagesDir()}/cli`;
5757

5858
export const getCommonPkgDir = () => `${getPackagesDir()}/common`;
5959

60-
export const getContractPkgDir = () => `${getPackagesDir()}/contract`;
61-
6260
export const getDatabasePkgDir = () => `${getPackagesDir()}/database`;
6361

6462
export const getDatasetsPkgDir = () => `${getPackagesDir()}/datasets`;
@@ -92,8 +90,6 @@ export const getProviderPkgDir = () => `${getPackagesDir()}/provider`;
9290

9391
export const getServerPkgDir = () => `${getPackagesDir()}/server`;
9492

95-
export const getTxPkgDir = () => `${getPackagesDir()}/tx`;
96-
9793
export const getTypesPkgDir = () => `${getPackagesDir()}/types`;
9894

9995
export const getTypesDatabasePkgDir = () =>

dev/scripts/env.development

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ PROSOPO_PROVIDER_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton e
2626
PROSOPO_PROXY_COUNT=
2727
PROSOPO_SERVER_URL=http://localhost:9228
2828
PROSOPO_SITE_KEY=5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw
29-
WATCHTOWER_LABEL_ENABLE=true
30-
WATCHTOWER_LOG_FORMAT=JSON
31-
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=
32-
WATCHTOWER_NOTIFICATIONS=
33-
WATCHTOWER_POLL_INTERVAL=30
34-
WATCHTOWER_REMOVE_VOLUMES=true
3529
PROSOPO_ADMIN_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV
3630
PROSOPO_ADMIN_JSON=
3731
PROSOPO_ADMIN_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant

dev/scripts/env.production

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,3 @@ PROSOPO_PROVIDER_MNEMONIC=
2424
PROSOPO_PROXY_COUNT=
2525
PROSOPO_SITE_KEY=
2626
PROSOPO_SERVER_URL=
27-
WATCHTOWER_LABEL_ENABLE=true
28-
WATCHTOWER_LOG_FORMAT=JSON
29-
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=
30-
WATCHTOWER_NOTIFICATIONS=
31-
WATCHTOWER_POLL_INTERVAL=30
32-
WATCHTOWER_REMOVE_VOLUMES=true

dev/scripts/env.staging

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ PROSOPO_PROVIDER_MNEMONIC=
2929
PROSOPO_PROXY_COUNT=
3030
PROSOPO_SITE_KEY=
3131
PROSOPO_SERVER_URL=
32-
WATCHTOWER_LABEL_ENABLE=true
33-
WATCHTOWER_LOG_FORMAT=JSON
34-
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=
35-
WATCHTOWER_NOTIFICATIONS=
36-
WATCHTOWER_POLL_INTERVAL=30
37-
WATCHTOWER_REMOVE_VOLUMES=true
3832
PROSOPO_ADMIN_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV
3933
PROSOPO_ADMIN_JSON=
4034
PROSOPO_ADMIN_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant

dev/scripts/env.test

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ PROSOPO_PROVIDER_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton e
2929
PROSOPO_PROXY_COUNT=
3030
PROSOPO_SERVER_URL=http://localhost:9228
3131
PROSOPO_SITE_KEY=5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw
32-
WATCHTOWER_LABEL_ENABLE=true
33-
WATCHTOWER_LOG_FORMAT=JSON
34-
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=
35-
WATCHTOWER_NOTIFICATIONS=
36-
WATCHTOWER_POLL_INTERVAL=30
37-
WATCHTOWER_REMOVE_VOLUMES=true
3832
PROSOPO_ADMIN_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV
3933
PROSOPO_ADMIN_JSON=
4034
PROSOPO_ADMIN_MNEMONIC=puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant

dev/scripts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626
"@polkadot/keyring": "12.6.2",
2727
"@polkadot/util": "12.6.2",
2828
"@polkadot/util-crypto": "12.6.2",
29+
"@prosopo/account": "2.2.3",
2930
"@prosopo/cli": "2.2.3",
3031
"@prosopo/common": "2.2.3",
3132
"@prosopo/config": "2.2.3",
32-
"@prosopo/contract": "2.2.3",
3333
"@prosopo/datasets": "2.2.3",
3434
"@prosopo/dotenv": "2.2.3",
3535
"@prosopo/env": "2.2.3",
36+
"@prosopo/keyring": "2.2.3",
3637
"@prosopo/provider": "2.2.3",
3738
"@prosopo/types": "2.2.3",
3839
"@prosopo/types-database": "2.2.3",

dev/scripts/src/scripts/generateMnemonic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414

1515
import { LogLevel, getLogger } from "@prosopo/common";
16-
import { generateMnemonic } from "@prosopo/contract";
1716
import { loadEnv } from "@prosopo/dotenv";
17+
import { generateMnemonic } from "@prosopo/keyring";
1818
import { updateEnvFile } from "../setup/index.js";
1919

2020
loadEnv();

dev/scripts/src/scripts/sign.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { stringToU8a, u8aToHex } from "@polkadot/util";
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515
import type { KeypairType } from "@polkadot/util-crypto/types";
16-
import { getPairAsync } from "@prosopo/contract";
16+
import { getPairAsync } from "@prosopo/keyring";
1717
import yargs from "yargs";
1818
import { hideBin } from "yargs/helpers";
1919

dev/scripts/src/setup/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import path from "node:path";
1616
import { BN } from "@polkadot/util";
1717
import { defaultConfig, getSecret } from "@prosopo/cli";
1818
import { LogLevel, ProsopoEnvError, getLogger } from "@prosopo/common";
19-
import { generateMnemonic, getPairAsync } from "@prosopo/contract";
2019
import { getEnvFile } from "@prosopo/dotenv";
2120
import { ProviderEnvironment } from "@prosopo/env";
21+
import { generateMnemonic, getPairAsync } from "@prosopo/keyring";
2222
import {
2323
type IDappAccount,
2424
type IProviderAccount,

dev/scripts/tsconfig.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"include": ["src", "src/**/*.json"],
99
"references": [
1010
{
11-
"path": "../../packages/cli"
11+
"path": "../../packages/account"
1212
},
1313
{
14-
"path": "../../packages/common"
14+
"path": "../../packages/cli"
1515
},
1616
{
17-
"path": "../../packages/contract"
17+
"path": "../../packages/common"
1818
},
1919
{
2020
"path": "../../packages/datasets"
@@ -25,6 +25,9 @@
2525
{
2626
"path": "../../packages/env"
2727
},
28+
{
29+
"path": "../../packages/keyring"
30+
},
2831
{
2932
"path": "../../packages/provider"
3033
},

docker/docker-compose.provider.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -146,26 +146,6 @@ services:
146146
retries: 3
147147
start_period: 30s
148148
timeout: 10s
149-
watchtower:
150-
container_name: watchtower
151-
profiles:
152-
- production
153-
- staging
154-
image: containrrr/watchtower
155-
command: ["--log-format", "JSON", "--remove-volumes", "--cleanup", "--warn-on-head-failure", "never", "--interval", "30", "--include-restarting"]
156-
labels:
157-
- "vector.watchtower=true" # enable logging as a watchtower
158-
- "vector.docker=true" # log docker events
159-
restart: unless-stopped # unless the container has been stopped, it will be restarted, even on reboot
160-
env_file:
161-
- ../.env.${NODE_ENV}
162-
volumes:
163-
- /var/run/docker.sock:/var/run/docker.sock
164-
logging:
165-
driver: 'json-file'
166-
options:
167-
max-size: '100m'
168-
max-file: '1'
169149
vector:
170150
container_name: vector
171151
profiles:

docker/images/vector/vector.toml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ compression = "gzip"
4141
encoding.codec = "json"
4242
encoding.timestamp_format = "rfc3339"
4343
healthcheck.enabled = false
44+
batch.timeout_secs = 10 # time to wait before sending a batch
45+
batch.max_bytes = 10485760 # 10mb, max number of bytes per batch
46+
batch.max_events = 100000 # max number of events per batch
4447

4548
# listen to docker events for containers starting+ending
4649
[sources.docker]
@@ -100,6 +103,9 @@ compression = "gzip"
100103
encoding.codec = "json"
101104
encoding.timestamp_format = "rfc3339"
102105
healthcheck.enabled = false
106+
batch.timeout_secs = 10 # time to wait before sending a batch
107+
batch.max_bytes = 10485760 # 10mb, max number of bytes per batch
108+
batch.max_events = 100000 # max number of events per batch
103109

104110
[sources.caddy]
105111
type = "docker_logs"
@@ -135,31 +141,3 @@ compression = "gzip"
135141
encoding.codec = "json"
136142
encoding.timestamp_format = "rfc3339"
137143
healthcheck.enabled = false
138-
139-
[sources.watchtower]
140-
type = "docker_logs"
141-
include_labels = ["vector.watchtower=true"]
142-
143-
[transforms.watchtower_format]
144-
type = "remap"
145-
inputs = ["watchtower"]
146-
source = '''
147-
.=parse_json!(string!(.message))
148-
.host="$OO_HOST"
149-
del(.time)
150-
del(.notify)
151-
'''
152-
153-
# send to openobserve
154-
[sinks.openobserve_watchtower]
155-
type = "http"
156-
inputs = ["watchtower_format"]
157-
uri = "https://api.openobserve.ai/api/$OO_ORG/${NODE_ENV}_provider_watchtower/_json"
158-
method = "post"
159-
auth.strategy = "basic"
160-
auth.user = "$OO_USERNAME"
161-
auth.password = "$OO_PASSWORD"
162-
compression = "gzip"
163-
encoding.codec = "json"
164-
encoding.timestamp_format = "rfc3339"
165-
healthcheck.enabled = false

0 commit comments

Comments
 (0)