Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
43736a5
nix frontend: fix yarn install w/ node_nixpkgs bump
johnalotoski Oct 18, 2024
6eb999a
nix frontend: fix yarn build fail in nix build
johnalotoski Oct 18, 2024
92a87f8
nix backend: fix nix build
johnalotoski Oct 18, 2024
9ee5650
nix backend: fix nix impure builds
johnalotoski Oct 18, 2024
233b35c
chore: bump node version
Ryun1 Oct 22, 2024
a47322c
chore: bump cardano-db-sync version
MSzalowski Oct 30, 2024
aa8d6a6
Merge pull request #2195 from IntersectMBO/node-10.1.0-pre
MSzalowski Nov 8, 2024
4f87f70
fix(#1845): fix submitting guardrail related governance actions
MSzalowski Aug 28, 2024
a1e05ac
fix(#1845): set guardrail script network related
MSzalowski Nov 10, 2024
001092a
Merge pull request #2279 from IntersectMBO/fix/1845-cannot-submit-tre…
MSzalowski Nov 10, 2024
6b3184f
fix: remove unneeded login step on workflow action
Ryun1 Nov 7, 2024
892037f
fix: add new issues to project workflow
Ryun1 Nov 8, 2024
ccdc17e
Merge pull request #2347 from IntersectMBO/2277-fix-failing-action
Ryun1 Nov 11, 2024
e457a9c
fix: incorrect org labelling for action
Ryun1 Nov 11, 2024
e93992c
Merge pull request #2361 from IntersectMBO/fix-action-add-issue-to-pr…
Ryun1 Nov 11, 2024
e17701d
feat(#2316): hide vote totals for the particular governance actions
MSzalowski Nov 12, 2024
34498cd
feat: update configuration to support running tests on different netw…
kneerose Nov 14, 2024
f7f222b
Merge pull request #2369 from IntersectMBO/feat/support-test-differen…
kneerose Nov 14, 2024
628b78a
Merge pull request #2363 from IntersectMBO/feat/2316-hide-vote-totals…
MSzalowski Nov 15, 2024
44c2d9d
feat: add support for the rest of the Governance Actions
MSzalowski Nov 13, 2024
d113332
Merge pull request #2373 from IntersectMBO/feat/1597-rendering-motion…
MSzalowski Nov 15, 2024
349a4ba
chore: bump pdf-ui to v0.4.1
MSzalowski Nov 15, 2024
8fb4e5e
fix(#1960): make calculation of the DRep voting power on the backend
MSzalowski Nov 15, 2024
e8adcb9
feat(#1616): add support for ipfs in metadata validation service
MSzalowski Nov 15, 2024
a12a948
chore: add ipfs properties to instrastructure config
MSzalowski Nov 15, 2024
80feda9
Use valid metadata and withdrawal return account in gov-action bulk l…
reeshavacharya Nov 18, 2024
f91006f
Update stake address on update committee action
reeshavacharya Nov 18, 2024
1b279a4
Merge pull request #2375 from IntersectMBO/chore/bump-pdf-ui-to-0.4.1
MSzalowski Nov 18, 2024
1d96a73
Merge pull request #2376 from IntersectMBO/fix/1960--drep-details-not…
MSzalowski Nov 18, 2024
ac6ba3d
Merge pull request #2377 from IntersectMBO/feat/1616-support-ipfs-in-…
MSzalowski Nov 18, 2024
7eda954
feat(#1600): add support for list of withdrawals in treasury gov action
MSzalowski Nov 18, 2024
febc141
Merge pull request #2381 from IntersectMBO/feat/1602-rendering-treasu…
MSzalowski Nov 18, 2024
9359580
chore(#2310): bump cardano node (10.1.2) and cardano-db-sync (13.6.0.1)
MSzalowski Nov 12, 2024
9c17879
Merge pull request #2364 from IntersectMBO/chore/2310-bump-dbsync-to-…
MSzalowski Nov 18, 2024
1221e35
chore: bump GovTool to v1.0.27
MSzalowski Nov 18, 2024
6eab301
Merge pull request #2184 from johnalotoski/jl/2024-10-nix-fixups
placek Nov 18, 2024
42da931
Merge pull request #2382 from IntersectMBO/chore/bump-govtool-to-v1.0.27
MSzalowski Nov 18, 2024
377d43b
Merge pull request #2380 from reeshavacharya/fix/valid-metadata
mesudip Nov 19, 2024
013891d
Merge pull request #2383 from IntersectMBO/develop
MSzalowski Nov 19, 2024
ce87cc8
chore: update GovTool-v1.0.27 release date
MSzalowski Nov 19, 2024
f110a6b
Merge pull request #2386 from IntersectMBO/chore/1.0.27-update-releas…
MSzalowski Nov 19, 2024
03e31e3
Merge pull request #2387 from IntersectMBO/develop
MSzalowski Nov 19, 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
36 changes: 15 additions & 21 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
name: Add Issue to Projects
name: Add all issues created to projects

on:
issues:
types: [opened]

jobs:
add-to-projects:
add-to-govtool-all-project:
name: Add issue to GovTool all project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/IntersectMBO/projects/30
github-token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT }}

- name: Install GitHub CLI
run: sudo apt-get install gh

- name: Authenticate GitHub CLI with default token
run: gh auth login --with-token <<< "$GITHUB_TOKEN"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Add issue to GovTool Project
run: gh project item-add IntersectMBO/30 --content-type Issue --content-id ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Add issue to Community Backlog Project
run: gh project item-add IntersectMBO/34 --content-type Issue --content-id ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
add-to-community-backlog-project:
name: Add issue to governance tools community backlog project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/IntersectMBO/projects/34
github-token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT }}
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 @@ -60,6 +60,8 @@ jobs:
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
IPFS_GATEWAY: ${{ secrets.IPFS_GATEWAY }}
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
PDF_API_URL: ${{ secrets.PDF_API_URL }}
IPFS_GATEWAY: ${{ secrets.IPFS_GATEWAY }}
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
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 @@ -63,6 +63,8 @@ jobs:
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'true' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
IPFS_GATEWAY: ${{ secrets.IPFS_GATEWAY }}
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
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 @@ -63,6 +63,8 @@ jobs:
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'true' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
IPFS_GATEWAY: ${{ secrets.IPFS_GATEWAY }}
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test_integration_playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- "sanchogov.tools"
- "staging.govtool.byron.network"
- "govtool.cardanoapi.io"
- "preview.gov.tools"

workflow_run:
workflows: ["Build and deploy GovTool to TEST server"]
Expand Down Expand Up @@ -79,6 +80,8 @@ jobs:
KUBER_API_KEY: ${{secrets.KUBER_API_KEY}}
TEST_WORKERS: ${{vars.TEST_WORKERS}}
CI: ${{vars.CI}}
NETWORK: ${{vars.NETWORK}}
FAUCET_ADDRESS: ${{vars.FAUCET_ADDRESS}}
CARDANOAPI_METADATA_URL: ${{vars.CARDANOAPI_METADATA_URL}}

publish-report:
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@ changes.

-

## [v1.0.27](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.27) 2024-11-19

### Added

- Handle displaying votes based on bootstrap phase, full governance and security groups [Issue 2316](https://github.com/IntersectMBO/govtool/issues/2316)
- Add support for displaying Motion of No Confidence Governance Action [Issue 1597](https://github.com/IntersectMBO/govtool/issues/1597)
- Add support for displaying Update committee/threshold Governance Action [Issue 1598](https://github.com/IntersectMBO/govtool/issues/1598)
- Add support for displaying New Constitution and/or Guardrails Script Governance Action [Issue 1599](https://github.com/IntersectMBO/govtool/issues/1598)
- Add support for ipfs in metadata validation service [Issue 1616](https://github.com/IntersectMBO/govtool/issues/1616)
- Add support for displaying array of treasury withdrawals [Issue 1602](https://github.com/IntersectMBO/govtool/issues/1602)

### Fixed

- Fix submitting treasury governance action [Issue 1845](https://github.com/IntersectMBO/govtool/issues/1845)
- Fix failing github action workflow [Issue 2277](https://github.com/IntersectMBO/govtool/issues/2277)

### Changed

- Bumped Cardano node version to `10.1.2`.
- Bumped Cardano DB Sync version to `13.6.0.1`.
- Make calculation of a DRep voting power on the backend [Issue 1960](https://github.com/IntersectMBO/govtool/issues/1960)

### Removed

-

## [v1.0.26](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.26) 2024-11-07

### Added
Expand Down
6 changes: 2 additions & 4 deletions docs/GOVERNANCE_ACTION_SUBMISSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ interface InfoProps {
interface TreasuryProps {
amount: string;
hash: string;
receivingAddress: string;
url: string;
withdrawals: { receivingAddress: string; amount: string }[];
}

type ProtocolParamsUpdate = {
Expand Down Expand Up @@ -184,8 +183,7 @@ const { buildTreasuryGovernanceAction } = useCardano();
const govActionBuilder = await buildTreasuryGovernanceAction({
hash,
url,
amount,
receivingAddress,
withdrawals: [{ amount, receivingAddress }],
});

// Protocol Parameter Change Governance Action
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "GovTool and utilities monorepo.";
inputs = {
default_nixpkgs.url = "github:nixos/nixpkgs/c9ece0059f42e0ab53ac870104ca4049df41b133";
node_nixpkgs.url = "github:nixos/nixpkgs/9957cd48326fe8dbd52fdc50dd2502307f188b0d";
node_nixpkgs.url = "github:nixos/nixpkgs/23aa9e2f958310c69a94d21f6523240841a02d58";
flake-utils.url = "github:numtide/flake-utils";
nix-inclusive.url = "github:input-output-hk/nix-inclusive";
};
Expand Down
8 changes: 4 additions & 4 deletions gov-action-loader/backend/app/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def get_base_proposal():
def get_base_proposal_for_multiple():
base_proposal = get_base_proposal()
base_proposal["anchor"] = {
"url": "http://bit.ly/3QFMhii",
"dataHash": "1111111111111111111111111111111111111111111111111111111111111112",
"url": "https://metadata-govtool.cardanoapi.io/data/gov-action-loader",
"dataHash": "bcb2fadedbe928519ff000051d8e78ffcabadba0f92b91334cee3e8786491462",
}
base_proposal["deposit"] = default_proposal_deposit_ada * 1000000
return base_proposal
Expand Down Expand Up @@ -69,7 +69,7 @@ def generate_bytes(length):


def generate_withdraw(number):
stake_addresses = [generate_raw_address() for _ in range(number)]
stake_addresses = ["e02fe0d8c1b1c600249e8b9663e18790425e9589ac17cb5ee952d54bee"]
amounts = [
random.choice([10000000, 20000000, 30000000, 40000000, 50000000])
for _ in range(number)
Expand All @@ -78,7 +78,7 @@ def generate_withdraw(number):


def generate_update(number):
stake_addresses = [generate_raw_address() for _ in range(number)]
stake_addresses = ["e02fe0d8c1b1c600249e8b9663e18790425e9589ac17cb5ee952d54bee"]
current_epoch = int((int(time.time()) - 1506635071) / (5 * 24 * 60 * 60))
maximum_epoch = 10000
epochs = [random.randint(current_epoch + 2, maximum_epoch) for _ in range(number)]
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.26/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.27/x/vva-be/build/vva-be/vva-be /usr/local/bin
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.26/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.27/x/vva-be/build/vva-be/vva-be /usr/local/bin

# Expose the necessary port
EXPOSE 9876
Expand Down
4 changes: 2 additions & 2 deletions govtool/backend/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ startApp vvaConfig = do
settings =
setPort vvaPort
$ setHost vvaHost
$ setTimeout 60 -- 60 seconds timeout
$ setTimeout 120 -- 120 seconds timeout
$ setBeforeMainLoop
( Text.hPutStrLn stderr $
Text.pack
Expand Down Expand Up @@ -117,7 +117,7 @@ startApp vvaConfig = do
, dRepListCache
, networkMetricsCache
}
connectionPool <- createPool (connectPostgreSQL (encodeUtf8 (dbSyncConnectionString $ getter vvaConfig))) close 1 1 60
connectionPool <- createPool (connectPostgreSQL (encodeUtf8 (dbSyncConnectionString $ getter vvaConfig))) close 10 10 120
let appEnv = AppEnv {vvaConfig=vvaConfig, vvaCache=cacheEnv, vvaConnectionPool=connectionPool }
server' <- mkVVAServer appEnv
runSettings settings server'
Expand Down
7 changes: 3 additions & 4 deletions govtool/backend/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> { }, incl }:
{ pkgs ? import <nixpkgs> { }, incl, returnShellEnv ? null }:
let
inherit (pkgs.lib.trivial) pipe;
inherit (pkgs) haskell;
Expand All @@ -21,17 +21,16 @@ let

modifier = drv: pipe drv [ appendLibraries appendTools ];

project = ghcPackages.developPackage {
project = ghcPackages.developPackage ({
root = incl ./. [
./vva-be.cabal
./app
./src
./CHANGELOG.md
./sql
];
modifier = modifier;
overrides = self: super: { openapi3 = useBroken super.openapi3; };
};
} // pkgs.lib.optionalAttrs (returnShellEnv != null) { inherit returnShellEnv; });
in project.overrideAttrs (oldAttrs: {
shellHook = ''
function warn() { tput setaf $2; echo "$1"; tput sgr0; }
Expand Down
24 changes: 12 additions & 12 deletions govtool/backend/example-config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"dbsyncconfig" : {
"host" : "localhost",
"dbname" : "cexplorer",
"user" : "postgres",
"password" : "postgres",
"port" : 5432
},
"port" : 9999,
"host" : "localhost",
"cachedurationseconds": 20,
"sentrydsn": "https://username:[email protected]/id",
"sentryenv": "dev"
"dbsyncconfig" : {
"host" : "localhost",
"dbname" : "cexplorer",
"user" : "postgres",
"password" : "postgres",
"port" : 5432
},
"port" : 9999,
"host" : "localhost",
"cachedurationseconds": 20,
"sentrydsn": "https://username:[email protected]/id",
"sentryenv": "dev"
}
13 changes: 6 additions & 7 deletions govtool/backend/sql/get-voting-power.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
select coalesce(drep_distr.amount, 0) as amount
from drep_hash
left join drep_distr
on drep_hash.id = drep_distr.hash_id
where drep_hash.raw = decode(?,'hex')
order by epoch_no desc
limit 1
select sum(uv.value) as amount
from utxo_view uv
join delegation_vote dv on uv.stake_address_id = dv.addr_id
join drep_hash dh on dv.drep_hash_id = dh.id
where dh.raw = decode(?,'hex')
and dv.cert_index != 0
Loading
Loading