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

refactor(cardano): align PParms field names with db-sync naming conventions #136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricomiles
Copy link
Contributor

@ricomiles ricomiles commented Dec 20, 2024

This PR updates the field names of the protocol parameters to align with the naming conventions used in db-sync.

Most of these changes are straightforward. However, one notable example is the max_execution_units_per_transaction parameter. In the current spec, this parameter is defined as:
ExUnits max_execution_units_per_transaction

where ExUnits is defined as:

ExUnits {
  uint64 steps = 1;
  uint64 memory = 2;
}

In db-sync, there isn’t a single field corresponding to max_execution_units_per_transaction. Instead, db-sync uses separate fields: max_tx_ex_steps and max_tx_ex_mem. To address this, we’ve chosen to rename max_execution_units_per_transaction to max_tx_ex while retaining the ExUnits type and just chaning the name from memory to mem. This approach kind of matches the naming convention in db-sync without significantly altering the spec.

An alternative would be to remove the ExUnits type entirely and define max_tx_ex_steps and max_tx_ex_mem as separate fields. However, this would be a more substantial change to the structure.

This also applies to the following parameters:

  • max_execution_units_per_block
  • prices

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.

1 participant