-
Notifications
You must be signed in to change notification settings - Fork 162
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
Next hard fork support #1081
Comments
For unit tests db-sync can have similar tests to this IntersectMBO/cardano-ledger#2471 |
Is there not some way to make tests as era independent as possible? |
Most things don't depend on the era. However the tx constructors in One idea is to have a function |
HF integration progress
Cardano.DbSync.Era.Shelley.Generic.Tx
module into module per era. Make getters top level so that they can be reused for next epochs and resuce duplication.Alonzo.resolveRedeemers
logic so that it can be reused for Babbage.Generic.Tx
fields for Babbage TxBodyExpected changes (for qa, downstream components)
Schema changes:
Changes documented in schema table (search for
New in v13
to see changes). Not all changes for version 13.0.0 are annotated, only the ones related to Babbage :https://gist.github.com/kderme/cfd1f3f4d5147687ab8d2078cba5a69a
Schema changes from postgres raw commands:
vasil-hf.txt
Inline datums (CIP-32)
Outputs with an inline datum will have its hash in the
tx_out.data_hash
field and the datum will be included in thedatum
table. A new field is addedtx_out.inline_datum_id
which references inlinedatum
.Reference Scripts (CIP-33)
Reference scripts found in outputs will be inserted in the
script
table. Their hash will be used by redeemers or script outputs normally as any other script. A new field is addedtx_out.reference_script_id
which referencesscript
.Collateral return (CIP-40)
A new table
collateral_output
will be introduced, with the same schema astx_out
. In case of a phase 2 failure of the tx, thetx_out
table will contain thecollateral_output
instead of the normal outputs.datum
table split in 2 tables (fix of existing issue/misnomer)A new table
redeemer_data
will be created with exactly the same schema asdatum
. It will contain the redeemer data and each entry will be referenced by at least oneredeemer.redeemer_data_id
(field will also be renamed fromredeemer.datum
). This is a fix of an existing problematic situation, since the current tabledatum
contains 2 different things.Reference inputs (CIP-31)
A new table
tx_in_reference
which has the same schema astx_in
. The table just shows that a tx has some reference inputs.Fees
When there is a phase 2 failure,
tx.fee
needs to equal the difference ofoutput
s andinput
s, which will be the collateral.Praos header
It seems the
block
table will not change, since it's not affected by the header blcock changes. We never extracted theblock nonce
for TPraos block anyway.Params
epoch_param.entropy
is renamed toepoch_param.extra_entropy
(which is a more proper name anyway). For Babbage era it will always be Null.epoch_param.decentralisation
will be fixed to 0.param_proposal.entropy
andparam_proposal.decentralisation
are fixed to null.How to details (for developers)
Inline datums (CIP-32)
Inline datums need to be extracted from such outputs, inserted in a new field in Generic.TxOut and
insertDatum
needs to be called for them.Reference Scripts (CIP-33)
Reference scripts need to be extracted from such outputs, inserted in a new field in Generic.TxOut and
insertScript
needs to be called for them.Reference inputs
We don't need to resolve reference inputs, because the scripts it references has already been inserted in thefindScriptHash
needs to be extended to resolve reference inputs. It's not still clear in specs how this will work.script
table from a previous tx. Also the script hash is resolved with the already used way (through the redeemers ptrs) and not through the reference inputCollateral return (CIP-40)
Collateral outputs come from
_collateralReturn
field.Fees
Fees can be taken from the
txcoll
field.Praos header
We need to extract from praos block header the same data as we do from the tpraos header.
The text was updated successfully, but these errors were encountered: