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

Update all dependencies #21

Merged
merged 25 commits into from
Mar 8, 2021
Merged

Update all dependencies #21

merged 25 commits into from
Mar 8, 2021

Conversation

infinisil
Copy link
Contributor

@infinisil infinisil commented Feb 23, 2021

Updates all dependencies, including GHC, cabal, haskell.nix and libraries.

  • GHC from 8.6.5 to 8.10.4
  • cabal from 3.2.0.0 to 3.4.0.0
  • haskell.nix to a newer version that supports 8.10.4
  • libraries to the latest versions, bar some exceptions

Most of the changes are related to updates in ouroboros-network, such as:

Some notes:

  • morphoBlockSize was moved out of morphoHeaderStd. This changes the serialization format of blocks (no need to keep it stable at the moment), but allows properly estimating the block size from a header, which is required by one of the new tests from ouroboros-network which we use. See ffd40c4
  • ShortHash changed from being a 4-byte MD5 prefix to an 8-byte MD5 prefix, which changes the serialization of blocks in an incompatible way.
  • Removed the GetDummy node-to-client query, because we don't support such queries anyways. This isn't strictly needed with this dependency update, but the Query interface changed, and I don't want to reimplement it. Follow-up work is to remove all other local query (aka node-to-client) code, such as traces, instances and co.
  • The secp256k1 library had to be forked to make it work with base16-bytestring version 1.0, see https://github.com/input-output-hk/secp256k1-haskell/tree/base16-bytestring-1.x
  • The hexstring library had to be forked to make it work with base16-bytestring version 1.0, see https://github.com/input-output-hk/haskell-hexstring/tree/base16-bytestring-1.x. This won't be necessary with the removal of this dependency in Improved error reporting in relation to key imports #24

All tests succeed again, and this version has been successfully running in staging network for about an hour, issuing checkpoints as it should.

@infinisil infinisil force-pushed the dependency-updates branch 3 times, most recently from ae4c4b9 to 2731b58 Compare March 4, 2021 18:42
Updates:
- GHC from 8.6.5 to 8.10.4
- Haskell.nix to a new version supporting 8.10.4
- The Hackage index state from 2020-05-15 to 2021-02-09 (determines most
  Haskell dependencies)
- haskell-language-server to 1.0.0, which newly supports 8.10.4
- All source-repository-package statements in cabal.project to the
  latest version
- The hexstring library to a fork containing fixes for base16-bytestring's
  incompatible changes:
  https://github.com/input-output-hk/haskell-hexstring/tree/base16-bytestring-1.x

Also simplifies the source-repository-package's to use multiple subdirs
Was moved from cardano-prelude to its own nothunk library, and was
renamed from NoUnexpectedThunks to NoThunks
Comment out some things
The only problem is that the roundtrip_all tries to test node-to-client
queries. We can just run its individual test cases though, leaving out
the node-to-client ones
Also fixes the version stuff, and implements the DummyGet query again
With ouroboros-network-framework version that supports SRV records on
top of master
Notably this moves the inline encoding terms into binary files, without
changing them, and without adding any missing encoding tests.

This also adds types for the morpho node-to-node and node-to-client
versions in order for the test suite to be able to distinguish between
them. However node-to-client isn't necessary so will probably be removed
later, along with all other node-to-client bits
With the update, ShortHash changed from being a 4-byte MD5 prefix to an
8-byte prefix instead. ShortHash is not only used by morpho's encoding
directly (in which case we could've used `MD5Prefix 4` instead), but
also by MockDSIGN.

Also, commit all the other generated golden encodings
morphoBlockSize is used to give an (over-)estimate of the block size.
But because it was inside morphoHeaderStd, this value had to be included
in the leader signature (morphoHeaderStd is the part that is signed).
This meant that there was no way to converge on a block size, since any
change to it introduced randomness to the encoding, which influences its
length since its a variable-size encoding. Moving it out of
morphoHeaderStd fixes this problem.

This only became a problem with the update because the new roundtrip_all
function checks that estimateBlockSize gives an overestimate.
@infinisil infinisil merged commit 57bbcfa into master Mar 8, 2021
@infinisil infinisil deleted the dependency-updates branch March 8, 2021 15:03
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