Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nara update from master #4873

Merged
merged 71 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9a40509
adds support for updating multiple storage bags using CLI
zeeshanakram3 Jul 26, 2023
f10f0b1
Merge remote-tracking branch 'upstream/master' into colossus-leader-u…
zeeshanakram3 Jul 26, 2023
c82a379
bump package version & update CHANGELOG
zeeshanakram3 Jul 26, 2023
febcc68
fix command name in tests
mnaamani Jul 31, 2023
0d9c0c9
fix arg name in update-bags command
mnaamani Jul 31, 2023
dac64ea
Merge pull request #4821 from mnaamani/update-bags-fix-test
mnaamani Jul 31, 2023
e9fcbb3
query-node: hotfix membership metadata handler
mnaamani Aug 24, 2023
d144823
Merge pull request #4838 from mnaamani/qn-hotfix-member-external-reso…
mnaamani Aug 24, 2023
03c6e81
fix update validator
chrlschwb Aug 29, 2023
e81b513
lint fix
chrlschwb Aug 29, 2023
ed17b5d
update validator
chrlschwb Aug 29, 2023
6e20a7a
isVerified is false
chrlschwb Aug 29, 2023
321aa4c
git error
chrlschwb Aug 29, 2023
0d88ad7
fix git error
chrlschwb Aug 30, 2023
da59458
TEST update|
chrlschwb Aug 30, 2023
a2eb659
pretter on network-test folder
chrlschwb Aug 30, 2023
0209d49
git fix test error
chrlschwb Aug 30, 2023
2fbcbd9
fix git
chrlschwb Aug 30, 2023
27dcd24
add commit for git error fix
chrlschwb Aug 30, 2023
e675f3a
test
chrlschwb Aug 30, 2023
578e849
test
chrlschwb Aug 30, 2023
de56562
profo file changed
chrlschwb Aug 30, 2023
031eea6
membership file change
chrlschwb Aug 30, 2023
bca92db
test
chrlschwb Aug 30, 2023
9631880
test
chrlschwb Aug 30, 2023
6360a23
update membership
chrlschwb Aug 31, 2023
582f8ca
update graphql file
chrlschwb Sep 1, 2023
609317c
fix mappings validator of membership
chrlschwb Sep 1, 2023
d937322
update test files
chrlschwb Sep 1, 2023
e9c4a6e
add test file
chrlschwb Sep 1, 2023
a1ac5aa
lint fix error
chrlschwb Sep 1, 2023
20c6695
fix error
chrlschwb Sep 1, 2023
a97377e
remove .env change
chrlschwb Sep 1, 2023
bf20c3c
test
chrlschwb Sep 3, 2023
7a03c0e
fix error
chrlschwb Sep 4, 2023
12ffd6d
fix lint error
chrlschwb Sep 4, 2023
e3f81be
test file changed
chrlschwb Sep 5, 2023
4eb8fed
fix lint error
chrlschwb Sep 5, 2023
af30676
replace yarn.lock
chrlschwb Sep 5, 2023
dfd8667
fix: :green_heart: fix orion environment not working
ignazio-bovo Sep 6, 2023
8e6bb26
readd validatorAccount test
chrlschwb Sep 6, 2023
66075aa
update metadata test file
chrlschwb Sep 6, 2023
5cffc23
fix error
chrlschwb Sep 7, 2023
38caf6e
fix error
chrlschwb Sep 7, 2023
75b2502
lint fix error
chrlschwb Sep 7, 2023
962ac30
fix membership test error
chrlschwb Sep 7, 2023
a4d086c
feat: :art: re enable squid archive configuration
ignazio-bovo Sep 7, 2023
1987289
fix: :green_heart: docker no bind
ignazio-bovo Sep 7, 2023
730e207
ont
chrlschwb Sep 7, 2023
cd8f4e5
test
chrlschwb Sep 7, 2023
eeb9fb1
test
chrlschwb Sep 7, 2023
1afca20
fix
chrlschwb Sep 7, 2023
bda7607
lock file gitignore
chrlschwb Sep 7, 2023
0b49b49
update
chrlschwb Sep 7, 2023
26eb57e
Merge branch 'fix/4823-validator' of https://github.com/chrlschwb/joy…
chrlschwb Sep 7, 2023
bdc3c8f
fix test error
chrlschwb Sep 8, 2023
b9ee09c
fix test error
chrlschwb Sep 8, 2023
5f8c523
test fix
chrlschwb Sep 8, 2023
dda8d15
Update tests/network-tests/src/fixtures/membership/utils.ts
chrlschwb Sep 8, 2023
b9a6763
update
chrlschwb Sep 8, 2023
837f7f1
Update tests/network-tests/src/flows/membership/updatingProfile.ts
chrlschwb Sep 8, 2023
00fbe4e
fix: :bug: pr misc fixes
ignazio-bovo Sep 11, 2023
3a2f203
ignore files
chrlschwb Sep 11, 2023
be58380
Merge branch 'fix/4823-validator' of https://github.com/chrlschwb/joy…
chrlschwb Sep 11, 2023
8e82ab2
Merge pull request #4849 from chrlschwb/fix/4823-validator
mnaamani Sep 13, 2023
dd13eba
fix: :bug: ports for explorer container
ignazio-bovo Sep 13, 2023
7dc4190
fix: :bug: postgres file
ignazio-bovo Sep 13, 2023
9a77840
fix: :bug: sendgrid variables config
ignazio-bovo Sep 13, 2023
0d2a068
Merge pull request #4857 from ignazio-bovo/docker-compose-orion
mnaamani Sep 14, 2023
e089a28
Merge branch 'master' into nara-update-from-master
mnaamani Sep 14, 2023
21d7177
storage-node: handle new typename for dispatch error
mnaamani Sep 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 55 additions & 19 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -92,35 +92,71 @@ BALANCE_CREDIT=300000000000
BALANCE_LOCKED=300000000000

