Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge #102
Browse files Browse the repository at this point in the history
102: update all dependencies  r=dcoutts a=MarcFontaine

- [X] update the hashes
- [X] update the library
- [X] update the exec
- [X] Cleanup & fix missing pieces
- [ ] TODO: Fix CI build

Co-authored-by: MarcFontaine <MarcFontaine@users.noreply.github.com>
Co-authored-by: Duncan Coutts <duncan@well-typed.com>
  • Loading branch information
3 people authored Mar 19, 2020
2 parents 9c8e366 + 888efdc commit 5538821
Show file tree
Hide file tree
Showing 13 changed files with 234 additions and 176 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Revision history for cardano-byron-proxy

## 1.0.5 -- March 2020

* Update to latest version of cardano-ledger, ouroboros-network,
ouroboros-consensus and cardano-sl libs.

## 1.0.4 -- February 2020

* Update to latest version of cardano-ledger, ouroboros-network,
Expand Down
128 changes: 82 additions & 46 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -95,58 +95,93 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: io-sim

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: io-sim-classes

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: ouroboros-consensus

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: ouroboros-consensus-byron

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: ouroboros-network

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: ouroboros-network-framework

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: ouroboros-network-testing

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: network-mux

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: typed-protocols

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 398004e1403367cc2a25c639eb6349d473e51b2d
--sha256: 1x940w0sma3mhl4hfd937sp25hdl3migkl8zsyl92p59468218i9
subdir: typed-protocols-cbor
tag: 85934cc7e19e4a94547c79073d28ca77bb29897f
--sha256: 1xgkdqi7cpmi0vq2lxq7d365yskp2v5rkh3g2m3ic3wplb00d7jd
subdir: typed-protocols-examples

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 2500720815d30a29c95d153b3d97b1e0307f6906
--sha256: 1qb3a1wv65r73dkl07r48ni6j653b28fjfp1hdvr7049ibzfyb91
subdir: byron/ledger/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 2500720815d30a29c95d153b3d97b1e0307f6906
--sha256: 1qb3a1wv65r73dkl07r48ni6j653b28fjfp1hdvr7049ibzfyb91
subdir: byron/chain/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f27e8b66a393f0b7da1893889dcea07da0fe4dec
--sha256: 1f1r1vidnlyka800jpm9z2myrggasqyzw0aw97q8vw81sh72l51s
subdir: byron/ledger/executable-spec

