Skip to content

Commit 79da67d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents b0805b8 + 6c18df8 commit 79da67d

File tree

99 files changed

+1978
-982
lines changed

Some content is hidden

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

99 files changed

+1978
-982
lines changed

.github/ISSUE_TEMPLATE/user-facing-feature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ assignees: ''
5656

5757
Acceptance Criteria & User Stories define here (or in a separate file (linked here) for a big feature)
5858

59-
Example - https://github.com/input-output-hk/cardano-node/issues/4453
59+
Example - https://github.com/intersectmbo/cardano-node/issues/4453

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
env:
3333
# Modify this value to "invalidate" the cabal cache.
34-
CABAL_CACHE_VERSION: "2023-11-20-3"
34+
CABAL_CACHE_VERSION: "2023-12-15"
3535

3636
concurrency:
3737
group: >

.github/workflows/release-ghcr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
sleep 30;;
4242
esac
4343
done
44-
44+
4545
build:
4646
needs: [wait-for-hydra]
4747
name: "Upload to ghcr.io"
@@ -64,7 +64,7 @@ jobs:
6464
# pushed the tagged commit somewhere, and Hydra will have had the
6565
# change to build the image.
6666

67-
- name: Uploading input-output-hk/cardano-node
67+
- name: Uploading intersectmbo/cardano-node
6868
run: |
6969
echo "::group::Downloading from cache"
7070
nix build --accept-flake-config --print-out-paths --builders "" --max-jobs 0 ${{ steps.flake-metadata.outputs.LOCKED_URL }}#dockerImage/node

