Home / Input Output / ouroboros-network
Oct 17, 11-12 PM (0)
Oct 17, 12-1 PM (0)
Oct 17, 1-2 PM (0)
Oct 17, 2-3 PM (0)
Oct 17, 3-4 PM (0)
Oct 17, 4-5 PM (0)
Oct 17, 5-6 PM (0)
Oct 17, 6-7 PM (0)
Oct 17, 7-8 PM (0)
Oct 17, 8-9 PM (0)
Oct 17, 9-10 PM (0)
Oct 17, 10-11 PM (0)
Oct 17, 11-12 AM (0)
Oct 18, 12-1 AM (0)
Oct 18, 1-2 AM (0)
Oct 18, 2-3 AM (0)
Oct 18, 3-4 AM (0)
Oct 18, 4-5 AM (0)
Oct 18, 5-6 AM (0)
Oct 18, 6-7 AM (0)
Oct 18, 7-8 AM (0)
Oct 18, 8-9 AM (0)
Oct 18, 9-10 AM (0)
Oct 18, 10-11 AM (0)
Oct 18, 11-12 PM (0)
Oct 18, 12-1 PM (1)
Oct 18, 1-2 PM (0)
Oct 18, 2-3 PM (0)
Oct 18, 3-4 PM (0)
Oct 18, 4-5 PM (0)
Oct 18, 5-6 PM (0)
Oct 18, 6-7 PM (0)
Oct 18, 7-8 PM (0)
Oct 18, 8-9 PM (0)
Oct 18, 9-10 PM (0)
Oct 18, 10-11 PM (0)
Oct 18, 11-12 AM (0)
Oct 19, 12-1 AM (0)
Oct 19, 1-2 AM (0)
Oct 19, 2-3 AM (0)
Oct 19, 3-4 AM (0)
Oct 19, 4-5 AM (0)
Oct 19, 5-6 AM (0)
Oct 19, 6-7 AM (1)
Oct 19, 7-8 AM (1)
Oct 19, 8-9 AM (1)
Oct 19, 9-10 AM (0)
Oct 19, 10-11 AM (2)
Oct 19, 11-12 PM (0)
Oct 19, 12-1 PM (1)
Oct 19, 1-2 PM (1)
Oct 19, 2-3 PM (0)
Oct 19, 3-4 PM (66)
Oct 19, 4-5 PM (22)
Oct 19, 5-6 PM (0)
Oct 19, 6-7 PM (0)
Oct 19, 7-8 PM (0)
Oct 19, 8-9 PM (0)
Oct 19, 9-10 PM (1)
Oct 19, 10-11 PM (1)
Oct 19, 11-12 AM (0)
Oct 20, 12-1 AM (0)
Oct 20, 1-2 AM (0)
Oct 20, 2-3 AM (0)
Oct 20, 3-4 AM (0)
Oct 20, 4-5 AM (0)
Oct 20, 5-6 AM (4)
Oct 20, 6-7 AM (0)
Oct 20, 7-8 AM (3)
Oct 20, 8-9 AM (0)
Oct 20, 9-10 AM (3)
Oct 20, 10-11 AM (0)
Oct 20, 11-12 PM (0)
Oct 20, 12-1 PM (0)
Oct 20, 1-2 PM (6)
Oct 20, 2-3 PM (3)
Oct 20, 3-4 PM (0)
Oct 20, 4-5 PM (0)
Oct 20, 5-6 PM (0)
Oct 20, 6-7 PM (0)
Oct 20, 7-8 PM (0)
Oct 20, 8-9 PM (0)
Oct 20, 9-10 PM (0)
Oct 20, 10-11 PM (0)
Oct 20, 11-12 AM (0)
Oct 21, 12-1 AM (0)
Oct 21, 1-2 AM (0)
Oct 21, 2-3 AM (0)
Oct 21, 3-4 AM (0)
Oct 21, 4-5 AM (0)
Oct 21, 5-6 AM (0)
Oct 21, 6-7 AM (0)
Oct 21, 7-8 AM (0)
Oct 21, 8-9 AM (22)
Oct 21, 9-10 AM (9)
Oct 21, 10-11 AM (0)
Oct 21, 11-12 PM (1)
Oct 21, 12-1 PM (0)
Oct 21, 1-2 PM (0)
Oct 21, 2-3 PM (0)
Oct 21, 3-4 PM (0)
Oct 21, 4-5 PM (0)
Oct 21, 5-6 PM (0)
Oct 21, 6-7 PM (0)
Oct 21, 7-8 PM (0)
Oct 21, 8-9 PM (0)
Oct 21, 9-10 PM (0)
Oct 21, 10-11 PM (0)
Oct 21, 11-12 AM (0)
Oct 22, 12-1 AM (0)
Oct 22, 1-2 AM (0)
Oct 22, 2-3 AM (0)
Oct 22, 3-4 AM (0)
Oct 22, 4-5 AM (0)
Oct 22, 5-6 AM (0)
Oct 22, 6-7 AM (0)
Oct 22, 7-8 AM (0)
Oct 22, 8-9 AM (2)
Oct 22, 9-10 AM (27)
Oct 22, 10-11 AM (1)
Oct 22, 11-12 PM (1)
Oct 22, 12-1 PM (0)
Oct 22, 1-2 PM (0)
Oct 22, 2-3 PM (0)
Oct 22, 3-4 PM (0)
Oct 22, 4-5 PM (0)
Oct 22, 5-6 PM (0)
Oct 22, 6-7 PM (0)
Oct 22, 7-8 PM (0)
Oct 22, 8-9 PM (0)
Oct 22, 9-10 PM (0)
Oct 22, 10-11 PM (0)
Oct 22, 11-12 AM (0)
Oct 23, 12-1 AM (0)
Oct 23, 1-2 AM (0)
Oct 23, 2-3 AM (0)
Oct 23, 3-4 AM (0)
Oct 23, 4-5 AM (0)
Oct 23, 5-6 AM (0)
Oct 23, 6-7 AM (3)
Oct 23, 7-8 AM (4)
Oct 23, 8-9 AM (0)
Oct 23, 9-10 AM (2)
Oct 23, 10-11 AM (1)
Oct 23, 11-12 PM (5)
Oct 23, 12-1 PM (4)
Oct 23, 1-2 PM (6)
Oct 23, 2-3 PM (1)
Oct 23, 3-4 PM (1)
Oct 23, 4-5 PM (0)
Oct 23, 5-6 PM (0)
Oct 23, 6-7 PM (0)
Oct 23, 7-8 PM (0)
Oct 23, 8-9 PM (0)
Oct 23, 9-10 PM (0)
Oct 23, 10-11 PM (0)
Oct 23, 11-12 AM (0)
Oct 24, 12-1 AM (0)
Oct 24, 1-2 AM (0)
Oct 24, 2-3 AM (0)
Oct 24, 3-4 AM (0)
Oct 24, 4-5 AM (0)
Oct 24, 5-6 AM (0)
Oct 24, 6-7 AM (0)
Oct 24, 7-8 AM (0)
Oct 24, 8-9 AM (0)
Oct 24, 9-10 AM (0)
Oct 24, 10-11 AM (0)
Oct 24, 11-12 PM (0)
207 commits this week Oct 17, 2020 - Oct 24, 2020
Merge #2696
2696: Handle exiting threads in diffusion layer r=karknu a=karknu

If a thread spawned by diffusion exits for any reason we kill
all other threads and return. This is done to ensure that the node isn't
left running in a semi-functional state, for example with the client
side working but the server has exited due to a configuration error.

Example output:
`cardano-node: Network.Socket.bind: unsupported operation (Can't assign requested address)⏎`

Co-authored-by: Karl Knutsson <[email protected]>
Shelley: only keep a compact genesis config in memory
Some fields in the Shelley genesis config are only needed at start-up. There's
no point in keeping them in memory during the rest of the execution. In some
testing setups, e.g., for transaction benchmarking, the genesis config can be
quite large.

This also means that the `GetGetGenesisConfig` query (#2694) would only return
the compact genesis config, not the original full one.
Give QueryLedger the ExtLedgerState
The `ExtLedgerState` contains the `HeaderState`, which contains the
`ChainDepState`, in addition to the `LedgerState`.

This makes it possible to add the new `DebugChainDepState` query for Shelley.

The query abstraction was moved to `Ouroboros.Consensus.Ledger.Query`, as it now
depends on `Ouroboros.Consensus.Ledger.Extended`.

Some shuffling and extra utilities were required for the HFC.
Version the new queries
Introduce `ShelleyNodeToClientVersion2`, which is a requirement for the new
`GetGenesisConfig` and `GetCurrentShelleyState` queries. Submitting these
queries while using `ShelleyNodeToClientVersion1` will result in an exception
thrown by the client-side encoders, which is better than a decode failure on the
server-side (invisible to the client). The better solution would be to negotiate
a version that is high enough to allow for these queries, but we need support
from the network layer for that.

Use `CardanoNodeToClientVersion3` to enable `ShelleyNodeToClientVersion2` within
`CardanoBlock`. The Allegra and Mary eras will both use
`ShelleyNodeToClientVersion2` from the start, there's no point in supporting the
old version (too). This means we need `NodeToClientV_4` for this.

Note that the pure-Shelley versioning can do its own thing w.r.t.
`NodeToClientV_X`, it is unrelated to the numbers used for `Cardano`. So it can
simply pick the next number available, which is `NodeToClientV_3`.

Also version the `QueryHardFork`: `GetCurrentEra` requires
`HardForkSpecificNodeToClientVersion2`, which is part of a new type to version
the bits specific to the HFC itself.
Fix golden test framework
This fixes the following issue:

    Query_GetGenesisConfig:             FAIL
      Exception thrown by encoder doesn't match the golden CBOR output
      Exception:
      ShelleyEncoderUnsupportedQuery (SomeBlock GetGenesisConfig) ShelleyNodeToClientVersion2 ShelleyNodeToClientVersion1
      Golden term:
      [TkBytes "helleyEncoderUnsupp",TkString "rtedQuery (Some",TkBytes "lo",TkString "k G",TkString "tGene",TkString "isConfig) ShelleyNo",TkString "eToC",TkString "ientVersion2",TkInt (-1),TkBytes "helleyNodeToClientV",TkString "rsion",TkInt (-18)]
Merge #2702
2702: Update dependencies r=mrBliss a=mrBliss

Highlights:

* https://github.com/input-output-hk/cardano-ledger-specs/pull/1915
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1922
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1902
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1923
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1927
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1929

Co-authored-by: Thomas Winant <[email protected]>
Make sure the maxLovelaceSupply is greater than the Byron balance
The Cardano ThreadNet tests were failing with:

      Exception:
        out of bounds : -5999999999995992
        CallStack (from HasCallStack):
          error, called at src/Shelley/Spec/Ledger/Coin.hs:77:15 in shelley-spec-ledger-0.1.0.0-IHgVjHhhJ1jYZdRhYRAbW:Shelley.Spec.Ledger.Coin

The ledger never permitted negative `Coin`s, but in the last update it has
started checking this when serialising a `Coin`.

We end up with a negative `Coin` because the value of `maxLovelaceSupply` we use
for the Shelley era is `initialLovelacePerCoreNode (= 1000) * #coreNodes`.
However, the Byron ledger state starts out with an initial balance of
6000000000000000, which subtracted from `maxLovelaceSupply`, results in a
negative `Coin`.

Fix this by using an appropriate value for `maxLovelaceSupply` in the Cardano
ThreadNet tests.
Update dependencies
Highlights:

* https://github.com/input-output-hk/cardano-ledger-specs/pull/1915
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1922
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1902
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1923
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1927
* https://github.com/input-output-hk/cardano-ledger-specs/pull/1929