--
-- from cardano-crypto-1.2.0.nix
Expand All @@ -155,78 +190,78 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: eed4fc484366214831576eef0c7fe90d1d08c78b
--sha256: 0h9vbs2bsx6pvb300vl66znwpkqn169pmvsl4pv8mn0sz8iw4pk6
tag: f869bee9b08ba1044b1476737c9d65083e1c6c7f
--sha256: 0df3bdf13cwx3hd8n4q53g9hybb0w8mh837y64ydd88xhdfaf6a3
subdir: binary

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: eed4fc484366214831576eef0c7fe90d1d08c78b
--sha256: 0h9vbs2bsx6pvb300vl66znwpkqn169pmvsl4pv8mn0sz8iw4pk6
tag: f869bee9b08ba1044b1476737c9d65083e1c6c7f
--sha256: 0df3bdf13cwx3hd8n4q53g9hybb0w8mh837y64ydd88xhdfaf6a3
subdir: binary/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: eed4fc484366214831576eef0c7fe90d1d08c78b
--sha256: 0h9vbs2bsx6pvb300vl66znwpkqn169pmvsl4pv8mn0sz8iw4pk6
tag: f869bee9b08ba1044b1476737c9d65083e1c6c7f
--sha256: 0df3bdf13cwx3hd8n4q53g9hybb0w8mh837y64ydd88xhdfaf6a3
subdir: cardano-crypto-class

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: eed4fc484366214831576eef0c7fe90d1d08c78b
--sha256: 0h9vbs2bsx6pvb300vl66znwpkqn169pmvsl4pv8mn0sz8iw4pk6
tag: f869bee9b08ba1044b1476737c9d65083e1c6c7f
--sha256: 0df3bdf13cwx3hd8n4q53g9hybb0w8mh837y64ydd88xhdfaf6a3
subdir: slotting

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: c62e2eeba5756898cbf59732fccd6a83a4065c18
--sha256: 04s2dp5dyikm2pxfphiyh429pckkg06dqx3sl4bbzvg6x5qfqvbn
tag: e2240ccda93e52835cd25b04e1963c8929bbfa64
--sha256: 08c1dz9plnqb6i3ysnfbw6b6y2ij2f8crkij5aqrgsdjar51p91n
subdir: cardano-ledger

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: c62e2eeba5756898cbf59732fccd6a83a4065c18
--sha256: 04s2dp5dyikm2pxfphiyh429pckkg06dqx3sl4bbzvg6x5qfqvbn
tag: e2240ccda93e52835cd25b04e1963c8929bbfa64
--sha256: 08c1dz9plnqb6i3ysnfbw6b6y2ij2f8crkij5aqrgsdjar51p91n
subdir: crypto

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: c62e2eeba5756898cbf59732fccd6a83a4065c18
--sha256: 04s2dp5dyikm2pxfphiyh429pckkg06dqx3sl4bbzvg6x5qfqvbn
tag: e2240ccda93e52835cd25b04e1963c8929bbfa64
--sha256: 08c1dz9plnqb6i3ysnfbw6b6y2ij2f8crkij5aqrgsdjar51p91n
subdir: cardano-ledger/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: c62e2eeba5756898cbf59732fccd6a83a4065c18
--sha256: 04s2dp5dyikm2pxfphiyh429pckkg06dqx3sl4bbzvg6x5qfqvbn
tag: e2240ccda93e52835cd25b04e1963c8929bbfa64
--sha256: 08c1dz9plnqb6i3ysnfbw6b6y2ij2f8crkij5aqrgsdjar51p91n
subdir: crypto/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f27e8b66a393f0b7da1893889dcea07da0fe4dec
--sha256: 1f1r1vidnlyka800jpm9z2myrggasqyzw0aw97q8vw81sh72l51s
tag: afacc7969445e4db5427936489f5a49a8a3a8f99
--sha256: 0j5c669x7lr5fi7s9lm4jrzhprq8vz8q5z0pb1mrbp5fv4ja352c
subdir: byron/semantics/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f27e8b66a393f0b7da1893889dcea07da0fe4dec
--sha256: 1f1r1vidnlyka800jpm9z2myrggasqyzw0aw97q8vw81sh72l51s
tag: afacc7969445e4db5427936489f5a49a8a3a8f99
--sha256: 0j5c669x7lr5fi7s9lm4jrzhprq8vz8q5z0pb1mrbp5fv4ja352c
subdir: byron/ledger/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: f27e8b66a393f0b7da1893889dcea07da0fe4dec
--sha256: 1f1r1vidnlyka800jpm9z2myrggasqyzw0aw97q8vw81sh72l51s
tag: afacc7969445e4db5427936489f5a49a8a3a8f99
--sha256: 0j5c669x7lr5fi7s9lm4jrzhprq8vz8q5z0pb1mrbp5fv4ja352c
subdir: byron/chain/executable-spec

source-repository-package
Expand All @@ -238,21 +273,22 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 00487726c4bc21b4744e59d913334ebfeac7d68e
--sha256: 0v4fcq5kdd2r5dgwys8kv46ff33qp756n26ycxrca10wq14zkwm5
tag: 3893f21db1665e7bab9e8c6504c547fc7c28f98c
--sha256: 09qqcjzmjsa3r7f1yiwk4bn8bpv7nvqf7hfyg784shasspwfq8n4

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 00487726c4bc21b4744e59d913334ebfeac7d68e
--sha256: 0v4fcq5kdd2r5dgwys8kv46ff33qp756n26ycxrca10wq14zkwm5
tag: 3893f21db1665e7bab9e8c6504c547fc7c28f98c
--sha256: 09qqcjzmjsa3r7f1yiwk4bn8bpv7nvqf7hfyg784shasspwfq8n4
subdir: test

-- version number matching the one specified in the stack resolver file
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-crypto
tag: 4590efa638397e952a51a8994b5543e4ea3c1ecd
--sha256: 0hl2n3bba5v2j0lmxhs7hs01z3aznh2bwf9cb434icq2g0bl8ms3
location: https://github.com/input-output-hk/cardano-crypto/
tag: 2547ad1e80aeabca2899951601079408becbc92c
--sha256: 1p2kg2w02q5w1cvqzhfhqmxviy4xrzada3mmb096j2n6hfr20kri

source-repository-package
type: git
Expand Down
5 changes: 4 additions & 1 deletion cardano-byron-proxy.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-byron-proxy
version: 1.0.4
version: 1.0.5
synopsis: Cardano Byron network proxy for the old and new network protocols.
-- description:
homepage: https://github.com/input-output-hk/cardano-byron-proxy
Expand Down Expand Up @@ -50,6 +50,7 @@ library
memory,
network-mux,
ouroboros-consensus,
ouroboros-consensus-byron,
ouroboros-network,
resourcet,
sqlite-simple,
Expand Down Expand Up @@ -111,7 +112,9 @@ executable cardano-byron-proxy
network-mux,
optparse-applicative,
ouroboros-consensus,
ouroboros-consensus-byron,
ouroboros-network,
ouroboros-network-framework,
random,
reflection,
resourcet,
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let
pkgconfig
sqlite-interactive
tmux
commonLib.cabalProjectRegenerate
# commonLib.cabalProjectRegenerate
]);

# Prevents cabal from choosing alternate plans, so that
Expand Down
21 changes: 12 additions & 9 deletions src/exec/Byron.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ import qualified Pos.Chain.Block as CSL (Block, BlockHeader (..), GenesisBlock,
MainBlockHeader, HeaderHash, headerHash)
import qualified Pos.Infra.Diffusion.Types as CSL

import Ouroboros.Byron.Proxy.Block (ByronBlock,
coerceHashToLegacy, headerHash)
import Ouroboros.Byron.Proxy.Main
import Ouroboros.Consensus.Byron.Ledger.Block (ByronBlock)
import Ouroboros.Consensus.Block (Header)
import Ouroboros.Consensus.Ledger.Byron (ByronHash(..),
import Ouroboros.Consensus.Byron.Ledger.Block (ByronHash(..),
byronHeaderRaw, mkByronBlock)
import Ouroboros.Consensus.Ledger.Byron.Auxiliary as Cardano
import Ouroboros.Consensus.Protocol.Abstract (SecurityParam (maxRollbacks))
import Ouroboros.Network.Block (ChainHash (..), Point, pointHash)
import qualified Ouroboros.Network.AnchoredFragment as AF
import qualified Ouroboros.Network.ChainFragment as CF
import Ouroboros.Storage.ChainDB.API (ChainDB)
import qualified Ouroboros.Storage.ChainDB.API as ChainDB
import Ouroboros.Consensus.Storage.ChainDB.API (ChainDB)
import qualified Ouroboros.Consensus.Storage.ChainDB.API as ChainDB

import Ouroboros.Byron.Proxy.Block (coerceHashToLegacy, headerHash)
import Ouroboros.Byron.Proxy.Main (ByronProxy, BestTip(..)
, bestTip
, downloadChain
, announceChain)
-- | Download the best available chain from Byron peers and write to the
-- database, over and over again. It will download the best chain from its
-- Byron peers regardless of whether it has a better one in the database.
Expand All @@ -73,7 +75,7 @@ download tracer genesisBlock epochSlots securityParam db bp = do
Nothing -> do
traceWith tracer "Seeding database with genesis"
genesisBlock' :: ByronBlock <- recodeBlockOrFail epochSlots throwIO (Left genesisBlock)
ChainDB.addBlock db genesisBlock'
_ <- ChainDB.addBlock db genesisBlock'
pure $ CSL.headerHash genesisBlock
Just header -> pure $ coerceHashToLegacy (headerHash header)
mainLoop gen tipHash
Expand Down Expand Up @@ -171,7 +173,7 @@ download tracer genesisBlock epochSlots securityParam db bp = do
commitBlock :: CSL.HeaderHash -> CSL.Block -> IO CSL.HeaderHash
commitBlock _ blk = do
blk' <- recodeBlockOrFail epochSlots throwIO blk
ChainDB.addBlock db blk'
_ <- ChainDB.addBlock db blk'
pure $ CSL.headerHash blk

-- Catch all sync exceptions from the downloadChain call that uses the
Expand Down Expand Up @@ -219,6 +221,7 @@ recodeBlock epochSlots cslBlk = case Binary.decodeFullAnnotatedBytes "Block" dec
-- stored... _unless_ in recovery mode! i.e. precisely when the new block is
-- a continuation of the current chain.
-- Do we wish to / need to stick to that style?

announce
:: Maybe Cardano.HeaderHash -- ^ Of block most recently announced.
-> ChainDB IO ByronBlock
Expand Down
Loading

0 comments on commit 5538821

Please sign in to comment.