CONTRIBUTING.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We maintain a [CODEOWNERS file][CODEOWNERS] which provides information who
1414
should review a contributing PR. Note that you might need to get approvals
1515
from all code owners (even though GitHub doesn't give a way to enforce it).
1616

17-
[CODEOWNERS]: https://github.com/input-output-hk/cardano-node/blob/master//CODEOWNERS
17+
[CODEOWNERS]: https://github.com/intersectmbo/cardano-node/blob/master//CODEOWNERS
1818

1919

2020
Supplementary tooling
@@ -105,12 +105,12 @@ You can quickly spin up a local cluster (on Linux and Darwin), based on any of a
105105
- ``devops`` is an unloaded profile (no transaction generation) with short slots -- ``0.2`` sec.
106106
- ..and many more -- which can be either:
107107
- listed, by ``make ps``
108-
- observed at their point of definition: `nix/workbench/profiles/prof1-variants.jq <https://github.com/input-output-hk/cardano-node/tree/master/nix/workbench/profiles/prof1-variants.jq#L333-L526>`_
108+
- observed at their point of definition: `nix/workbench/profiles/prof1-variants.jq <https://github.com/intersectmbo/cardano-node/tree/master/nix/workbench/profiles/prof1-variants.jq#L333-L526>`_
109109
2. Optional: select mode of operation, by optionally providing a suffix:
110110
- default -- no suffix -- just enter the workbench shell, allowing you to run ``start-cluster`` at any time. Binaries will be built locally, by ``cabal``.
111111
- ``autostay`` suffix -- enter the workbench shell, start the cluster, and stay in the shell afterwards. Binaries will be built locally, by ``cabal``.
112112
- ``autonix`` suffix -- enter the workbench shell, start the cluster. All binaries will be provided by the Nix CI.
113-
- ..there are other modes, as per `lib.mk <https://github.com/input-output-hk/cardano-node/tree/master/lib.mk>`_
113+
- ..there are other modes, as per `lib.mk <https://github.com/intersectmbo/cardano-node/tree/master/lib.mk>`_
114114
3. Enter the workbench shell for the chosen profile & mode:
115115
``make <PROFILE-NAME>`` or ``make <PROFILE-NAME>-<SUFFIX>`` (when there is a suffix).
116116
4. Optional: start cluster:

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PROFILE ?= default-${ERA}
1414
BACKEND ?= supervisor
1515
REV ?= master
1616
ITER ?=
17+
BATCH ?=
1718
ARGS ?=
1819
CMD ?=
1920
RUN ?=
@@ -73,11 +74,12 @@ ps: ## Plain-text list of profiles
7374
##
7475
## Profile-based cluster shells (autogenerated targets)
7576
##
76-
PROFILES_BASE := default plutus plutus-secp-ecdsa plutus-secp-schnorr oldtracing idle tracer-only
77+
PROFILES_BASE := default default-p2p plutus plutus-secp-ecdsa plutus-secp-schnorr oldtracing idle tracer-only
7778
PROFILES_FAST := fast fast-p2p fast-plutus fast-notracer fast-oldtracing
7879
PROFILES_CI_TEST := ci-test ci-test-p2p ci-test-plutus ci-test-notracer ci-test-rtview ci-test-dense10
7980
PROFILES_CI_BENCH := ci-bench ci-bench-p2p ci-bench-plutus ci-bench-plutus-secp-ecdsa ci-bench-plutus-secp-schnorr ci-bench-notracer ci-bench-rtview
8081
PROFILES_TRACE_BENCH := trace-bench trace-bench-notracer trace-bench-oldtracing trace-bench-rtview
82+
PROFILES_TRACE_FULL := trace-full trace-full-rtview
8183
PROFILES_EPOCHTRANS := epoch-transition
8284
PROFILES_PLUTUSCALL := plutuscall-loop-plain plutuscall-secp-ecdsa-plain plutuscall-secp-schnorr-plain
8385
PROFILES_PLUTUSCALL += plutuscall-loop-half plutuscall-secp-ecdsa-half plutuscall-secp-schnorr-half
@@ -99,12 +101,16 @@ PROFILES_NOMAD_CW_QA := default-nomadcwqa ci-test-nomadcwqa ci-bench-nomadc
99101
# Cloud version of "default", "ci-test" and "ci-bench" plus value (52+explorer)
100102
# Not all local profiles are compatible or tested (yet) with a cloud runs
101103
PROFILES_NOMAD_PERF := default-nomadperf ci-test-nomadperf ci-bench-nomadperf value-nomadperf oldtracing-nomadperf ci-test-oldtracing-nomadperf ci-bench-oldtracing-nomadperf value-oldtracing-nomadperf
104+
PROFILES_NOMAD_PERF += plutus-nomadperf
105+
PROFILES_NOMAD_PERF_NOP2P := default-nomadperf-nop2p oldtracing-nomadperf-nop2p ci-test-nomadperf-nop2p ci-bench-nomadperf-nop2p
106+
PROFILES_NOMAD_PERF_NOP2P += value-nomadperf-nop2p value-oldtracing-nomadperf-nop2p plutus-nomadperf-nop2p
102107

103108
LOCAL_PROFILES += $(PROFILES_BASE)
104109
LOCAL_PROFILES += $(PROFILES_FAST)
105110
LOCAL_PROFILES += $(PROFILES_CI_TEST)
106111
LOCAL_PROFILES += $(PROFILES_CI_BENCH)
107112
LOCAL_PROFILES += $(PROFILES_TRACE_BENCH)
113+
LOCAL_PROFILES += $(PROFILES_TRACE_FULL)
108114
LOCAL_PROFILES += $(PROFILES_EPOCHTRANS)
109115
LOCAL_PROFILES += $(PROFILES_PLUTUSCALL)
110116
LOCAL_PROFILES += $(PROFILES_MODEL)
@@ -115,6 +121,8 @@ LOCAL_PROFILES += $(PROFILES_FORGE_STRESS_RTS)
115121
LOCAL_PROFILES += $(PROFILES_CHAINSYNC)
116122
LOCAL_PROFILES += $(PROFILES_VENDOR)
117123
CLOUD_PROFILES += $(PROFILES_NOMAD_CW_QA) $(PROFILES_NOMAD_PERF)
124+
CLOUD_PROFILES += $(PROFILES_NOMAD_PERF_NOP2P)
125+
118126

119127
## Note: to enable a shell for a profile, just add its name (one of names from 'make ps') to SHELL_PROFILES
120128

README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
.. raw:: html
22

33
<p align="center">
4-
<a href="https://github.com/input-output-hk/cardano-node/releases"><img src="https://img.shields.io/github/release-pre/input-output-hk/cardano-node.svg?style=for-the-badge" /></a>
4+
<a href="https://github.com/intersectmbo/cardano-node/releases"><img src="https://img.shields.io/github/release-pre/intersectmbo/cardano-node.svg?style=for-the-badge" /></a>
55
</p>
66

77
<table align="center">
88
<tr><td colspan="2" align="center">GitHub Actions</td></tr>
99
<tr>
1010
<td>
11-
<a href="https://github.com/input-output-hk/cardano-node/actions/workflows/haskell.yml"><img alt="GitHub Workflow Status (master)" src="https://img.shields.io/github/workflow/status/input-output-hk/cardano-node/Haskell%20CI/master" /></a>
12-
<a href="https://github.com/input-output-hk/cardano-node/actions/workflows/haskell.yml"><img alt="GitHub Workflow Status (branch)" src="https://img.shields.io/github/workflow/status/input-output-hk/cardano-node/Haskell%20CI/nightly?label=nightly" /></a>
11+
<a href="https://github.com/intersectmbo/cardano-node/actions/workflows/haskell.yml"><img alt="GitHub Workflow Status (master)" src="https://img.shields.io/github/actions/workflow/status/intersectmbo/cardano-node/haskell.yml?branch=master" /></a>
12+
<a href="https://github.com/intersectmbo/cardano-node/actions/workflows/haskell.yml"><img alt="GitHub Workflow Status (branch)" src="https://img.shields.io/github/actions/workflow/status/intersectmbo/cardano-node/haskell.yml?branch=nightly" /></a>
1313
</td>
1414
</tr>
1515
</table>
@@ -20,7 +20,7 @@
2020
Overview of the ``cardano-node`` repository
2121
*************************
2222

23-
Integration of the `ledger <https://github.com/input-output-hk/cardano-ledger-specs>`_, `consensus <https://github.com/input-output-hk/ouroboros-network/tree/master/ouroboros-consensus>`_,
23+
Integration of the `ledger <https://github.com/input-output-hk/cardano-ledger-specs>`_, `consensus <https://github.com/input-output-hk/ouroboros-consensus>`_,
2424
`networking <https://github.com/input-output-hk/ouroboros-network/tree/master/ouroboros-network>`_ and
2525
`node shell <https://github.com/input-output-hk/cardano-shell>`_ repositories.
2626

@@ -52,7 +52,7 @@ Documentation for building the node can be found `here <https://docs.cardano.org
5252
Executables
5353
===========
5454

55-
You can download the hydra binaries of ``cardano-node`` and ``cardano-cli`` from the `release notes <https://github.com/input-output-hk/cardano-node/releases>`_
55+
You can download the hydra binaries of ``cardano-node`` and ``cardano-cli`` from the `release notes <https://github.com/intersectmbo/cardano-node/releases>`_
5656

5757

5858
Running the node on Windows
@@ -135,7 +135,7 @@ Configuration
135135
====
136136

137137
The ``--config`` flag points to a ``.yaml`` (or a structurally equivalent ``.json``) file that is responsible to configuring the logging & other important settings for the node. E.g. see the Byron mainnet configuration in this
138-
`configuration.yaml <https://github.com/input-output-hk/cardano-node/blob/master/configuration/defaults/byron-mainnet/configuration.yaml>`_.
138+
`configuration.yaml <https://github.com/intersectmbo/cardano-node/blob/master/configuration/defaults/byron-mainnet/configuration.yaml>`_.
139139

140140
Some of the more important settings are as follows:
141141

@@ -437,13 +437,13 @@ To help you get started, see:
437437

438438
- `Native tokens exercises <https://github.com/input-output-hk/cardano-node-wiki/wiki/03-exercises>`_
439439

440-
To start, please ensure that you are familiar with setting up and operating the `Cardano node <https://github.com/input-output-hk/cardano-node>`_. Alternatively, see instructions on how to `start your node <https://github.com/input-output-hk/cardano-node-wiki/wiki/2_start_your_nodes>`_ to submit the commands. You will not need to set up and start a full block producing node ('stake pool'), just a much simpler relay node. This node will need to connect to a Cardano network that is capable of processing native tokens (e.g., the native token pre-production environment (PPE), or the Cardano mainnet).
440+
To start, please ensure that you are familiar with setting up and operating the `Cardano node <https://github.com/intersectmbo/cardano-node>`_. Alternatively, see instructions on how to `start your node <https://github.com/input-output-hk/cardano-node-wiki/wiki/2_start_your_nodes>`_ to submit the commands. You will not need to set up and start a full block producing node ('stake pool'), just a much simpler relay node. This node will need to connect to a Cardano network that is capable of processing native tokens (e.g., the native token pre-production environment (PPE), or the Cardano mainnet).
441441

442442
****
443443
API Documentation
444444
****
445445

446-
The API documentation is published `here <https://input-output-hk.github.io/cardano-node/>`_.
446+
The API documentation is published `here <https://cardano-node.cardano.intersectmbo.org/>`_.
447447

448448
The documentation is built with each push, but is only published from ``master`` branch. In order to
449449
test if the documentation is working, build the documentation locally with ``cabal haddock-project --local --output=./haddocks`` and

bench/locli/src/Cardano/Unlog/LogObject.hs

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module Cardano.Unlog.LogObject
3131
where
3232

3333
import Cardano.Prelude hiding (Text, show)
34+
import GHC.Conc (numCapabilities)
3435
import Prelude (id, show, unzip3)
3536

3637
import qualified Data.Aeson as AE
@@ -95,7 +96,7 @@ data HostLogs a
9596
, hlRawFirstAt :: Maybe UTCTime
9697
, hlRawLastAt :: Maybe UTCTime
9798
}
98-
deriving (Generic)
99+
deriving (Generic, NFData)
99100

