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

Merge specs from the cardano-chain repo #234

Merged
merged 247 commits into from Feb 12, 2019
Merged

Merge specs from the cardano-chain repo #234

merged 247 commits into from Feb 12, 2019

Conversation

JaredCorduan
Copy link
Contributor

No description provided.

nc6 and others added 30 commits September 25, 2018 16:21
* Implementation of abstract ledger spec using Backpack.

How does this work?

We parametrise over a signature `UTxO`, which currenly encompasses the types
`Hash`, `Coin` and `Addr`. We can specify explicitly our constraints on these
types. We then define an abstract ledger in `Ledger.Abstract` which depends on
these types, but knows nothing of their concrete representation.

In `simple/UTxO` we instantiate these parameters as in Jared's original spec.

There's a bit of a wart at the moment in that I don't think I can have the
`HasHash` class being part of the signature. So this is defined in
`Ledger.Abstract` and we then need to define the `simple/Ledger` module to
contain these.

* Define transitions for a simple ledger system.

* Change copyright, maintainer etc.
The rules so far model:

- utxo
- witnesses
- ledger

I incorporated the feedback I received from @nc6, @JaredCorduan, Bruno, and @coot.
* rename Coin to Value

* unicode union and domain exclusion

* add ghci to the makefile

(and remove old ghcid-test)

* Change foldr->foldl' for non-lazy fold.
* Organise 'Ledger.Abstract' module.

* Create simple and witnessed ledgers.

The composition here is not especially nice - I suspect I am
pushing at the boundaries of what backpack can nicely do. But at least
for the moment I couldn't see a nicer way. Suggestions welcome!

* Fix 'InsufficientWitnesses' predicate.
Add the preliminary version of the chain extension rules.
The rules here were taken directly from Duncan's delegation spec.
Improves delegation and adds more precise types
- Add delegation witnesses
- Add a proposal for interaction between blockchain and ledger layer
this will allow us to reuse parts of this spec
* Connects the delegate function to other delegation constructs
* Adds aliases for partial and total function notation
* Rename figure labels consistently. [skip ci]

* Fix condition on UTxO rule. [skip ci]

* Restrict the delegation epochs to the next epoch. [skip ci]

* Declare `dbody` and `dwit` as total functions. [skip ci]

* Fix the reference to the union-override operator. [skip ci]

* Define variable `cepoch` in the blockchain rules. [skip ci]
* Adds a description of the delegation interface in English
…o dnadales/CDEC-625-add-voting-and-update-validation
* Start writing a document outlining the semantics we use.

* Note about transition systems.

* Add two things:

- Explanation of composition of transition systems.
- Properties of serialisation functions.

* Update specs/semantics/latex/small-step-semantics.tex

Co-Authored-By: nc6 <nick@topos.org.uk>

* Update specs/semantics/latex/small-step-semantics.tex

Co-Authored-By: nc6 <nick@topos.org.uk>

* Update following comments.

* Add motivation for distributivity over injective functions.

* Section on notation.

* Minor update.
…e incorporated (#65)

Merges PR #65 to master

* Makes blockchain inference rules more operational
* Defines a delegation interface between the blockchain and ledger layers
nc6 and others added 24 commits February 1, 2019 09:31
283: Add: Prose explanations. r=nc6 a=nc6



Co-authored-by: Nicholas Clarke <nick@topos.org.uk>
- Epoch length is now a protocol parameter.
- Ledger maintains a map of epoch to epoch length both to slot/epoch
  calculations, and for the database layer.
This commit introduces the `HasTypeReps` type class, which contains the
`abstractSize` function.
287: Add a abstractSize function to compute the abstract size of values r=dnadales a=dnadales

This PR defines a function:

```haskell
abstractSize :: HasTypeReps a => AccountingMap -> a -> Size
```

where

```haskell
type Size = Int
type AccountingMap = Map TypeRep Size
```

By providing the size associated to different `TypeRep`s we can compute the total size of a value.

The typeclass `HasTypeReps` ensures that we can extract the list of all `TypeReps` found inside a given value.

Close #278.

290:  Add: Explicit epoch/slot calculations. r=nc6 a=nc6

Built atop #283 

- Epoch length is now a protocol parameter.
- Ledger maintains a map of epoch to epoch length both to slot/epoch
  calculations, and for the database layer.

Addresses #255 

Co-authored-by: Damian Nadales <damian.nadales@iohk.io>
Co-authored-by: Nicholas Clarke <nick@topos.org.uk>
- Adds the CHAIN systems.
- Adds a basic block type with delegation payload.
- Adds generators for the chain types.
…rsement

  per-genesis key.
- Adopt a new protocol version only if it has received enough endorsements at
  least `2k` slots ago.
284: [#185] Implement update registration rules r=ruhatch a=ruhatch

These are currently not tested against the mainnet chain because we don't have the code for actually adopting proposals yet.

Closed #185 

Co-authored-by: Rupert Horlick <rupert.horlick@iohk.io>
This is not ready for merging, since it needs references added, but should serve
to start guiding the implementation at the Haskell level.
Also address review comments.
@JaredCorduan JaredCorduan merged commit bf059d1 into master Feb 12, 2019
@JaredCorduan JaredCorduan deleted the cc-specs branch February 12, 2019 14:20
nc6 pushed a commit that referenced this pull request May 19, 2020
237: Add ledger utxo properties and incorporate feedback r=dnadales a=dnadales

- Add two ledger UTxO properties: no double spending and utxo is outputs minus inputs.
- Incorporate feedback received from @dcoutts and @jcmincke, and part of the feedback received during the Berlin workshop.
- Add injectivity constraint to `txid`.
- Replace `N` by `Z` as an alias for `Lovelace` and remove `Lovelace` cap and explicit fees.
- Make protocol parameters consistent with Shelley spec.
- Add author field, list of contributors, and git revision.

Close #219, close #233, close #234, close #232, close #231.

Co-authored-by: Damian Nadales <damian.nadales@iohk.io>
teodanciu pushed a commit to bienpulenta/cardano-ledger that referenced this pull request Apr 19, 2023
…sh-algo-constraint

remove HashAlgorithm constraint from Show Hash
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.

None yet

6 participants