Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit c7cebdb

Browse files
committed
Integrate consensus and network ledger to a trivial ledger.
The README describes the demo.
1 parent e29802d commit c7cebdb

42 files changed

Lines changed: 5402 additions & 51 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stack-to-nix.cache

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,28 @@ https://github.com/input-output-hk/cardano-base 0fcb3a306e96ce36fca75d62792c55ab
1818
https://github.com/input-output-hk/cardano-base 0fcb3a306e96ce36fca75d62792c55ab1de871ea cardano-crypto-class 0fbcf3iim4fh8m647ilw02ybbxiqna3zpny0w7rlqjgd4skfqvjr cardano-crypto-class cardano-crypto-class.nix
1919
https://github.com/input-output-hk/cardano-ledger-specs d348b506e752c73f7c185a23cca9e397e9d86cb7 byron/semantics/executable-spec 0p4966bx5g9nzqcinm558www7yvmm4rwd9y2npm8bcxh8nm4sl8r small-steps small-steps.nix
2020
https://github.com/input-output-hk/cardano-ledger-specs d348b506e752c73f7c185a23cca9e397e9d86cb7 byron/ledger/executable-spec 0p4966bx5g9nzqcinm558www7yvmm4rwd9y2npm8bcxh8nm4sl8r cs-ledger cs-ledger.nix
21+
https://github.com/input-output-hk/iohk-monitoring-framework dd30455144e11efb435619383ba84ce02aee720d contra-tracer 1g08bg99fvss99kg27l7pmxm7lh60573xln8l8x2rzvwfvfgk2i5 contra-tracer contra-tracer.nix
22+
https://github.com/input-output-hk/iohk-monitoring-framework dd30455144e11efb435619383ba84ce02aee720d iohk-monitoring 1g08bg99fvss99kg27l7pmxm7lh60573xln8l8x2rzvwfvfgk2i5 iohk-monitoring iohk-monitoring.nix
23+
https://github.com/input-output-hk/iohk-monitoring-framework dd30455144e11efb435619383ba84ce02aee720d tracer-transformers 1g08bg99fvss99kg27l7pmxm7lh60573xln8l8x2rzvwfvfgk2i5 tracer-transformers tracer-transformers.nix
24+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f ouroboros-consensus 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj ouroboros-consensus ouroboros-consensus.nix
25+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f ouroboros-consensus/ouroboros-consensus-test-infra 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj ouroboros-consensus-test-infra ouroboros-consensus-test-infra.nix
26+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f io-sim-classes 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj io-sim-classes io-sim-classes.nix
27+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f typed-protocols 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj typed-protocols typed-protocols.nix
28+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f ouroboros-network 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj ouroboros-network ouroboros-network.nix
29+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f ouroboros-network-framework 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj ouroboros-network-framework ouroboros-network-framework.nix
30+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f typed-protocols-examples 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj typed-protocols-examples typed-protocols-examples.nix
31+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f io-sim 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj io-sim io-sim.nix
32+
https://github.com/input-output-hk/ouroboros-network eab72b945a7c2c5f05ff8e9822f6066307846f8f network-mux 0il9lrbmjjm8s35zw7as0j54njrdjrzcy1i029faj89d0h3kdsfj network-mux network-mux.nix
33+
https://github.com/input-output-hk/cardano-base 474622cfde663730e10e2e0d5de0ed06a867a844 binary 1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07 cardano-binary cardano-binary.nix
34+
https://github.com/input-output-hk/cardano-base 474622cfde663730e10e2e0d5de0ed06a867a844 binary/test 1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07 cardano-binary-test cardano-binary-test.nix
35+
https://github.com/input-output-hk/cardano-base 474622cfde663730e10e2e0d5de0ed06a867a844 cardano-crypto-class 1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07 cardano-crypto-class cardano-crypto-class.nix
36+
https://github.com/input-output-hk/cardano-base 474622cfde663730e10e2e0d5de0ed06a867a844 slotting 1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07 cardano-slotting cardano-slotting.nix
37+
https://github.com/input-output-hk/cardano-ledger-specs 6d154d16de01edf2d3ff56303b7a34cb188ed217 byron/semantics/executable-spec 010hgxnia3ryq74k9cf2yn39qnni1j27vg7xlzmdqr27p8ikkrw7 small-steps small-steps.nix
38+
https://github.com/input-output-hk/cardano-ledger-specs 6d154d16de01edf2d3ff56303b7a34cb188ed217 byron/ledger/executable-spec 010hgxnia3ryq74k9cf2yn39qnni1j27vg7xlzmdqr27p8ikkrw7 cs-ledger cs-ledger.nix
39+
https://github.com/input-output-hk/cardano-ledger-specs 6d154d16de01edf2d3ff56303b7a34cb188ed217 byron/chain/executable-spec 010hgxnia3ryq74k9cf2yn39qnni1j27vg7xlzmdqr27p8ikkrw7 cs-blockchain cs-blockchain.nix
40+
https://github.com/input-output-hk/cardano-ledger 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0 cardano-ledger 08jbmlq5jj36jkn2iw9znl7jkgnjgq37i70asmp62igqyjhis8q6 cardano-ledger cardano-ledger.nix
41+
https://github.com/input-output-hk/cardano-ledger 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0 cardano-ledger/test 08jbmlq5jj36jkn2iw9znl7jkgnjgq37i70asmp62igqyjhis8q6 cardano-ledger-test cardano-ledger-test.nix
42+
https://github.com/input-output-hk/cardano-ledger 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0 crypto 08jbmlq5jj36jkn2iw9znl7jkgnjgq37i70asmp62igqyjhis8q6 cardano-crypto-wrapper cardano-crypto-wrapper.nix
43+
https://github.com/input-output-hk/cardano-ledger 6d533b72d4a91b756cd8ffe164928d5f5eebcfa0 crypto/test 08jbmlq5jj36jkn2iw9znl7jkgnjgq37i70asmp62igqyjhis8q6 cardano-crypto-test cardano-crypto-test.nix
44+
https://github.com/input-output-hk/cardano-prelude 00487726c4bc21b4744e59d913334ebfeac7d68e . 0v4fcq5kdd2r5dgwys8kv46ff33qp756n26ycxrca10wq14zkwm5 cardano-prelude cardano-prelude.nix
45+
https://github.com/input-output-hk/cardano-prelude 00487726c4bc21b4744e59d913334ebfeac7d68e test 0v4fcq5kdd2r5dgwys8kv46ff33qp756n26ycxrca10wq14zkwm5 cardano-prelude-test cardano-prelude-test.nix
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
let
2+
buildDepError = pkg:
3+
builtins.throw ''
4+
The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+
'';
8+
sysDepError = pkg:
9+
builtins.throw ''
10+
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+
You may need to augment the system package mapping in haskell.nix so that it can be found.
13+
'';
14+
pkgConfDepError = pkg:
15+
builtins.throw ''
16+
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+
'';
20+
exeDepError = pkg:
21+
builtins.throw ''
22+
The local executable components do not include the component: ${pkg} (executable dependency).
23+
'';
24+
legacyExeDepError = pkg:
25+
builtins.throw ''
26+
The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+
'';
30+
buildToolDepError = pkg:
31+
builtins.throw ''
32+
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+
If this is a system dependency:
35+
You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+
If this is a Haskell dependency:
38+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+
'';
40+
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+
{
42+
flags = { development = false; };
43+
package = {
44+
specVersion = "1.10";
45+
identifier = { name = "cardano-binary-test"; version = "1.3.0"; };
46+
license = "MIT";
47+
copyright = "2019 IOHK";
48+
maintainer = "operations@iohk.io";
49+
author = "IOHK";
50+
homepage = "";
51+
url = "";
52+
synopsis = "Test helpers from cardano-binary exposed to other packages";
53+
description = "Test helpers from cardano-binary exposed to other packages";
54+
buildType = "Simple";
55+
isLocal = true;
56+
};
57+
components = {
58+
"library" = {
59+
depends = [
60+
(hsPkgs."base" or (buildDepError "base"))
61+
(hsPkgs."bytestring" or (buildDepError "bytestring"))
62+
(hsPkgs."cardano-binary" or (buildDepError "cardano-binary"))
63+
(hsPkgs."cardano-prelude" or (buildDepError "cardano-prelude"))
64+
(hsPkgs."cardano-prelude-test" or (buildDepError "cardano-prelude-test"))
65+
(hsPkgs."cborg" or (buildDepError "cborg"))
66+
(hsPkgs."containers" or (buildDepError "containers"))
67+
(hsPkgs."formatting" or (buildDepError "formatting"))
68+
(hsPkgs."hedgehog" or (buildDepError "hedgehog"))
69+
(hsPkgs."hspec" or (buildDepError "hspec"))
70+
(hsPkgs."pretty-show" or (buildDepError "pretty-show"))
71+
(hsPkgs."QuickCheck" or (buildDepError "QuickCheck"))
72+
(hsPkgs."quickcheck-instances" or (buildDepError "quickcheck-instances"))
73+
(hsPkgs."text" or (buildDepError "text"))
74+
(hsPkgs."vector" or (buildDepError "vector"))
75+
];
76+
buildable = true;
77+
};
78+
};
79+
} // {
80+
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
81+
url = "https://github.com/input-output-hk/cardano-base";
82+
rev = "474622cfde663730e10e2e0d5de0ed06a867a844";
83+
sha256 = "1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07";
84+
});
85+
postUnpack = "sourceRoot+=/binary/test; echo source root reset to \$sourceRoot";
86+
}

nix/.stack.nix/cardano-binary.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
4343
package = {
4444
specVersion = "1.10";
4545
identifier = { name = "cardano-binary"; version = "1.5.0"; };
46-
license = "MIT";
46+
license = "Apache-2.0";
4747
copyright = "2019 IOHK";
4848
maintainer = "operations@iohk.io";
4949
author = "IOHK";
@@ -101,8 +101,8 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
101101
} // {
102102
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
103103
url = "https://github.com/input-output-hk/cardano-base";
104-
rev = "0fcb3a306e96ce36fca75d62792c55ab1de871ea";
105-
sha256 = "0fbcf3iim4fh8m647ilw02ybbxiqna3zpny0w7rlqjgd4skfqvjr";
104+
rev = "474622cfde663730e10e2e0d5de0ed06a867a844";
105+
sha256 = "1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07";
106106
});
107107
postUnpack = "sourceRoot+=/binary; echo source root reset to \$sourceRoot";
108108
}

nix/.stack.nix/cardano-crypto-class.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
4343
package = {
4444
specVersion = "1.10";
4545
identifier = { name = "cardano-crypto-class"; version = "2.0.0"; };
46-
license = "MIT";
46+
license = "Apache-2.0";
4747
copyright = "2019 IOHK";
4848
maintainer = "operations@iohk.io";
4949
author = "IOHK";
@@ -90,8 +90,8 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
9090
} // {
9191
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
9292
url = "https://github.com/input-output-hk/cardano-base";
93-
rev = "0fcb3a306e96ce36fca75d62792c55ab1de871ea";
94-
sha256 = "0fbcf3iim4fh8m647ilw02ybbxiqna3zpny0w7rlqjgd4skfqvjr";
93+
rev = "474622cfde663730e10e2e0d5de0ed06a867a844";
94+
sha256 = "1waqjyp6ycmn8lqrsnb8d14p43645mqknd5m0apb7814s3xd3f07";
9595
});
9696
postUnpack = "sourceRoot+=/cardano-crypto-class; echo source root reset to \$sourceRoot";
9797
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
let
2+
buildDepError = pkg:
3+
builtins.throw ''
4+
The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+
'';
8+
sysDepError = pkg:
9+
builtins.throw ''
10+
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+
You may need to augment the system package mapping in haskell.nix so that it can be found.
13+
'';
14+
pkgConfDepError = pkg:
15+
builtins.throw ''
16+
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+
'';
20+
exeDepError = pkg:
21+
builtins.throw ''
22+
The local executable components do not include the component: ${pkg} (executable dependency).
23+
'';
24+
legacyExeDepError = pkg:
25+
builtins.throw ''
26+
The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+
'';
30+
buildToolDepError = pkg:
31+
builtins.throw ''
32+
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+
If this is a system dependency:
35+
You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+
If this is a Haskell dependency:
38+
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+
'';
40+
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+
{
42+
flags = { development = false; };
43+
package = {
44+
specVersion = "1.10";
45+
identifier = { name = "cardano-crypto-test"; version = "1.3.0"; };
46+
license = "MIT";
47+
copyright = "2018 IOHK";
48+
maintainer = "operations@iohk.io";
49+
author = "IOHK";
50+
homepage = "";
51+
url = "";
52+
synopsis = "Test helpers from cardano-crypto exposed to other packages";
53+
description = "Test helpers from cardano-crypto exposed to other packages";
54+
buildType = "Simple";
55+
isLocal = true;
56+
};
57+
components = {
58+
"library" = {
59+
depends = [
60+
(hsPkgs."base" or (buildDepError "base"))
61+
(hsPkgs."bytestring" or (buildDepError "bytestring"))
62+
(hsPkgs."cardano-binary" or (buildDepError "cardano-binary"))
63+
(hsPkgs."cardano-binary-test" or (buildDepError "cardano-binary-test"))
64+
(hsPkgs."cardano-crypto" or (buildDepError "cardano-crypto"))
65+
(hsPkgs."cardano-crypto-wrapper" or (buildDepError "cardano-crypto-wrapper"))
66+
(hsPkgs."cardano-prelude" or (buildDepError "cardano-prelude"))
67+
(hsPkgs."cardano-prelude-test" or (buildDepError "cardano-prelude-test"))
68+
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
69+
(hsPkgs."hedgehog" or (buildDepError "hedgehog"))
70+
(hsPkgs."memory" or (buildDepError "memory"))
71+
];
72+
buildable = true;
73+
};
74+
};
75+
} // {
76+
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
77+
url = "https://github.com/input-output-hk/cardano-ledger";
78+
rev = "6d533b72d4a91b756cd8ffe164928d5f5eebcfa0";
79+
sha256 = "08jbmlq5jj36jkn2iw9znl7jkgnjgq37i70asmp62igqyjhis8q6";
80+
});
81+
postUnpack = "sourceRoot+=/crypto/test; echo source root reset to \$sourceRoot";
82+
}

0 commit comments

Comments
 (0)