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

Governance Actions and DRep Metadata fix #1215

Merged
merged 136 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
8eca432
replace metadata validation service
Sworzen1 May 29, 2024
b88aa2f
delete unnecessary util
Sworzen1 May 29, 2024
5bca641
fix GA story
Sworzen1 May 31, 2024
13db99e
fix type
Sworzen1 May 31, 2024
103f040
fix Voted GAs
Sworzen1 May 31, 2024
bb14ce8
take GA metadata from metadataStatus
Sworzen1 May 31, 2024
2d98ec4
change name of const
Sworzen1 Jun 4, 2024
0ceb452
add translations for insufficient balance error modal
Sworzen1 Jun 4, 2024
60a80b7
display modal on click propose GA on dashboard
Sworzen1 Jun 4, 2024
9dbf90f
display modal on submit GA
Sworzen1 Jun 4, 2024
cd02e38
change way to handle is delegation process
Sworzen1 Jun 4, 2024
5490f3f
add is delegation for drep card
Sworzen1 Jun 4, 2024
f71d900
change way to handle is delegation process for automated voting options
Sworzen1 Jun 4, 2024
414dc45
change props hierarchy in Button component
Sworzen1 Jun 4, 2024
9aff427
add change for drep details
Sworzen1 Jun 4, 2024
404c54d
fix drep card is loading
Sworzen1 Jun 4, 2024
3a1302a
add bio for drep registration
Sworzen1 Jun 4, 2024
e4e2a99
Align dRep directory tests with cardano-test-plans
NabinKawan May 31, 2024
b74a075
Align drepRegistration and governance action tests with cardano-test-…
kneerose May 31, 2024
aa7dccd
chore: Skip test 4J, and Rename 4D to 4C.3
NabinKawan Jun 5, 2024
eeb2244
chore: Fix typo and Rename variables
NabinKawan Jun 5, 2024
97fc12d
Merge pull request #1165 from IntersectMBO/refactor/tests-to-use-card…
NabinKawan Jun 5, 2024
88cfa50
Enhance flexibility for local development
NabinKawan Jun 3, 2024
c2b3c7e
chore: Rename variables (temp. wallets count)
NabinKawan Jun 5, 2024
bd9ce30
Merge pull request #1166 from IntersectMBO/enhancement/local-development
NabinKawan Jun 5, 2024
45515ac
fix: External URL checks by mocking proposals
NabinKawan Jun 3, 2024
862c91f
chore: Remove unwanted log message
NabinKawan Jun 5, 2024
024a140
Merge pull request #1167 from IntersectMBO/fix/external-url-checks
NabinKawan Jun 5, 2024
d0f5f06
test: Remove test 4I as it cannot be performed on integration testing
kneerose Jun 3, 2024
ece88e4
fix: Flaky test 5E , 5I
kneerose Jun 3, 2024
a394f41
fix: delegation failed test
kneerose Jun 3, 2024
789d51b
fix: DRep registration and proposal visibility test
kneerose Jun 3, 2024
eba31c2
fix:Missing balance issue
kneerose Jun 4, 2024
25c6ed9
Merge pull request #1168 from IntersectMBO/fix/flaky-tests
NabinKawan Jun 5, 2024
fe3de32
test: Validate review submission
kneerose May 30, 2024
66ccd18
test: Proposal submission
kneerose May 31, 2024
dcbc5e8
Refactor: Remove 'test.slow' and add comment explaining using test.slow
kneerose May 31, 2024
3cf4557
Merge pull request #1116 from IntersectMBO/complete-proposal-submissi…
NabinKawan Jun 5, 2024
24688d6
feat: integrate pdf-ui package into govtool
MSzalowski May 29, 2024
949739c
chore: change working directory
MSzalowski Jun 5, 2024
88ae898
chore: add working directory as artifact
MSzalowski Jun 5, 2024
6c1e85b
chore: add npmrc to every job
MSzalowski Jun 5, 2024
1a9c455
fix references body data
Sworzen1 Jun 5, 2024
24d8594
chore: increase max old space size for test job
MSzalowski Jun 5, 2024
5c20403
change test for generate metadata
Sworzen1 Jun 5, 2024
d0bbb84
delete console log
Sworzen1 Jun 5, 2024
d435efe
Merge pull request #1164 from IntersectMBO/fix/test-ids
Sworzen1 Jun 5, 2024
26e868f
Merge pull request #1161 from IntersectMBO/fix/1079-bug-multiple-wall…
Sworzen1 Jun 5, 2024
e1f9da6
Merge pull request #1159 from IntersectMBO/fix/1078-bug-abstain-and-s…
Sworzen1 Jun 5, 2024
502141c
Merge pull request #1156 from IntersectMBO/fix/509-ga-submit-where-th…
Sworzen1 Jun 5, 2024
213df3c
Merge pull request #1146 from IntersectMBO/feat/1090-integrate-pdf-in…
MSzalowski Jun 5, 2024
d475828
Merge pull request #1170 from IntersectMBO/fix/1169-wrong-references-…
Sworzen1 Jun 5, 2024
ff54750
test: Delegated ADA display to DRep
NabinKawan May 22, 2024
e9b71e6
test: Add test 4L and 4M
kneerose Jun 5, 2024
0639c5f
test: Add provide context validation test 5D
kneerose Jun 3, 2024
5843181
test: Validate metadata anchor
NabinKawan Jun 5, 2024
4840021
test: Validate dRep metadata anchor
NabinKawan Jun 5, 2024
e8eb67c
test: Edit dRep form validations
NabinKawan Jun 5, 2024
0c19484
test: DRep registration metadata validation
NabinKawan Jun 5, 2024
397d412
test: Edit dRep metadata validation
NabinKawan Jun 5, 2024
cd1c7f9
fix: Validate dRep metadata anchor
NabinKawan Jun 5, 2024
08be1e1
fix: 2W. Visibility delegated ADA to DRep
NabinKawan Jun 5, 2024
96c3a00
test: verify info and voting power of abstain and signal-no-confidence
kneerose Jun 5, 2024
1e4d381
test: Proposal submission form and Metadata validation
kneerose Jun 5, 2024
a5c608c
fix: 2W. Wallet overlapping
NabinKawan Jun 5, 2024
beab827
chore: Allure report visibility for edit_dRep and proposalSubmission …
NabinKawan Jun 5, 2024
f27ce68
fix: Resolve Wallet Popup Timeout Issue
NabinKawan Jun 5, 2024
b32a05c
[#262] Add missing documentation about deployment of additional services
placek May 8, 2024
52e61ef
[#262] Add an overview of the infrastructure in the documentation
placek May 8, 2024
3798dca
[#1142] fetch metadata from metadata-validation-service
jankun4 Jun 6, 2024
3dd4f4d
Merge pull request #1077 from IntersectMBO/extended/tests
NabinKawan Jun 6, 2024
f8741fe
docs: create outline of the architecture documentation
MSzalowski May 6, 2024
3e0f4b9
Merge branch 'fix/1111-replace-metadata-validation-service-with-api' …
Sworzen1 Jun 6, 2024
274f40a
change types
Sworzen1 Jun 6, 2024
40e05a9
fix util and test
Sworzen1 Jun 6, 2024
81d8e8d
change types in hooks
Sworzen1 Jun 6, 2024
0d23677
adjust screens and components
Sworzen1 Jun 6, 2024
5e9b603
feat: update maintenance page title&description
MSzalowski Jun 6, 2024
cffdf4d
chore: set usersnap api key on dockerfile
MSzalowski Jun 6, 2024
8cb2a08
Merge pull request #1185 from IntersectMBO/feat/update-maintenance-pa…
Sworzen1 Jun 6, 2024
a88e6bf
Merge pull request #1186 from IntersectMBO/chore/set-usersnap-space-a…
MSzalowski Jun 6, 2024
8130f4a
improvement
Sworzen1 Jun 6, 2024
4beb408
[#1142] fetch metadata from metadata-validation-service
jankun4 Jun 6, 2024
3bca876
replace metadata validation service
Sworzen1 May 29, 2024
7d5c34b
delete unnecessary util
Sworzen1 May 29, 2024
aa909de
fix GA story
Sworzen1 May 31, 2024
33fe682
fix type
Sworzen1 May 31, 2024
27dfc74
fix Voted GAs
Sworzen1 May 31, 2024
315c323
take GA metadata from metadataStatus
Sworzen1 May 31, 2024
69c08cf
change types
Sworzen1 Jun 6, 2024
0228dfc
fix util and test
Sworzen1 Jun 6, 2024
ea19bdd
change types in hooks
Sworzen1 Jun 6, 2024
53f675a
adjust screens and components
Sworzen1 Jun 6, 2024
2bef202
improvement
Sworzen1 Jun 6, 2024
30286d8
chore: fix tsc errors
MSzalowski Jun 6, 2024
122cf03
Merge branch '1142-metadata-validation-problems' of https://github.co…
Sworzen1 Jun 6, 2024
0fc2519
fix: metadata validation
MSzalowski Jun 6, 2024
99eeed3
Merge pull request #1189 from IntersectMBO/fix/1178-ga-submitting-pro…
MSzalowski Jun 6, 2024
a7227a6
Merge branch '1142-metadata-validation-problems' of https://github.co…
Sworzen1 Jun 6, 2024
3f7fc60
chore: disable pdf for the envs other than develop
MSzalowski Jun 6, 2024
9d6c886
fix: fix metadata references validation
MSzalowski Jun 6, 2024
ecaff7e
Merge branch '1142-metadata-validation-problems' of https://github.co…
Sworzen1 Jun 6, 2024
d07225a
Merge pull request #1190 from IntersectMBO/chore/blacklist-pdf-pillar…
MSzalowski Jun 6, 2024
df2384d
change drep types
Sworzen1 Jun 6, 2024
3735872
add translations
Sworzen1 Jun 6, 2024
a4861d3
change component name for reuse
Sworzen1 Jun 6, 2024
8d9e7b1
improve components
Sworzen1 Jun 6, 2024
ac76edc
adjust drep directory
Sworzen1 Jun 6, 2024
8efc99a
adjust drep test
Sworzen1 Jun 6, 2024
58babd1
adjust edit drep
Sworzen1 Jun 6, 2024
be8548b
fix ga metadata status translation test
Sworzen1 Jun 7, 2024
204ae85
Merge pull request #1143 from IntersectMBO/1142-metadata-validation-p…
MSzalowski Jun 7, 2024
0d98ced
fix: fix missing margin in drep details about section
MSzalowski Jun 7, 2024
85998b9
delete delegation for direct voter
Sworzen1 Jun 7, 2024
73d39bc
[#1195] Remove unnecessary deployment config dependancy
placek Jun 7, 2024
39f7663
Merge pull request #1191 from IntersectMBO/fix/direct-voter-delegatio…
Sworzen1 Jun 7, 2024
e7310e9
fix: fix vote context metadata creation
MSzalowski Jun 7, 2024
47b10cc
Merge pull request #1194 from IntersectMBO/fix/missing-margin-in-abou…
MSzalowski Jun 7, 2024
adfdb74
Merge pull request #1196 from IntersectMBO/fix/1195-troubleshooting-f…
MSzalowski Jun 7, 2024
b339d8d
Merge pull request #1198 from IntersectMBO/fix/1142-metadata-creation
MSzalowski Jun 7, 2024
0a369ee
chore: add proposal discussion forum feature flag
MSzalowski Jun 7, 2024
378aa25
Merge pull request #1200 from IntersectMBO/chore/add-proposal-discuss…
MSzalowski Jun 7, 2024
dddf6ea
chore: add missing variable to frontend make file
MSzalowski Jun 7, 2024
90b7999
Merge pull request #1201 from IntersectMBO/chore/add-proposal-discuss…
MSzalowski Jun 7, 2024
e43a5f8
chore: add missing arg in dockerfile
MSzalowski Jun 7, 2024
dde0653
Merge pull request #1202 from IntersectMBO/chore/add-proposal-discuss…
MSzalowski Jun 7, 2024
9b2593c
Merge pull request #1176 from IntersectMBO/develop
pmbinapps Jun 7, 2024
6cf68c6
chore: bump pdf-ui package
MSzalowski Jun 7, 2024
0af418d
Merge pull request #955 from IntersectMBO/docs/262-govtool-architectu…
MSzalowski Jun 7, 2024
34c4c2e
Merge pull request #1203 from IntersectMBO/chore/bump-pdf-ui-package-…
MSzalowski Jun 7, 2024
5eaa750
fix: fix unbound arg in frontend dockerfile
MSzalowski Jun 7, 2024
67883fd
Merge pull request #1204 from IntersectMBO/fix/fix-unbound-arg-for-pdf
MSzalowski Jun 7, 2024
0d412ea
Merge pull request #1205 from IntersectMBO/develop
pmbinapps Jun 7, 2024
3743f2f
chore: set defaults for PDF in yml deploy workflows
MSzalowski Jun 10, 2024
87835b5
Merge pull request #1212 from IntersectMBO/chore/set-defaults-in-yml-…
MSzalowski Jun 10, 2024
b47440e
Merge pull request #1214 from IntersectMBO/develop
MSzalowski Jun 10, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/build-and-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
Expand All @@ -37,6 +38,7 @@ jobs:
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: "false"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ run-name: Deploy by @${{ github.actor }}

on:
workflow_dispatch:
inputs:
isProposalDiscussionForumEnabled:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "disabled"
options:
- "enabled"
- "disabled"

env:
ENVIRONMENT: "dev"
Expand All @@ -26,6 +35,7 @@ jobs:
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
Expand All @@ -37,6 +47,7 @@ jobs:
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
Expand All @@ -39,6 +40,7 @@ jobs:
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: "false"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-deploy-test-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
Expand All @@ -46,4 +47,4 @@ jobs:
options: |
--verbose
env:
GOVTOOL_TAG: ${{ github.sha }}
GOVTOOL_TAG: ${{ github.sha }}
2 changes: 2 additions & 0 deletions .github/workflows/build-and-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
Expand All @@ -39,6 +40,7 @@ jobs:
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: "false"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/code_check_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths:
- govtool/frontend/**
- .github/workflows/test_frontend.yml
- .github/workflows/code_check_frontend.yml

defaults:
run:
Expand All @@ -26,13 +26,17 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

- name: 🧪 Test
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: "--max_old_space_size=8192"
run: |
npm install
npm run test
lint:
Expand All @@ -50,11 +54,15 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

- name: 👕 Lint
run: |
npm install
npm run lint
type_check:
Expand All @@ -72,9 +80,13 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

- name: 🔍 Type Check
run: |
npm install
npm run tsc
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
TRAEFIK_LE_EMAIL: "[email protected]"
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/resync-cardano-node-and-db-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
TRAEFIK_LE_EMAIL: "[email protected]"
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ changes.

### Added

- added `bio` `dRepName` `email` `references` `metadataValid` and `metadataStatus` fields to `drep/list`
- added `metadatavalidationmaxconcurrentrequests` field to the backend config
- added `metadata/validate` endpoint [Issue 876](https://github.com/IntersectMBO/govtool/issues/876)
- added pagination to `drep/list` [Issue 756](https://github.com/IntersectMBO/govtool/issues/756)
- added search query param to the `drep/getVotes` [Issue 640](https://github.com/IntersectMBO/govtool/issues/640)
Expand Down Expand Up @@ -60,6 +62,7 @@ changes.
- Add type check & lint to github actions [Issue 512](https://github.com/IntersectMBO/govtool/issues/512)
- Add eslint & prettier to frontend package [Issue 166](https://github.com/IntersectMBO/govtool/issues/166)
- Add DRep list pagination [Issue 740](https://github.com/IntersectMBO/govtool/issues/740)
- Add PDF pillar [Issue 1090](https://github.com/IntersectMBO/govtool/issues/1090)

### Fixed

Expand Down Expand Up @@ -92,6 +95,7 @@ changes.

### Changed

- `proposal.about` changed to `proposal.abstract`
- `drep/info` now returns 4 different tx hashes instead of one latest tx hash [Issue 688](https://github.com/IntersectMBO/govtool/issues/688)
- `proposal/list` allows user to search by tx hash [Issue 603](https://github.com/IntersectMBO/govtool/issues/603)
- `proposal/list` returns additional data such ass `expiryEpochNo`, `createdEpochNo`, `title`, `about`, `motivation`,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Learn more; [docs.sanchogov.tools](https://docs.sanchogov.tools/).

- [GovTool Backend](./govtool/backend/README.md)
- [GovTool Frontend](./govtool/frontend/README.md)
- [GovTool Infrastructure](./infra/)
- [GovTool Infrastructure](./infra/terraform/README.md)
- [GovTool deployment process](./scripts/govtool/README.md)
- [Documentation](./docs/)
- [Tests](./tests/)

Expand Down
Binary file added docs/architecture/Architecture diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# GovTool Software Architecture Documentation

**Valid as of: 2024-04-30**

## Overview

This documentation outlines the software architecture of the GovTool project.
GovTool is the decentralized application composed of a React frontend,
Haskell backend connected to db-sync, and a Node.js
utility backend that serves validation of the governance actions metadata.

## Frontend

# Technology Stack

- [React](https://react.dev/): The library for web user interfaces.
- [Vite](https://vitejs.dev/): The build tool for modern web development.
- [TypeScript](https://www.typescriptlang.org/): The language for static typing.
- [@mui](https://mui.com/): The library for React components.
- [react-query](https://tanstack.com/query/latest): The library for data fetching.
- [react-router](https://reactrouter.com/): The library for routing.
- [cardano-serialization-lib](https://github.com/Emurgo/cardano-serialization-lib): The library for serialization and deserialization of Cardano data structures.

# Description

Frontend is a React application using Vite as a built tool to enhance development speed and optimize production builds. Frontend interacts with the backend service via REST API and with the Cardano blockchain via cardano-serialization-lib and connected supported wallets (for the list of compatible wallets go [here](https://docs.sanchogov.tools/how-to-use-the-govtool/getting-started/get-a-compatible-wallet)).

# Components

- **Direct voter** - direct voter is a DRep which does not have a metadata and have all the ADA delegated to themselves. This component combines the registration and delegation process into one step. Direct voters are not visible in the DRep directory.
Direct voters ui components are (no specific file names are provided as they might be continuosly updated):

- Direct voter registration card - UI component visible on the dashboard allowing to navigate to the Direct voter registration form. It displays current Direct voter status and amount of ADA.
- Direct voter registration form - UI component allowing to register as a Direct voter and delegate all the ADA to themselves. Under the hood metadata anchor is mocked with provided default values.
Direct voter uses following CSL services:
- TransactionBuilder - to build the transaction
- CertificatesBuilder - to build the delegation certificate
- DrepRegistration - to build the DRep registration certificate

- **DRep** - DRep is a Decentralized Representative which has a metadata and can delegate ADA to other DReps. DRep registration and delegation are separate processes. DReps are visible in the DRep directory.

DRep ui components are (no specific file names are provided as they might be continuosly updated):

- DRep registration card - UI component visible on the dashboard allowing to navigate to the DRep registration form. It displays current DRep status and amount of ADA.
- DRep registration form - UI component allowing to register as a DRep. Under the hood metadata anchor is mocked with provided default values.
DRep uses following CSL services:
- TransactionBuilder - to build the transaction
- CertificatesBuilder - to build the DRep registration certificate
- DrepRegistration - to build the DRep registration certificate
- DrepDeregistration - to build the DRep deregistration certificate
- DrepUpdate - to build the DRep update certificate

**Note**

- Sole Voter can become a DRep by providing the metadata.
- DRep can become a Sole Voter by delegating the ADA to themselves.

- **DRep directory** - DRep directory is a list of all registered DReps. It displays DRep metadata, and amount of Voting Power. DRep directory is visible for all users. DRep directory is the part of delegation pillar.

DRep directory allows to delegate ADA to DReps. It uses following CSL services:

- Credential
- DRep
- Certificate
- VoteDelegation

- **GA Submission** - GA Submission is a form allowing to submit a Governance Action. GA Submission is the part of governance pillar. GA Submission uses following CSL services:

- TransactionBuilder - to build the transaction
- CertificatesBuilder - to build the governance action certificate
- GovernanceAction - to build the governance action certificate

Additionaly, GA Submission uses Metadata validation service to validate the metadata.

## Backend

# Technology Stack

- [Haskell](https://www.haskell.org/): An advanced, purely functional programming language.
- [cardano-node](https://github.com/IntersectMBO/cardano-node): The core component that is used to participate in a Cardano decentralised blockchain.
- [cardano-db-sync](https://github.com/IntersectMBO/cardano-db-sync): A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL.

# Description

The backend of our application is built using Haskell, a purely functional programming language known for its strong static typing, high-level abstractions, and expressive syntax.

Our backend interacts with the Cardano blockchain through two main components: `cardano-node` and `cardano-db-sync`.

# Components

- **Cardano Node**

The `cardano-node` is the core component that our backend uses to participate in the Cardano decentralized blockchain. It allows our application to create transactions, submit them to the network, and listen for new blocks and transactions.

- **Cardano DB-Sync**

The `cardano-db-sync` component follows the Cardano chain and stores blocks and transactions in a PostgreSQL database. This allows our application to query blockchain data in a structured and efficient manner.

## Application Logic

The application logic is implemented in Haskell. It handles requests from the frontend, reads from the DB-Sync, and sends responses back to the frontend.

## Data Storage

Our application uses PostgreSQL for data storage. The `cardano-db-sync` component populates the database with blockchain data, and our application logic also stores additional data as needed, such as governance actions.

## Architecture diagram

**Valid as of: 2024-06-06**
![Architecture diagram](<Architecture diagram.png>)
11 changes: 7 additions & 4 deletions govtool/backend/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

module Main where

import Control.Concurrent.QSem (newQSem)
import Control.Exception (Exception,
SomeException,
fromException, throw)
Expand Down Expand Up @@ -115,7 +116,8 @@ startApp vvaConfig = do
dRepVotingPowerCache <- newCache
dRepListCache <- newCache
networkMetricsCache <- newCache
metadataValidationCache <- newCache
proposalMetadataValidationCache <- newCache
dRepMetadataValidationCache <- newCache
return $ CacheEnv
{ proposalListCache
, getProposalCache
Expand All @@ -127,12 +129,13 @@ startApp vvaConfig = do
, dRepVotingPowerCache
, dRepListCache
, networkMetricsCache
, metadataValidationCache
, proposalMetadataValidationCache
, dRepMetadataValidationCache
}
connectionPool <- createPool (connectPostgreSQL (encodeUtf8 (dbSyncConnectionString $ getter vvaConfig))) close 1 1 60
vvaTlsManager <- newManager tlsManagerSettings

let appEnv = AppEnv {vvaConfig=vvaConfig, vvaCache=cacheEnv, vvaConnectionPool=connectionPool, vvaTlsManager}
qsem <- newQSem (metadataValidationMaxConcurrentRequests vvaConfig)
let appEnv = AppEnv {vvaConfig=vvaConfig, vvaCache=cacheEnv, vvaConnectionPool=connectionPool, vvaTlsManager, vvaMetadataQSem=qsem}
server' <- mkVVAServer appEnv
runSettings settings server'

Expand Down
3 changes: 2 additions & 1 deletion govtool/backend/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"cachedurationseconds": 20,
"sentrydsn": "https://username:[email protected]/id",
"metadatavalidationhost": "localhost",
"metadatavalidationport": 3001
"metadatavalidationport": 3001,
"metadatavalidationmaxconcurrentrequests": 10
}
Loading
Loading