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

Fix data types for chain id columns #1707

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ftocal
Copy link
Collaborator

@ftocal ftocal commented Sep 18, 2024

No description provided.

Co-authored-by: walker-16 <agpazos85@gmail.com>
@ftocal ftocal merged commit 9ed5b18 into feature/wormholescan_db_migration Sep 18, 2024
1 check passed
@ftocal ftocal deleted the fix-db-types branch September 18, 2024 14:11
ftocal added a commit that referenced this pull request Sep 20, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Sep 27, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
walker-16 added a commit that referenced this pull request Oct 7, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Oct 14, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Oct 21, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Oct 31, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Nov 6, 2024
Co-authored-by: walker-16 <agpazos85@gmail.com>
ftocal added a commit that referenced this pull request Nov 8, 2024
* Add new database abstraction in common

* fly - migrate observations to postgres

* fly - migrate vaas and governor status to postgres

* Feature/wormholescan db migration fly (#1557)

* fly - add event dispatcher for vaa-pipeline

* Add to repository on conflict behaviour to queries

* Add observations and vaas metrics to repository

* add support to vaa pythnet table

* Add new postgres repository for guardian set in common

* add common method to exec and scan

* add query log

* fly - add event dispatacher for governor config message

* update migration.sql file

* fix inserted flag issue, add metrics and event dispatcher for vaas and governor config

* Add comment to pgx cmdTag bug and workaround for this cases

* update pipeline vaa event & migration

* Add in fly-event-processor support to governor config chain

* Add in fly-event-processor governor_status postgres repository

* Fix table wh_governor_config_chains

* fix governor config chain flow

* fly-event-processor - fix governor config flow

* Add health for postgres in common

* add dummy governor status processor and refactor run and build

* Add comment in fly-event-processor

* Add support to duplicate vaa flow in the migration

* refactor fly

* refactor main.go

* wip: guardian set repository

* fix healthcheck in fly mongo/postgres

* fly - remove/add comments to postgres respository

* fly - rename env var VAA_PIPELINE_SNS_URL

* common - add comment and remove unused code

* fly-event-processor - fix comments

* fly - renames and add comments

* fix postgres guardian set

* fix vaa processing

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>

* add pub/sub redis spy and fix duplicate vaa (#1585)

* Add deploy to support fly in postgres mode as repository (#1593)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* [1551] tx-tracker db migration (#1556)

* Add new database abstraction in common

* fly - migrate observations to postgres

* fly - migrate vaas and governor status to postgres

* add new postreSQL repository to also write to the new db

* add postresql_repository.go

* undo unwanted renames in pipeline component

* undo unwanted renames in pipeline component

* add upsetOriginTx

* add upsert-target-tx

* change constructor and add missing parameter

* upsert-origin-tx tested locally

* add to fly/migration.sql the creation of wh_operation-_transactions

* working insert in postgres for messages coming from pipeline-sqs and from notifications-sqs

* add missing config

* more changes

* more changes

* add missing id

* add run configuration

* add fallback and consider wormchain

* small change

* move vaaRepository to a separate package in order to fix the import cycle

* working for wormchain

* remove comment

* now working both wormchain and with fallback

* remove some comments

* fix digest in mongodb

* revert wrong resolve conflict from merge

* adjust logic  for checking if it has to update or not

* rename repository to clarify

* fix indent

* code-review fixes

* change to runMode

* multiple changes

* add unit-test to AlreadyProcessed for sourceTx

* more fixes

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>

* Add deploy to support fly-event-processor in postgres mode as repository (#1595)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* add postgres storage in analytics (#1590)

* Feature/wormholescan db migration parser (#1584)

add postgres support to parser component

* [1548] Migration of pipeline component to use postresql (#1570)

* Add new database abstraction in common

* fly - migrate observations to postgres

* fly - migrate vaas and governor status to postgres

* fly - add event dispatcher for vaa-pipeline

* Add to repository on conflict behaviour to queries

* Add observations and vaas metrics to repository

* add support to vaa pythnet table

* Add new postgres repository for guardian set in common

* add common method to exec and scan

* add query log

* fly - add event dispatacher for governor config message

* update migration.sql file

* fix inserted flag issue, add metrics and event dispatcher for vaas and governor config

* Add comment to pgx cmdTag bug and workaround for this cases

* update pipeline vaa event & migration

* Add in fly-event-processor support to governor config chain

* Add in fly-event-processor governor_status postgres repository

* Fix table wh_governor_config_chains

* fix governor config chain flow

* fly-event-processor - fix governor config flow

* Add health for postgres in common

* add dummy governor status processor and refactor run and build

* Add comment in fly-event-processor

* migration of pipeline component

* finish full test

* fix broken merge

* add missing implementation

* small changes

* change condition

* add unit-test to pipeline

* add missing Close()

* fix unit-test

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>

* Feature/modify parser deploy migration db (#1602)

* modify postgres db schemma to wormholescan

* add db_layer env var and modify parser

* add env db and db log enabled to parser deploy

* add to tx-tracker deploy support to postgresdb (#1601)

* add db_layer env support in tx-tracker deploy

* rename postgresdb schemma to wormholescan

* add db_log_enabled and db to tx-tracker deploy

* add deploy to pipeline-postgres component (#1596)

* add deploy to pipeline-postgres component

* fix pipeline-postgres deploy config

* modify db schemma in pipeline component

* fix healthcheck and change env to DB_LAYER

* Add deploy to support analytics in postgres mode as repository (#1595) (#1603)

* Feature/fix fly event processor (#1604)

* fly-event-processor improve SELECT queries

* fly-event-processor add ctx to postgres repository rallback method

* handle on conflict insert governor status

* Fix parser tx tracker deployment (#1606)

Fix parser and tx-tracker deployment

Co-authored-by: walker-16 <agpazos85@gmail.com>

* add job to remove old pyth in postgres (#1610)

* 1607 db migration - fix error found in integration (#1608)

* move logger error to debug in tx-tracker

* add vaaID in event that is send to the pipeline from the fly

Co-authored-by: ftocal <fert1335@gmail.com>

* fix communication between fly - pipeline and pipeline components

Co-authored-by: ftocal <fert1335@gmail.com>

* fix and refactor tx-tracker

Co-authored-by: ftocal <fert1335@gmail.com>

* Fix Makefile build for ci/cd

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Fixes in the communication between fly and pipeline
Fixes and improvements in message processing in tx-tracker

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Add db layer configurable by environment

---------

Co-authored-by: ftocal <fert1335@gmail.com>

* Fixes for pipeline deploy

* Modify fly, jobs and pipeline deployment (#1617)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Add relays table for postgres migration (#1620)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Update go.mod and Dockerfile

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Fix wrong rebase

* Feature/add fixes and metrics wormholescan postgres (#1678)

* common - add consistency level to repository

* fly-event-processor - add consistenct level to repository

* fly - add consistency level to repository

* parser - add consistency level to repository

* fly - change serviceName metrics from postgres db layer mode

* fly-event-processor modify duplicated vaa metrics to suppport db layer

* fly-event-processor modify governor status metrics to support db layer

* parser - add support to db layer in postgres metrics

* analytics - add metrics to truck insert in transferPrices

* improve analytics, fly-event-processor, parser metrics

* Fixes in tx tracker (#1683)

* Change vaa_id to message_id column name in wh_attestation_vaa_properties, wh_operation_transactions and wh_operation_prices tables
Modify primary key in wh_operation_transactions to support compose protocols
Remove 0x prefix from and to address in wh_operation_transactions table
Add fee detail as json column in wh_operation_transactions table
Fix rpc_response column in wh_operation_transactions table

* Fix attestation_vaas_id for target transaction

* Normalization of from and to in target transactions for wh_operation_transactions table

* add metrics to verify insert in mongo and postgres repository

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>

* Update go dependencies (#1685)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* tx-tracker fix error deleting message from SQS (#1698)

Co-authored-by: ftocal <fert1335@gmail.com>

* fix fee-detail postgres repository (#1700)

* Fix data types for chain id columns (#1707)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* fix operation_transaction block_number (#1712)

Co-authored-by: ftocal <fert1335@gmail.com>

* fix destination block_number (#1713)

* Add missing indexes for postgres (#1716)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Change to dual db type (#1717)

* Change to dual db type
Change total_token data type in postgres table

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Change wh_operation_transactions_processed table definition

Co-authored-by: walker-16 <agpazos85@gmail.com>

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>

* add tx type nested-source-tx in operation-transaction (#1728)

* fix parser normalize address (#1733)

* Fix json names in governor status (#1735)

* 1660 api migration (#1750)

* Migrate vaas endpoints
Migrate observation endpoints
Migrate relays endpoints

Co-authored-by: walker-16 <agpazos85@gmail.com>

* fix timestamp in vaa endpoint response (#1739)

* Migrate governor limit endpoint (#1743)

* Migrate governor status endpoints (#1744)

* Feature/1660 api migration governor config (#1745)

* fly - add to wh_governor_config json field chains

* wip

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>

* fix tx-tracker controller process (#1736)

* Add endpoints migration to use new db (#1766)

* Migrate ready and health endpoints (#1753)

* add address endpoint in postgres (#1754)

* Migrate scorecards endpoint (#1756)

* Normalize aptos address (#1757)

* Add payload_type column in wh_attestation_vaa_properties table (#1758)

* normalize from and to address for targer txs (#1761)

* Feature/migration global tx postgres (#1760)

* add support to globalTx endpoint with postgres

* add denormalized txHash and address methods by chain

* vaa endpoint migration add pyth and fix (#1764)

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Migrate endpoints with postgres datasource (#1792)

* Migration of endpoint /governor/notional/limit to postgres (#1769)

migration /governor/notional/limit to postgres

* migrate governor notional limit by chainID

* adapt governor-notional-limit-by-chain-id mongo entity

* Feature/ws 2 add support wh operation table (#1768)

* modify db migration add wh_operation_addresses table

* insert destination address in wh_operation_addresses table

* modify tx-tracker to support insert source operation address

* migrate /governor/notional/available/:chainId to postresql (#1775)

* migrate /governor/notional/available/:chainId to postresql

* add order by

* fix identation

* migrate governor-notional-available (#1778)

migratae governor-notional-available

* Migrate operations and transactions endpoints (#1785)

* Migrate operations by id endpoint

Co-authored-by: walker-16 <agpazos85@gmail.com>

* migrate find transaction by id

* Migration of operation search endpoint by txHash, address, source chains, destination chains and app ids

* Improve postgres queries for operations endpoint

Co-authored-by: walker-16 <agpazos85@gmail.com>

* fix transaction by id migration (#1782)

* Changes indexes to improve performace
Separate find operations in two sql queries

Co-authored-by: walker-16 <agpazos85@gmail.com>

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Migrate governor notional max available (#1780)

* migrate governor-notional-max_available

* remove unused types

* readjust types

* adjust types contemplating mongodb

* migrate /governor/enqueued-vaas (#1787)

* migrate /governor/enqueued-vaas

* fix identation

* migrate /governor/enqueues_vaas/:chainID

* fix identation

* migrate governor-vaa endpoint to postgres (#1788)

* Migration of transactions search endpoint (#1790)

---------

Co-authored-by: Mariano <9205080+marianososto@users.noreply.github.com>
Co-authored-by: Mariano <sostomariano@gmail.com>
Co-authored-by: walker-16 <agpazos85@gmail.com>

* fly - modify groupID send governor status notification (#1795)

Co-authored-by: ftocal <fert1335@gmail.com>

* Deploy api enpoints (#1796)

* Remove unused config map key

Co-authored-by: ftocal <fert1335@gmail.com>

* Add postgres config for api deployment

Co-authored-by: walker-16 <agpazos85@gmail.com>

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>

* tx-tracker fix handler error solana/aptos postgres (#1797)

Co-authored-by: ftocal <fert1335@gmail.com>

* feature/fix_delete_guardian_governor_vaa (#1800)

* Add timestamp filter in operations endpoint (#1799)

* Testing and performance check for api with postgresql (#1809)

* Fix sql query for operations endpoint

* Fix vaa_id column name to message_id in pipeline

* Fix id on conflict for wh_operation_transactions insertion

* fix wh_governor_config update column chains

* normalize tx_hash when fetch tx details fail (#1807)

* Add source_event and track_id_event columns to source event tracking (#1808)

Add source_event and track_id_event columns to source event tracking in analytics, parser, pipeline and tx-tracker processing
Improve column and table names

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>

* normalize and denormalize txHash/address (#1810) (#1815)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Feature/migrate guardian endpoints (#1802)

* migrate /v1/governor/available_notional_by_chain

* governor

* adapt grpc controller

* fix db annotations

* fix identation

* migrate /governor/enqueued_vaas

* migrate governor/is_vaa_enqueued

* migrate governor/token_list

* migrate /guardianset/current

* migrate /v1/heartbeats

* adjust endpoint /v1/signed_vaa/:chain_id/:emitter/:seq

* small change

* fix fly event processor governor vaa delete (#1817)

* deprecated vaa-count endpoint in postgres migration (#1818)

* fix governor config by address endpoint migration postgres (#1820)

* migration postgres - fix governor notional limit query (#1824)

* postgres migration - fix governor available notional endpoint (#1826)

* postgres migration - fix governor available notional endpoint

* fix governor notional by chain endpoint

* fix max notional available by chain endpoint migration

* fix enqueued vaa endpoint list and filter by chain

* fix max notional endpoint

* migration - fill fromChainID with vaa emitterChain if the vaa can not… (#1830)

migration - fill fromChainID with vaa emitterChain if the vaa can not be parsed.

* fix guardian-api get last heartbeats - postgres migration (#1828)

* fix guardian-api get last heartbeats - postgres migration

* postgres migration - fix is vaa enqueued and get enqueued vaa endpoint

* turn off cache to check postgres queries

* turning on cache

* fix guardian-api endpoint fix available notional by chain

* fix get token list endpoint - migration

* fix missing fields in heartbeat endpoint migration

* fix guardian-api heartbeats response - migration (#1833)

* Feature/wormholescan db migration fix key enqueued vaa (#1838)

* Add missing error not found check in governor endpoints

* fix governor_status enqueued vaa response format

* Normalization of tx hash and address for aptos. (#1837)

* Normalization of address for sui (#1839)

* Normalization of tx hash for cosmos blockchains (#1841)

Fix from address in pipeline for postgres

Co-authored-by: walker-16 <agpazos85@gmail.com>

* api - handle distinct api key for postgres migration (#1843)

* api - handle distinct api key for postgres migration

* fix governor notional limit by chain_id

* Add end line missing

* add missing logger (#1845)

add missing logger

* Fix in parser backfiller for mongo and postgres mode (#1846)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* api - add check before use jsonb_array_elements in governor queries (#1844)

* api migration - set usePostgres to false for web grpc api (#1847)

Co-authored-by: ftocal <fert1335@gmail.com>

* Add normalization of near address and tests (#1848)

Co-authored-by: walker-16 <agpazos85@gmail.com>

* api - migration fix filter target-tx from join (#1849)

* Fix api deployment for mayan endpoint

* Fix api test

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
Co-authored-by: Mariano <9205080+marianososto@users.noreply.github.com>
Co-authored-by: Mariano <sostomariano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants