Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Make Lovelace and minfee concrete. #210

Merged
merged 1 commit into from Dec 12, 2018
Merged

Conversation

dnadales
Copy link
Contributor

  • Merge primitive types into abstract types.
  • Add the set of natural numbers (\mathbb{N}) to the notation.
  • Make Lovelace an alias for natural numbers.
  • Replace PrtclConsts by Ppms (protocol-constants by protocol parameters),
    to make it consistent with the update mechanism spec.
  • Make function minfee concrete.

This closes #179, closes #75, and closes #54.

%
\fun{b} & \PPMMap \to \mathbb{N} & \text{minumum fee constant}\\
%
\fun{x} & \Tx \to \mathbb{N} & \text{minimum fee per-transaction}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be something more like "size", which would be described something like "the abstract size of a transaction", which we would be thinking of as something like number-of-bytes in a serialization. The name x might be a bit sparse and unclear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Thanks for the suggestion Jared. I'm changing it accordingly.

%
\fun{b} & \PPMMap \to \mathbb{N} & \text{minumum fee constant}\\
%
\fun{x} & \Tx \to \mathbb{N} & \text{minimum fee per-transaction}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why x ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took the variable names that we used in the minimum fee calculation. I think @JaredCorduan has a better name for it though, so I'm changing it accordingly.

specs/ledger/latex/utxo.tex Outdated Show resolved Hide resolved
specs/ledger/latex/utxo.tex Outdated Show resolved Hide resolved
Copy link

@mgudemann mgudemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok, but maybe we could add a specific function that "converts" nat to lovelace? Then minfee would become the calculation and application of that function. In reality, lovelace is bounded, so we cannot have a total minfee calculation. In a further refinement that could be added where appropriate.

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great @dnadales, thanks!

Copy link

@mgudemann mgudemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dnadales
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Dec 11, 2018
210: Make `Lovelace` and `minfee` concrete. r=dnadales a=dnadales

- Merge primitive types into abstract types.
- Add the set of natural numbers (`\mathbb{N}`) to the notation.
- Make Lovelace an alias for natural numbers.
- Replace `PrtclConsts` by `Ppms` (protocol-constants by protocol parameters),
  to make it consistent with the update mechanism spec.
- Make function `minfee` concrete.

This closes #179, closes #75, and closes #54.

Co-authored-by: Damian Nadales <damian.nadales@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 11, 2018

Timed out

@dnadales
Copy link
Contributor Author

dnadales commented Dec 11, 2018 via email

iohk-bors bot added a commit that referenced this pull request Dec 11, 2018
210: Make `Lovelace` and `minfee` concrete. r=dnadales a=dnadales

- Merge primitive types into abstract types.
- Add the set of natural numbers (`\mathbb{N}`) to the notation.
- Make Lovelace an alias for natural numbers.
- Replace `PrtclConsts` by `Ppms` (protocol-constants by protocol parameters),
  to make it consistent with the update mechanism spec.
- Make function `minfee` concrete.

This closes #179, closes #75, and closes #54.

Co-authored-by: Damian Nadales <damian.nadales@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 11, 2018

Timed out

- Merge primitive types into abstract types.
- Add the set of natural numbers (`\mathbb{N}`) to the notation.
- Make Lovelace an alias for natural numbers.
- Replace `PrtclConsts` by `Ppms` (protocol-constants by protocol parameters),
  to make it consistent with the update mechanism spec.
- Make function `minfee` concrete.
- Make `balance` and `minfee` functions with range in the naturals.
- Add a constraint in the UTxO rule so that balances do not exceed the Lovelace cap.
- Make Lovelace a subset of the natural numbers.
@dnadales
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Dec 12, 2018
210: Make `Lovelace` and `minfee` concrete. r=dnadales a=dnadales

- Merge primitive types into abstract types.
- Add the set of natural numbers (`\mathbb{N}`) to the notation.
- Make Lovelace an alias for natural numbers.
- Replace `PrtclConsts` by `Ppms` (protocol-constants by protocol parameters),
  to make it consistent with the update mechanism spec.
- Make function `minfee` concrete.

This closes #179, closes #75, and closes #54.

Co-authored-by: Damian Nadales <damian.nadales@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 12, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

min fee as ax+b Model fees Model the Lovelace type in the ledger spec
3 participants