-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Orion v3 release: user accounts (#160)
* User accounts (#122) * Initial commit * Initial orion draft * Hide private data * Fix extendedChannels query * docker-compose db config adjustments * Fix ExtendedBasicChannelFields * Add `video` view * Storage, Membership and ChannelCreated mappings * Channel events processing * Video mappings + some generic fixes * Mappings: Comments, reactions + some generic fixes * Cleanup * NFT mappings, some post-testing fixes * Video views mutation * Channel follows + video views improvements * Channel/video reports * Category filtering: Part 1 * State subscription * Category filtering: Part 2 + some refactorization * Category filtering: Part 3 - add missing views and operator auth * mostViewedVideosConnection custom query + generic custom queries fixes * Kill switch * mostRecentChannels query * channelNftCollectors query * extendedVideoCategories query * Fix AND-OR queries and "eq: null" * Docker setup improvements * Video hero * Category featured videos * Entity caching (overlay) refactorization * Prettier * Documentation, setup improvements, cleanup * FIX: Save NextEntityIds * Excludable content * - Allow limiting the total number of cached entities - Deployment manifest fixes - Custom ARCHIVE_GATEWAY_URL instead of HOST/PORT - Updated dependencies - `processAssets` bug fix * setVideoViewPerIpTimeLimit operator mutation * Ephesus mappings WIP * Fix conflicts with local Joystream docker setup * Metadata-protobuf patch location fix * Ephesus Atlas queries * Update CHANGELOG * Linting/formatting fixes, dead code removal * Apps metaprotocol mappings * Open auction topBid fix * Fix metadata-protobuf patch * Add signAppActionCommitment endpoint * Tests: Basic data comparison script + bug fixes * Remove channel-owned apps * Remove Ephesus scope * Apps as member-owned initial rework * Fixes after compareState vs mainnet * Remove lead-owned apps, fix typeorm-codegen patch * AppAction support (Joystream/joystream#4631) * Update CHANGELOG based on tests * Allow controlling "is_censored" content exclusion via env * buildExtendedChannelsQuery fix (activeVideosCount_gt: 0) * Benchmarking script * Benchmarking results * Event queries optimalizations, fix gitignored v1 and v2 schemas * Adjust autovacuum_analyze_scale_factor * Fix entity cache cleanup * Add index on event's `inExtrinsic` field * Benchmarking round 2 * Fix req.ip reverse proxy issue, allow conditionally displaying excluded content in results * Operator queries * Update docs * Prettier format * Add CI checks * Remove issue template, fix "workflows" location * Disallow app deletion * Update `generateAppActionCommitment` from `@joystream/js` * Fix channel follows, video views and reports after operator queries * Fix #82 * Comment notifications: Don't notify the author about their own comment * Introduce a mechanism to preserve views, follows, reports and config data when updating the processor * mostViewedVideosConnection missing params fix * Fix assets encoding (AppAction) * Assets url resolving * Remove accidently commited file * Fix Aquarium deployment * Update CHANGELOG * Improve caching speed and add more logs * Latest apps-related updated (generateAppActionCommitment, mappings) * Process member banning/unbanning * Fix: Remove banned members when channel is removed * Update migration * State queries: Re-enable apps * OpenAPI draft docs * Auth API: Part 1 - Anonymous Auth * Views: Add missing chanel/video related entities * Excluding/restoring comments: Update: - parentComment.repliesCount, - parentComment.reactionsAndRepliesCount, - video.commentsCount * Operator queries: 401 Unauthorized, remove `x-display-hidden-entities` (operator just sees all hidden entities by default) * Update changelog * Simplify processor state subscription * Prevent the same comment from being "excluded"/"restored" multiple times * Small adjustments to docs and compareState script * Orion v1 migration scripts * New logic for comment exclusion * Fix: Reference to `yarn` in package.json * Increase interval of ProcessorStateRetriever from 100 ms to 1000 ms * Auth API: Part 2 - Session extension and registration * Auth API: Part 3 - Basic e-mail confirmation * Auth API: Part 4 - Login and logout * Auth API: Part 5 - Connect / disconnect Joystream account(s) * Auth API: Part 6 - E-mail confirmation token re-send * Auth API: Schema adjustments for signature sign-in * Auth API: Encryption artifacts and related tests * Auth API: Cookie authentication * Auth API: Introduce rate limits and adjust proxy configuration * Auth API: DROP ANY NOTION OF E-MAIL CONFIRMATION AND PASSWORD RESET * Auth API: Max number of connected accounts and other data insertion limits * Formatting * Bring back e-mail confirmation features * AuthAPI: OpenAPI playground, fixes, dev settings * Auth API: Login - provide accountId in response * Auth API: Fix GraphQL server cors config to allow testing * Auth API: Update docs * Auth API: Minor getSessionArtifacts response data fix * Auth API: An attempt to fix CI tests * Auth API: 2nd attempt to fix CI tests * FIX: Set session cookie even if the session isn't new * FIX: disconnect-account should not require signing * Update developer guide + small package.json / Makefile fixes * Fix OperatorOnly and add AccountOnly middleware * Use `signatureVerify` instead of `sr25519Verify` to support external signer verification * Add warning about `tests:auth-api` to the docs * Fix link in README * Auth API adjustmnets due to new schema, bug fixes, `accountData` query and docs updates * Fix session artifacts unit test * Fix docker build * Fix generate-schema-file.sh * Adjustments: - one-to-one rel between Gateway accs, Blockchain accs and Memberships, - bug fixes * Operator guide + related developer guide adjustments * Adjustments to facilitate Orion deployment, upgrading and maintenance * Fix formatting, remove accidently commited files * Connect follows, reports and views w/ users * Use jsonl file as typegen input * Remove usused patch * Fix example env values in Operator guide * Fix config values visibility issue * 📝 Doc: update changelog for version 3.0.0 (#158) * 📝 Doc: update changelog for version 3.0.0 * ✏️ Fix: add disable same site explainer * 🩹 Improved changelog (#159) * Update CHANGELOG.md Remove docs directory structure --------- Co-authored-by: Leszek Wiesner <[email protected]>
- Loading branch information
Showing
181 changed files
with
10,880 additions
and
768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
/node_modules | ||
/lib | ||
/*Versions.jsonl | ||
/db/export.json* | ||
/db/export | ||
/db/persisted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,62 @@ | ||
# LOCAL ENVIRONMENT | ||
# LOCAL DEV ENVIRONMENT | ||
|
||
ORION_ENV=development | ||
DEV_DISABLE_SAME_SITE=true | ||
|
||
# Db config | ||
DB_NAME=squid | ||
DB_PASS=squid | ||
DB_ADMIN_USER=admin | ||
DB_ADMIN_PASS=admin | ||
DB_PORT=23798 | ||
# Processor service host | ||
PROCESSOR_HOST=localhost | ||
|
||
# Processor service prometheus port | ||
PROCESSOR_PROMETHEUS_PORT=3337 | ||
# Graphql server port | ||
GQL_PORT=4350 | ||
# Auth api port | ||
AUTH_API_PORT=4074 | ||
|
||
# Archive gateway url | ||
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://localhost:8888/graphql} | ||
|
||
# Default config values | ||
# ====================================================== | ||
# ============== DEFAULT CONFIG VALUES ================= | ||
# ====================================================== | ||
APP_NAME=Gleev | ||
SUPPORT_NO_CATEGORY_VIDEOS=true | ||
SUPPORT_NEW_CATEGORIES=true | ||
KILL_SWITCH_ON=false | ||
VIDEO_VIEW_PER_IP_TIME_LIMIT=86400 # 86400 seconds = 24 hours | ||
VIDEO_RELEVANCE_VIEWS_TICK=50 # every 50 views video relevance score will be recalculated | ||
RELEVANCE_WEIGHTS="[1, 0.03, 0.3, 0.5, [7,3]]" # [newness (negative number of days since created) weight, views weight, comments weight, rections weights, [joystream creation weight, YT creation weight]] | ||
|
||
# 10 seconds | ||
VIDEO_VIEW_PER_USER_TIME_LIMIT=10 | ||
# Operator API secret | ||
OPERATOR_SECRET=this-is-not-so-secret-change-it | ||
# Processor configuration | ||
# 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 | ||
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 | ||
|
||
# Adjust accordingly with the number of trusted (used) reverse proxies! | ||
TRUSTED_REVERSE_PROXIES=1 | ||
# Sendgrid API | ||
SENDGRID_API_KEY= | ||
SENDGRID_FROM_EMAIL=[email protected] | ||
|
||
# Debug settings | ||
SQD_DEBUG=api:* | ||
OPENAPI_PLAYGROUND=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
auth-api: | ||
name: Auth API tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16.x] | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{matrix.node-version}} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{matrix.node-version}} | ||
- name: Prepare workspace | ||
run: make prepare | ||
- name: Run tests | ||
run: npm run tests:auth-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ src/model/generated | |
/schema.graphql | ||
/db/persisted | ||
/scripts/orion-v1-migration/data | ||
/db/export.json* | ||
/db/export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Orion V2 | ||
# Orion | ||
|
||
Orion V2 is a backed node powering [Atlas](https://github.com/Joystream/atlas). | ||
Orion is a backed node powering [Atlas](https://github.com/Joystream/atlas). | ||
The project is using [Subsquid framework](https://docs.subsquid.io/) and is based on [squid-substrate-template](https://github.com/subsquid/squid-substrate-template). | ||
|
||
## [Developer guide](docs/developer-guide.md) | ||
## [Developer guide](docs/developer-guide/index.md) | ||
## [Operator guide](docs/operator-guide.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
DB_PORT=12345 | ||
GATEWAY_PORT=8888 | ||
WS_SOURCE=ws://joystream-node:9944 | ||
WS_SOURCE=wss://rpc.joystream.org:9944 | ||
EXPLORER_PORT=4444 |
Oops, something went wrong.