# ====================================== ORION ======================================
# Orion db config
# Overrides `DB_*` environment variables for orion services in docker-compose.yml
# We use a single postgres service for both:
# - Subsquid archive's database (squid-archive, squid-archive-gateway) and
# - Orion's database (orion_processor, orion_graphql-server).
# ORION_DB_NAME is the name of the Orion's database, while SQUID_ARCHIVE_DB_NAME
# is the name of the Subsquid archive database.
SQUID_ARCHIVE_DB_NAME=squid_archive
ORION_DB_NAME=orion
ORION_DB_USER=postgres
ORION_DB_PASS=postgres
# LOCAL DEV ENVIRONMENT

ORION_ENV=development
DEV_DISABLE_SAME_SITE=true

# Db config
ORION_DB_NAME=squid
ORION_DB_PASS=squid
DB_ADMIN_USER=admin
DB_ADMIN_PASS=admin
ORION_DB_PORT=5433

# Orion / Subsquid archive service ports
ORION_API_PORT=4350
# archive configuration
ARCHIVE_DB_PORT=12345
ARCHIVE_GATEWAY_PORT=8888
WS_SOURCE=ws://joystream-node:9944
ARCHIVE_EXPLORER_PORT=4444

# Processor service prometheus port
PROCESSOR_PROMETHEUS_PORT=3337
SQUID_ARCHIVE_GATEWAY_PORT=8000
# Graphql server port
GRAPHQL_API_PORT=4350
# Auth api port
AUTH_API_PORT=4074

# Other Orion configs
APP_NAME=Gleev
SUPPORT_NO_CATEGORY_VIDEOS=true
SUPPORT_NEW_CATEGORIES=true
KILL_SWITCH_ON=false
VIDEO_VIEW_PER_IP_TIME_LIMIT=30
VIDEO_RELEVANCE_VIEWS_TICK=50
RELEVANCE_WEIGHTS="[1, 0.03, 0.3, 0.5]"
# 10 seconds
VIDEO_VIEW_PER_USER_TIME_LIMIT=10
# Operator API secret
OPERATOR_SECRET=this-is-not-so-secret-change-it
# every 50 views video relevance score will be recalculated
VIDEO_RELEVANCE_VIEWS_TICK=50
# [
# newness (negative number of days since created) weight,
# views weight,
# comments weight,
# rections weights,
# [joystream creation weight, YT creation weight]
# ]
RELEVANCE_WEIGHTS="[1, 0.03, 0.3, 0.5, [7,3]]"
MAX_CACHED_ENTITIES=1000
APP_PRIVATE_KEY=this-is-not-so-secret-change-it
TRUSTED_REVERSE_PROXIES=1
SESSION_EXPIRY_AFTER_INACTIVITY_MINUTES=60
SESSION_MAX_DURATION_HOURS=720
EMAIL_CONFIRMATION_ROUTE=http://localhost:4074/api/v1/confirm-email?token={token}
EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS=24
EMAIL_CONFIRMATION_TOKEN_RATE_LIMIT=5
ACCOUNT_OWNERSHIP_PROOF_EXPIRY_TIME_SECONDS=300 # 5 minutes
COOKIE_SECRET=this-is-not-so-secret-change-it

TRUST_PROXY=uniquelocal

# Sendgrid API
ORION_SENDGRID_API_KEY=
ORION_SENDGRID_FROM_EMAIL=gateway@example.com

# Debug settings
SQD_DEBUG=api:*
OPENAPI_PLAYGROUND=true

ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://squid-archive-gateway:8000/graphql}

# =====================================================================================

## Telemetry
Expand Down
17 changes: 17 additions & 0 deletions distributor-node/src/services/networking/query-node/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,8 @@ type MemberMetadata implements BaseGraphQLObject {
about: String
member: Membership
externalResources: [MembershipExternalResource!]
isVerifiedValidator: Boolean
validatorAccount: String
membercreatedeventmetadata: [MemberCreatedEvent!]
memberinvitedeventmetadata: [MemberInvitedEvent!]
memberprofileupdatedeventnewMetadata: [MemberProfileUpdatedEvent!]
Expand Down Expand Up @@ -17711,6 +17713,13 @@ input MemberMetadataWhereInput {
about_startsWith: String
about_endsWith: String
about_in: [String!]
isVerifiedValidator_eq: Boolean
isVerifiedValidator_in: [Boolean!]
validatorAccount_eq: String
validatorAccount_contains: String
validatorAccount_startsWith: String
validatorAccount_endsWith: String
validatorAccount_in: [String!]
member: MembershipWhereInput
externalResources_none: MembershipExternalResourceWhereInput
externalResources_some: MembershipExternalResourceWhereInput
Expand Down Expand Up @@ -17743,12 +17752,16 @@ input MemberMetadataCreateInput {
name: String
avatar: JSONObject!
about: String
isVerifiedValidator: Boolean
validatorAccount: String
}

input MemberMetadataUpdateInput {
name: String
avatar: JSONObject
about: String
isVerifiedValidator: Boolean
validatorAccount: String
}

input MembershipGiftedEventWhereInput {
Expand Down Expand Up @@ -30451,6 +30464,10 @@ enum MemberMetadataOrderByInput {
name_DESC
about_ASC
about_DESC
isVerifiedValidator_ASC
isVerifiedValidator_DESC
validatorAccount_ASC
validatorAccount_DESC
}

enum MemberProfileUpdatedEventOrderByInput {
Expand Down
195 changes: 125 additions & 70 deletions docker-compose-no-bind-volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,23 +164,6 @@ services:
POSTGRES_DB: ${INDEXER_DB_NAME}
PGPORT: ${DB_PORT}

orion-db:
image: postgres:14
container_name: orion-db
restart: unless-stopped
ports:
- '127.0.0.1:${ORION_DB_PORT}:${ORION_DB_PORT}'
volumes:
- orion-db-data:/var/lib/postgresql/data
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
POSTGRES_USER: ${ORION_DB_USER}
POSTGRES_PASSWORD: ${ORION_DB_PASS}
POSTGRES_DB: ${ORION_DB_NAME}
PGPORT: ${ORION_DB_PORT}

graphql-server:
image: joystream/query-node
build:
Expand Down Expand Up @@ -307,92 +290,162 @@ services:
ports:
- "3002:3002"

squid-archive:
container_name: squid-archive
image: subsquid/substrate-ingest:firesquid
depends_on:
- orion-db
orion-db:
image: postgres:14
container_name: orion-db
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${SUBSQUID_ARCHIVE_DB_NAME}
- DB_USER=${ORION_DB_USER}
- DB_PASS=${ORION_DB_PASS}
- DB_HOST=orion-db
- DB_PORT=${ORION_DB_PORT}
command: [
'-e',
'${JOYSTREAM_NODE_WS}',
'-c',
'20',
'--out',
'postgres://postgres:postgres@orion-db:${ORION_DB_PORT}/${SUBSQUID_ARCHIVE_DB_NAME}',
]
POSTGRES_PASSWORD: ${ORION_DB_PASS}
POSTGRES_DB: ${ORION_DB_NAME}
ports:
- '127.0.0.1:${ORION_DB_PORT}:${ORION_DB_PORT}'
command: ['postgres', '-c', 'config_file=/etc/postgresql/postgresql.conf', '-p', '${ORION_DB_PORT}']
# command: ['postgres', '-p', '${ORION_DB_PORT}']
shm_size: 1g
volumes:
- orion-db-data:/var/lib/postgresql/data
- ./orion-postgres.conf:/etc/postgresql/postgresql.conf

squid-archive-gateway:
container_name: squid-archive-gateway
image: subsquid/substrate-gateway:firesquid
# Orion processor
orion-processor:
image: joystream/orion:latest
container_name: orion-processor
restart: unless-stopped
depends_on:
- orion-db
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${SUBSQUID_ARCHIVE_DB_NAME}
- DB_USER=${ORION_DB_USER}
- DB_NAME=${ORION_DB_NAME}
- DB_PASS=${ORION_DB_PASS}
- DB_HOST=orion-db
- DB_PORT=${ORION_DB_PORT}
- DATABASE_MAX_CONNECTIONS=5
- RUST_LOG=actix_web=info,actix_server=info
command: [
'--database-url',
'postgres://postgres:postgres@orion-db:${ORION_DB_PORT}/${SUBSQUID_ARCHIVE_DB_NAME}',
]
- DB_HOST=orion-db
- GQL_PORT=${GRAPHQL_API_PORT}
volumes:
- ./db/export:/squid/db/export
command: >
sh -c "npx squid-typeorm-migration apply && \
node lib/processor.js"
ports:
- '127.0.0.1:${SQUID_ARCHIVE_GATEWAY_PORT}:8000'
- '127.0.0.1:${PROCESSOR_PROMETHEUS_PORT}:${PROCESSOR_PROMETHEUS_PORT}'

orion-processor:
container_name: orion-processor
# Orion GraphQL API
orion-graphql-api:
container_name: orion-graphql-api
image: joystream/orion:latest
restart: unless-stopped
env_file:
- .env
depends_on:
- orion-db
env_file:
- .env
environment:
- DB_NAME=${ORION_DB_NAME}
- DB_USER=${ORION_DB_USER}
- DB_PASS=${ORION_DB_PASS}
- DB_HOST=orion-db
- DB_PORT=${ORION_DB_PORT}
- GQL_PORT=${ORION_API_PORT}
- ARCHIVE_GATEWAY_URL=http://squid-archive-gateway:8000/graphql
command: >
sh -c "npx squid-typeorm-migration apply && \
node lib/processor.js"
- DB_HOST=orion-db
- GQL_PORT=${GRAPHQL_API_PORT}
command: ['npm', 'run', 'query-node-start']
ports:
- '127.0.0.1:${PROCESSOR_PROMETHEUS_PORT}:${PROCESSOR_PROMETHEUS_PORT}'
- '127.0.0.1:${GRAPHQL_API_PORT}:${GRAPHQL_API_PORT}'

orion-api:
container_name: orion-api
# Orion Authentication API
orion-auth-api:
container_name: orion-auth-api
image: joystream/orion:latest
restart: unless-stopped
env_file:
- .env
depends_on:
- orion-db
env_file:
- .env
environment:
- DB_NAME=${ORION_DB_NAME}
- DB_USER=${ORION_DB_USER}
- DB_PASS=${ORION_DB_PASS}
- DB_HOST=orion-db
- DB_PORT=${ORION_DB_PORT}
- GQL_PORT=${ORION_API_PORT}
command: ["npm", "run", "query-node-start"]
- DB_HOST=orion-db
- SENDGRID_API_KEY=${ORION_SENDGRID_API_KEY}
- SENDGRID_FROM_EMAIL=${ORION_SENDGRID_FROM_EMAIL}
command: ['npm', 'run', 'auth-server-start']
ports:
- '127.0.0.1:${AUTH_API_PORT}:${AUTH_API_PORT}'

# Orion archive node
squid-archive-db:
container_name: orion_archive_db
hostname: orion_archive_db
image: postgres:14 # CockroachDB cluster might be a better fit for production deployment
restart: unless-stopped
volumes:
- orion_archive_db_data:/var/lib/postgresql/data
env_file:
- .env
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: squid-archive
ports:
- '127.0.0.1:${ARCHIVE_DB_PORT}:${ARCHIVE_DB_PORT}'
- '[::1]:${ARCHIVE_DB_PORT}:${ARCHIVE_DB_PORT}'
command: ['postgres', '-c', 'log_statement=all', '-p', '${ARCHIVE_DB_PORT}']

squid-archive-ingest:
container_name: orion_archive_ingest
depends_on:
- squid-archive-db
restart: unless-stopped
env_file:
- .env
image: subsquid/substrate-ingest:firesquid
command: [
'-e',
'${WS_SOURCE}',
'-c',
'20', # allow up to 20 pending requests for the above endpoint (default is 5)
# "--start-block", "1000000", # uncomment to specify a non-zero start block
'--out',
'postgres://postgres:postgres@orion_archive_db:${ARCHIVE_DB_PORT}/squid-archive',
]

squid-archive-gateway:
container_name: orion_archive_gateway
hostname: orion_archive_gateway
depends_on:
- squid-archive-db
restart: unless-stopped
image: subsquid/substrate-gateway:firesquid
env_file:
- .env
environment:
DATABASE_MAX_CONNECTIONS: 5
RUST_LOG: 'actix_web=info,actix_server=info'
command: [
'--database-url',
'postgres://postgres:postgres@orion_archive_db:${ARCHIVE_DB_PORT}/squid-archive',
]
ports:
- '${ORION_API_PORT}:${ORION_API_PORT}'
- '127.0.0.1:${ARCHIVE_GATEWAY_PORT}:8000'
- '[::1]:${ARCHIVE_GATEWAY_PORT}:8000'

# Explorer service is optional.
# It provides rich GraphQL API for querying archived data.
# Many developers find it very useful for exploration and debugging.
squid-archive-explorer:
container_name: orion_archive_explorer
hostname: orion_archive_explorer
restart: unless-stopped
image: subsquid/substrate-explorer:firesquid
env_file:
- .env
environment:
DB_TYPE: postgres # set to `cockroach` for Cockroach DB
DB_HOST: orion_archive_db
DB_NAME: 'squid-archive'
DB_USER: 'postgres'
DB_PASS: 'postgres'
DB_PORT: ${ARCHIVE_DB_PORT}
ports:
- '${ARCHIVE_EXPLORER_PORT}:3000'

volumes:
chain-data:
Expand Down Expand Up @@ -425,3 +478,5 @@ volumes:
driver: local
orion-db-data:
driver: local
orion_archive_db_data:
driver: local
Loading
Loading