100101
deriving instance FromJSON a => FromJSON (HostLogs a)
101102
deriving instance ToJSON a => ToJSON (HostLogs a)
@@ -117,11 +118,24 @@ rlLogs = fmap hlLogs . Map.elems . rlHostLogs
117118

118119
runLiftLogObjects :: RunLogs () -> Bool -> Maybe [LOAnyType]
119120
-> ExceptT LText.Text IO (RunLogs [LogObject])
120-
runLiftLogObjects rl@RunLogs{..} okDErr loAnyLimit = liftIO $ do
121-
forConcurrently (Map.toList rlHostLogs)
122-
(uncurry readHostLogs)
123-
<&> \kvs -> rl { rlHostLogs = Map.fromList kvs }
121+
runLiftLogObjects rl@RunLogs{..} okDErr loAnyLimit = liftIO $
122+
go Map.empty 0 simultaneousReads
124123
where
124+
go (force -> !acc) batchBase = \case
125+
[] -> pure $ rl{ rlHostLogs = acc }
126+
c:cs -> do
127+
let batchBase' = batchBase + length c
128+
when (length c > 1) $
129+
progress "logs" (Q $ printf "processing batch %d - %d" batchBase (batchBase' - 1))
130+
hlsMap <- readHostLogChunk c
131+
go (acc `Map.union` hlsMap) batchBase' cs
132+
133+
simultaneousReads = chunksOf numCapabilities (Map.toList rlHostLogs)
134+
135+
readHostLogChunk :: [(Host, HostLogs ())] -> IO (Map Host (HostLogs [LogObject]))
136+
readHostLogChunk hls =
137+
Map.fromList <$> forConcurrently hls (uncurry readHostLogs)
138+
125139
readHostLogs :: Host -> HostLogs () -> IO (Host, HostLogs [LogObject])
126140
readHostLogs h hl@HostLogs{..} =
127141
readLogObjectStream (unJsonLogfile $ fst hlLogs) okDErr loAnyLimit
@@ -523,14 +537,14 @@ parsePartialResourceStates =
523537
rGcsMajor <- o .: "GcsMajor"
524538
rGcsMinor <- o .: "GcsMinor"
525539
rAlloc <- o .: "Alloc"
526-
rLive <- o .:? "Heap" <&> fromMaybe 0
527-
rHeap <- o .: "Live"
540+
rLive <- o .: "Live"
541+
rHeap <- o .:? "Heap" .!= 0
528542
rRSS <- o .: "RSS"
529543
rCentiBlkIO <- o .: "CentiBlkIO"
530-
rNetRd <- o .:? "NetRd" <&> fromMaybe 0
531-
rNetWr <- o .:? "NetWr" <&> fromMaybe 0
532-
rFsRd <- o .:? "FsRd" <&> fromMaybe 0
533-
rFsWr <- o .:? "FsWr" <&> fromMaybe 0
544+
rNetRd <- o .:? "NetRd" .!= 0
545+
rNetWr <- o .:? "NetWr" .!= 0
546+
rFsRd <- o .:? "FsRd" .!= 0
547+
rFsWr <- o .:? "FsWr" .!= 0
534548
rThreads <- o .: "Threads"
535549
pure Resources{..}
536550

bench/locli/src/Cardano/Util.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import GHC.Utils.Misc as Util
4444
hiding (fst3, snd3, third3, uncurry3)
4545
#endif
4646

47-
import Data.Aeson (FromJSON (..), ToJSON (..), Object, Value (..), (.:), (.:?), withObject, object)
47+
import Data.Aeson (FromJSON (..), ToJSON (..), Object, Value (..), (.:), (.:?), (.!=), withObject, object)
4848
import Data.Aeson qualified as AE
4949
import Control.Arrow ((&&&), (***))
5050
import Control.Applicative ((<|>))

bench/plutus-scripts-bench/plutus-scripts-bench.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ library
7373
-- IOG dependencies
7474
--------------------------
7575
build-depends:
76-
, cardano-api ^>= 8.35
76+
, cardano-api ^>= 8.36.0.1
7777
, plutus-ledger-api >=1.0.0
7878
, plutus-tx >=1.0.0
7979
, plutus-tx-plugin >=1.0.0

bench/tx-generator/src/Cardano/Benchmarking/GeneratorTx/SizedMetadata.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,12 @@ measureBSCosts era = map (metadataSize era . Just . bsMetadata) [0..maxBSSize]
108108
metadataSize :: forall era . IsShelleyBasedEra era => AsType era -> Maybe TxMetadata -> Int
109109
metadataSize p m = dummyTxSize p m - dummyTxSize p Nothing
110110

111-
dummyTxSizeInEra :: forall era . IsShelleyBasedEra era => TxMetadataInEra era -> Int
112-
dummyTxSizeInEra metadata = case createAndValidateTransactionBody (shelleyBasedEra @era) dummyTx of
111+
dummyTxSizeInEra :: IsShelleyBasedEra era => TxMetadataInEra era -> Int
112+
dummyTxSizeInEra metadata = case createAndValidateTransactionBody shelleyBasedEra dummyTx of
113113
Right b -> BS.length $ serialiseToCBOR b
114114
Left err -> error $ "metaDataSize " ++ show err
115115
where
116-
dummyTx :: TxBodyContent BuildTx era
117-
dummyTx = defaultTxBodyContent (cardanoEra @era)
116+
dummyTx = defaultTxBodyContent shelleyBasedEra
118117
& setTxIns
119118
[ ( TxIn "dbaff4e270cfb55612d9e2ac4658a27c79da4a5271c6f90853042d1403733810" (TxIx 0)
120119
, BuildTxWith $ KeyWitness KeyWitnessForSpending

0 commit comments

Comments
 (0)