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
Introduce a separate Address table #1396
base: master
Are you sure you want to change the base?
Conversation
7f636d5
to
0427468
Compare
EXECUTE 'ALTER TABLE "tx_out" DROP COLUMN "address_raw"' ; | ||
EXECUTE 'ALTER TABLE "tx_out" DROP COLUMN "address_has_script"' ; | ||
EXECUTE 'ALTER TABLE "tx_out" DROP COLUMN "payment_cred"' ; | ||
EXECUTE 'CREATe TABLE "address"("id" SERIAL8 PRIMARY KEY UNIQUE,"address" VARCHAR NOT NULL,"address_raw" BYTEA NOT NULL,"has_script" BOOLEAN NOT NULL,"payment_cred" hash28type NULL)' ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this table have an additional field inserted (stake_address_id
)? Useful to filter used addresses contributing towards a stake.
Absence of this field would require querying tx_out
table and then doing a [distinct] fetch on address_id
together
Is this and/or should this MR also take into account Also, i don't know if it's possible to have an Not really familiar with collaterals, i would say it is possible since a collateral output can be sent to any account (assumption), and at the same time a collateral must have a |
@kderme - are there plans for this PR to progress to an upcoming release? would be nice to get an insight around any blockers for this one *The updated size difference with tx_out on mainnet is 89GB vs [37GB for tx_out + 14GB for new address table]GB respectively for structure below (where address_id is against an index for seperate table where address, address_has_script, payment_cred were moved in DB leaving leftover indexes as-is):
vs
|
Description
Fixes #1333
Checklist
fourmolu
(which can be run withscripts/fourmolize.sh
Migrations
If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.