Skip to content

Commit

Permalink
Merge pull request #2704 from IntersectMBO/staging
Browse files Browse the repository at this point in the history
GovTool - v2.0.8
  • Loading branch information
MSzalowski authored Jan 23, 2025
2 parents cd8554a + c9d05d7 commit 9b0f347
Show file tree
Hide file tree
Showing 34 changed files with 353 additions and 288 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ changes.

-

## [v2.0.8](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.8) 2025-01-23

### Added

- Add share DRep button to every DRep instead of only our own [Issue 2686](https://github.com/IntersectMBO/govtool/issues/2686)
- Show metadata anchor in Governance Action Details [Issue 2178](https://github.com/IntersectMBO/govtool/issues/2178)
- Handle unexpected drep info query result [Issue 2676](https://github.com/IntersectMBO/govtool/issues/2676)

### Fixed

- Fix usage of trim on missing label
- Fix blank screen when registering as a DRep [Issue 2408](https://github.com/IntersectMBO/govtool/issues/2408)

### Changed

- Bump cardano-node to 10.1.4
- Make CIP-129 governance identifiers the default ones

### Removed

- Remove logging to sentry for DRep registration transaction [Issue 2681](https://github.com/IntersectMBO/govtool/issues/2681)
- Remove logging to sentry when delegation transaction fails [Issue 2682](https://github.com/IntersectMBO/govtool/issues/2682)

## [v2.0.7](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.7) 2025-01-20

### Added
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-2.0.7/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-2.0.8/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-2.0.7/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-2.0.8/x/vva-be/build/vva-be/vva-be /usr/local/bin

# Expose the necessary port
EXPOSE 9876
Expand Down
1 change: 1 addition & 0 deletions govtool/backend/sql/get-drep-info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,4 @@ FROM
CROSS JOIN IsScriptHash
LEFT JOIN off_chain_vote_data ON off_chain_vote_data.voting_anchor_id = LatestRegistrationEntry.voting_anchor_id
LEFT JOIN off_chain_vote_drep_data ON off_chain_vote_drep_data.off_chain_vote_data_id = off_chain_vote_data.id
LIMIT 1
49 changes: 8 additions & 41 deletions govtool/backend/sql/get-stake-key-voting-power.sql
Original file line number Diff line number Diff line change
@@ -1,46 +1,13 @@
WITH RewardRest AS (
SELECT
SUM(amount) AS amount,
addr_id
FROM
reward_rest
GROUP BY
addr_id
),
Reward AS (
SELECT
SUM(amount) AS amount,
addr_id
FROM
reward
GROUP BY
addr_id
),
Balance AS (
SELECT
COALESCE(SUM(uv.value), 0) AS amount,
sa.id AS addr_id,
encode(sa.hash_raw, 'hex') AS addr_raw
FROM
stake_address sa
JOIN utxo_view uv ON uv.stake_address_id = sa.id
GROUP BY
addr_id,
addr_raw
)
SELECT
(COALESCE(rr.amount, 0) + COALESCE(r.amount, 0) + COALESCE(b.amount, 0)) AS total_balance,
b.addr_raw
COALESCE(SUM(tx_out.value), 0) AS voting_power,
stake_address.id as addr_id
FROM
Balance b
stake_address
JOIN
tx_out on tx_out.stake_address_id = stake_address.id
LEFT JOIN
RewardRest rr ON rr.addr_id = b.addr_id
LEFT JOIN
Reward r ON r.addr_id = rr.addr_id
tx_in ON tx_in.tx_out_id = tx_out.id AND tx_in.tx_out_index = tx_out.index
WHERE
b.addr_id = (SELECT id FROM stake_address WHERE hash_raw = decode(?, 'hex'))
stake_address.hash_raw = decode(?, 'hex') AND tx_in.id IS NULL
GROUP BY
b.addr_raw,
rr.amount,
r.amount,
b.amount
stake_address.id;
Loading

0 comments on commit 9b0f347

Please sign in to comment.