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

Dynamic Fees - Codec upgrades for dynamic fees - TO BE CLOSED #2629

Closed

Conversation

abi87
Copy link
Contributor

@abi87 abi87 commented Jan 18, 2024

Replaced by #2699

Why this should be merged

The way we plan to meter transactions complexity and fees requires two things from our codec:

  1. Codec must be able to size incomplete structs, even if it is not able to marshal them. Incomplete structs are structs with nil pointers or ni interfaces as members. Incomplete structs happens when we are building the tx and we need to meter a partially filled tx to understand whether another utxos must be burned or not
  2. Struct size must be additive wrt to structs members. This ensures that size of a complete structs (all member filled so that it can be marshalled) is the sum of the partially filled struct and its members. This is already true for our codec, so we just need to introduce UTs to show it

How this works

Modified codec size and added UTs to show the required invariants

How this was tested

CI + extra UTs

@abi87 abi87 requested a review from danlaine as a code owner January 18, 2024 10:13
@abi87 abi87 self-assigned this Jan 18, 2024
@abi87 abi87 linked an issue Jan 18, 2024 that may be closed by this pull request
@abi87 abi87 changed the title Codec upgrades for dynamic fees Dynamic Fees - Codec upgrades for dynamic fees Jan 18, 2024
@abi87 abi87 changed the title Dynamic Fees - Codec upgrades for dynamic fees Dynamic Fees - Codec upgrades for dynamic fees - TO BE CLOSED Feb 2, 2024
@abi87 abi87 closed this Feb 6, 2024
@StephenButtolph StephenButtolph deleted the codec-upgrades-for-dynamic-fees branch July 24, 2024 20:52
chand1012 pushed a commit to multisig-labs/avalanchego that referenced this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant