Skip to content

Commit 8f4e4f8

Browse files
PLT-8097 create marconi-cardano-chain-index (#273)
1 parent f28e196 commit 8f4e4f8

File tree

149 files changed

+1132
-1060
lines changed

Some content is hidden

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

149 files changed

+1132
-1060
lines changed

.github/workflows/haddock.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@ jobs:
2525
nix develop --command bash -c '
2626
cabal update
2727
cabal haddock marconi-core
28-
cabal haddock marconi-chain-index:lib:marconi-chain-index
28+
cabal haddock marconi-cardano-core:lib:marconi-cardano-core
29+
cabal haddock marconi-cardano-indexers:lib:marconi-cardano-indexers
30+
cabal haddock marconi-cardano-chain-index:lib:marconi-cardano-chain-index
2931
cabal haddock marconi-core-json-rpc
3032
'
3133
mkdir dist
3234
mkdir dist/marconi-core
33-
mkdir dist/marconi-chain-index
35+
mkdir dist/marconi-cardano-core
36+
mkdir dist/marconi-cardano-indexers
37+
mkdir dist/marconi-cardano-chain-index
3438
mkdir dist/marconi-core-json-rpc
3539
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-core-1.2.0.0/doc/html/marconi-core/* ./dist/marconi-core
36-
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-chain-index-1.2.0.0/doc/html/marconi-chain-index/* ./dist/marconi-chain-index
40+
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-cardano-core-1.2.0.0/doc/html/marconi-cardano-core/* ./dist/marconi-cardano-core
41+
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-cardano-indexers-1.2.0.0/doc/html/marconi-cardano-indexers/* ./dist/marconi-cardano-indexers
42+
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-cardano-chain-index-1.2.0.0/doc/html/marconi-cardano-chain-index/* ./dist/marconi-cardano-chain-index
3743
cp -RL ./dist-newstyle/build/x86_64-linux/ghc-9.2.8/marconi-core-json-rpc-1.2.0.0/doc/html/marconi-core-json-rpc/* ./dist/marconi-core-json-rpc
3844
- uses: JamesIves/github-pages-deploy-action@v4
3945
with:

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ The more in-depth user documentation is available in our http://example.com/TODO
3131
The Haskell API documentation (Haddock) for the Marconi libraries is hosted here:
3232

3333
* https://input-output-hk.github.io/marconi/main/marconi-core[marconi-core]
34-
* https://input-output-hk.github.io/marconi/main/marconi-chain-index[marconi-chain-index]
34+
* https://input-output-hk.github.io/marconi/main/marconi-cardano-chain-index[marconi-cardano-chain-index]
3535
* https://input-output-hk.github.io/marconi/main/marconi-core-json-rpc[marconi-core-json-rpc]
3636

3737
You may generate them directly with `Cabal` for each component:
3838

3939
```
4040
cabal haddock marconi-core
4141
cabal haddock marconi-core-json-rpc
42-
cabal haddock marconi-chain-index
42+
cabal haddock marconi-cardano-chain-index
4343
```
4444

4545
[[Architecture]]

benchmark/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Steps on running `prometheus` and `grafana` locally:
55
* Change the `enable` of `start-benchmark-machine` in `shell.nix` to `true`
66
* Open a Nix shell with `nix develop`
77
* Run `cardano-node`
8-
* Run `marconi-sidechain` (or `marconi-chain-index`) on port 8090
8+
* Run `marconi-sidechain` (or `marconi-cardano-chain-index`) on port 8090
99
* Run `start-benchmark-machine local` (available in the Nix shell)
1010
* Go to `http://localhost:8080` on your web browser.
1111
* Log in with `admin` as username and password.

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ index-state:
1717
, cardano-haskell-packages 2023-12-06T19:40:56Z
1818
packages: legacy/marconi-core-legacy
1919
legacy/marconi-chain-index-legacy
20-
marconi-chain-index
20+
marconi-cardano-chain-index
2121
marconi-core
2222
marconi-cardano-core
2323
marconi-cardano-indexers

doc/read-the-docs-site/adr/0003-observability.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Context
1919
-------
2020

2121
Whenever we add new features in Marconi, we inevitably end up in a state where we introduce a significant regression in sync time, CPU/RAM/Disk usage and query performance.
22-
Currently, developers who are adding new features will typically test those features by running ``marconi-chain-index`` or ``marconi-sidechain``, and manually visualize the CPU/RAM usage by running ``htop`` (or similar), checking syncing speed by reading the logs, and manually run queries after syncing is done.
22+
Currently, developers who are adding new features will typically test those features by running ``marconi-cardano-chain-index`` or ``marconi-sidechain``, and manually visualize the CPU/RAM usage by running ``htop`` (or similar), checking syncing speed by reading the logs, and manually run queries after syncing is done.
2323
However, that approach does not give accurate information for detecting regressions, because we only look at the logs at specific points in time and we might miss peaks in memory usage for example.
2424
Moreover, this testing approach does not scale for delivering on time the different features.
2525

doc/read-the-docs-site/adr/0004-marconi-sidechain-testing-strategy.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Context
1919
-------
2020

2121
A general approach to functional testing Marconi-Sidechains covering all test levels.
22-
The scope of this document is `marconi-sidechain`, not other Marconi applications such as `marconi-chain-index`.
22+
The scope of this document is `marconi-sidechain`, not other Marconi applications such as `marconi-cardano-chain-index`.
2323

2424
Decision
2525
--------
@@ -43,7 +43,7 @@ Decision
4343
UNIT TESTING:
4444

4545
* We will test indexers and filters with as many positive and negative combinations as possible using data-driven and property tests.
46-
However, it is not currently possible to test all parts in this way, such as the chain sync client, so we will lean more on the `cardano-node-emulator` to generate valid transactions for thorough testing in this area at the integration test level.
46+
However, it is not currently possible to test all parts in this way, such as the chain sync client, so we will lean more on the `cardano-node-emulator` to generate valid transactions for thorough testing in this area at the integration test level.
4747
. To support this, we will produce a generator to act like a "mockchain" to generate a variety of: blocks, transations and roll forward/backward events.
4848

4949
* We will only test functions and modules at lower layers to the CLI or RPC and not aim to cover these interfaces because we will get greater coverage of those with the integration tests.
@@ -72,7 +72,7 @@ END-TO-END TESTING:
7272
* We will sometimes perform exploratory testing on major features, such as new RPC methods or cli options.
7373
This can provide faster feedback in lieu of automation testing being produced.
7474
Should not be carried out by the engineer who implemented the feature (due to assumption bias).
75-
75+
7676
* We will produce tests for each of the RPC API methods to stress the filters.
7777
These tests will assert against known correct response content.
7878
These tests will ideally be run on mainnet because there is more interesting transaction data there and so are more likely to catch an edge-case.
@@ -107,7 +107,7 @@ Argument
107107

108108
Alternative solutions
109109
---------------------
110-
When testing marconi-chain-index we can take a similar approach but must also:
110+
When testing marconi-cardano-chain-index we can take a similar approach but must also:
111111
- test starting the application with the CLI's disable flags:
112112
- end-to-end test to check absence of db file being created after run
113113
- property test to randomise combinations

doc/read-the-docs-site/doc/marconi-as-a-library/tutorials/BasicApp.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import Cardano.Api qualified as C
4040
import Cardano.BM.Setup qualified as Trace
4141
import Cardano.BM.Tracing qualified as Trace
4242
import Data.Void (Void)
43+
import Marconi.Cardano.ChainIndex.Utils qualified as Utils
4344
import Marconi.Cardano.Core.Logger (mkMarconiTrace)
4445
import Marconi.Cardano.Core.Node.Client.Retry qualified as Core
4546
import Marconi.Cardano.Core.Orphans ()
@@ -51,7 +52,6 @@ import Marconi.Cardano.Core.Types (
5152
SecurityParam,
5253
)
5354
import Marconi.Cardano.Indexers.SyncHelper qualified as Core
54-
import Marconi.ChainIndex.Utils qualified as Utils
5555
import Marconi.Core qualified as Core
5656
import Marconi.Core.JsonRpc qualified as Core
5757
import Network.JsonRpc.Types (JsonRpc, RawJsonRpc)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Running `marconi-cardano-chain-index`
2+
=====================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
overview
8+
quickstart
9+
openapi-spec

doc/read-the-docs-site/doc/marconi-chain-index/openapi-spec.rst renamed to doc/read-the-docs-site/doc/marconi-cardano-chain-index/openapi-spec.rst

File renamed without changes.

doc/read-the-docs-site/doc/marconi-chain-index/overview.rst renamed to doc/read-the-docs-site/doc/marconi-cardano-chain-index/overview.rst

File renamed without changes.

0 commit comments

Comments
 (0)