Skip to content

Commit

Permalink
Merge pull request #415 from input-output-hk/refactor/remove-static-f…
Browse files Browse the repository at this point in the history
…irst-slot-in-current-epoch

Refactor/remove static first slot in current era
  • Loading branch information
rhyslbw authored Jan 31, 2021
2 parents c85ea82 + fbd695a commit 4615ded
Show file tree
Hide file tree
Showing 21 changed files with 426 additions and 90 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
env:
ALLOW_INTROSPECTION: true
CACHE_ENABLED: false
CURRENT_ERA_FIRST_SLOT: 16588800
CARDANO_GRAPHQL_VERSION: ${{ github.sha }}
-
name: Build Cardano GraphQL Dockerfile
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ COPY --from=cardano-graphql-builder /app/packages/util/package.json /app/package
COPY --from=cardano-graphql-production-deps /app/node_modules /app/node_modules
COPY --from=cardano-graphql-production-deps /app/packages/api-cardano-db-hasura/node_modules /app/packages/api-cardano-db-hasura/node_modules
COPY config/network/${NETWORK}/genesis /config/genesis/
COPY scripts/docker_entrypoint.sh /scripts/docker_entrypoint.sh
RUN mkdir /node-ipc
WORKDIR /app/packages/server/dist
EXPOSE 3100
ENTRYPOINT ["/scripts/docker_entrypoint.sh"]
CMD ["index.js"]
CMD ["node", "index.js"]
2 changes: 1 addition & 1 deletion config/ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
script: 'docker-compose',
args: [
'-f', `${path.resolve(__dirname, '..')}/docker-compose.dev.yml`,
'-p', `dev-${process.env.NETWORK}`,
'-p', `${process.env.NETWORK}`,
'up', '--build'
],
autorestart: false,
Expand Down
117 changes: 117 additions & 0 deletions config/network/mary_qa/cardano-db-sync/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"EnableLogMetrics": false,
"EnableLogging": true,
"NetworkName": "mary_qa",
"NodeConfigFile": "../cardano-node/config.json",
"RequiresNetworkMagic": "RequiresMagic",
"defaultBackends": [
"KatipBK"
],
"defaultScribes": [
[
"StdoutSK",
"stdout"
]
],
"hasPrometheus": [
"127.0.0.1",
12698
],
"minSeverity": "Info",
"options": {
"cfokey": {
"value": "Release-1.0.0"
},
"mapBackends": {},
"mapSeverity": {
"db-sync-node": "Info",
"db-sync-node.Mux": "Error",
"db-sync-node.Subscription": "Error"
},
"mapSubtrace": {
"#ekgview": {
"contents": [
[
{
"contents": "cardano.epoch-validation.benchmark",
"tag": "Contains"
},
[
{
"contents": ".monoclock.basic.",
"tag": "Contains"
}
]
],
[
{
"contents": "cardano.epoch-validation.benchmark",
"tag": "Contains"
},
[
{
"contents": "diff.RTS.cpuNs.timed.",
"tag": "Contains"
}
]
],
[
{
"contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark",
"tag": "StartsWith"
},
[
{
"contents": "diff.RTS.gcNum.timed.",
"tag": "Contains"
}
]
]
],
"subtrace": "FilterTrace"
},
"#messagecounters.aggregation": {
"subtrace": "NoTrace"
},
"#messagecounters.ekgview": {
"subtrace": "NoTrace"
},
"#messagecounters.katip": {
"subtrace": "NoTrace"
},
"#messagecounters.monitoring": {
"subtrace": "NoTrace"
},
"#messagecounters.switchboard": {
"subtrace": "NoTrace"
},
"benchmark": {
"contents": [
"GhcRtsStats",
"MonotonicClock"
],
"subtrace": "ObservableTrace"
},
"cardano.epoch-validation.utxo-stats": {
"subtrace": "NoTrace"
}
}
},
"rotation": {
"rpKeepFilesNum": 10,
"rpLogLimitBytes": 5000000,
"rpMaxAgeHours": 24
},
"setupBackends": [
"AggregationBK",
"KatipBK"
],
"setupScribes": [
{
"scFormat": "ScText",
"scKind": "StdoutSK",
"scName": "stdout",
"scRotation": null
}
]
}
1 change: 1 addition & 0 deletions config/network/mary_qa/cardano-db-sync/pgpass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/var/run/postgresql:5432:cexplorer:*:*
92 changes: 92 additions & 0 deletions config/network/mary_qa/cardano-node/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"ApplicationName": "cardano-sl",
"ApplicationVersion": 0,
"ByronGenesisFile": "../genesis/byron.json",
"ByronGenesisHash": "5fabaf2188b1b2a0dde0046ad564ca37c5d92e67b6d7e92da72b2bbc35dfed7e",
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 4,
"LastKnownBlockVersion-Minor": 0,
"PBftSignatureThreshold": 0.9,
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"ShelleyGenesisFile": "../genesis/shelley.json",
"ShelleyGenesisHash": "93cfc4fcb0061ae69960efb328d88cf0ab3d709049c0675714c1dd41312d7be7",
"TestAllegraHardForkAtEpoch": 2,
"TestMaryHardForkAtEpoch": 3,
"TestShelleyHardForkAtEpoch": 1,
"TraceBlockFetchClient": false,
"TraceBlockFetchDecisions": false,
"TraceBlockFetchProtocol": false,
"TraceBlockFetchProtocolSerialised": false,
"TraceBlockFetchServer": false,
"TraceChainDb": true,
"TraceChainSyncBlockServer": false,
"TraceChainSyncClient": false,
"TraceChainSyncHeaderServer": false,
"TraceChainSyncProtocol": false,
"TraceDNSResolver": true,
"TraceDNSSubscription": true,
"TraceErrorPolicy": true,
"TraceForge": true,
"TraceHandshake": false,
"TraceIpSubscription": true,
"TraceLocalChainSyncProtocol": false,
"TraceLocalErrorPolicy": true,
"TraceLocalHandshake": false,
"TraceLocalTxSubmissionProtocol": false,
"TraceLocalTxSubmissionServer": false,
"TraceMempool": true,
"TraceMux": false,
"TraceTxInbound": false,
"TraceTxOutbound": false,
"TraceTxSubmissionProtocol": false,
"TracingVerbosity": "NormalVerbosity",
"TurnOnLogMetrics": true,
"TurnOnLogging": true,
"defaultBackends": [
"KatipBK"
],
"defaultScribes": [
[
"StdoutSK",
"stdout"
]
],
"hasEKG": 12788,
"hasPrometheus": [
"127.0.0.1",
12798
],
"minSeverity": "Info",
"options": {
"mapBackends": {
"cardano.node.metrics": [
"EKGViewBK"
],
"cardano.node.resources": [
"EKGViewBK"
]
},
"mapSubtrace": {
"cardano.node.metrics": {
"subtrace": "Neutral"
}
}
},
"rotation": {
"rpKeepFilesNum": 10,
"rpLogLimitBytes": 5000000,
"rpMaxAgeHours": 24
},
"setupBackends": [
"KatipBK"
],
"setupScribes": [
{
"scFormat": "ScText",
"scKind": "StdoutSK",
"scName": "stdout",
"scRotation": null
}
]
}
9 changes: 9 additions & 0 deletions config/network/mary_qa/cardano-node/topology.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Producers": [
{
"addr": "relays-new.mary-qa.dev.cardano.org",
"port": 3001,
"valency": 2
}
]
}
67 changes: 67 additions & 0 deletions config/network/mary_qa/genesis/byron.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{ "bootStakeholders":
{ "1d96828eeaed1452b6e24883cdd6377c8fc9762d4d9e419b5ce546d2": 1
, "44aaaa5acb7cb3b1425925847159dc07cb8239f0bb8b401a9b8c4e40": 1
, "876ec05f35063263c929a08fc391091b60d56b6d6e599a678b05b1b9": 1
}
, "heavyDelegation":
{ "1d96828eeaed1452b6e24883cdd6377c8fc9762d4d9e419b5ce546d2":
{ "omega": 0
, "issuerPk":
"DYdomYtl+WbCYrw6pJ/rXaD9pbj0JGsqR0wo4acJdgJ01L43IwBELhaQWeRfljvjKmKodC5hTgDTCrjsPyRNbA=="
, "delegatePk":
"TimwEhx0MrE7qhVjWu5KJCXkXaOAJEDPO8Lg5kKtfufzD8rI0sudf+i/2Pi9HaTZhnMz/NEP9DvUE9Pwx7Og3w=="
, "cert":
"f5c97a8734f471ad4190517f89dde1c7ba2ef877d910badf95db294d2e02c6b2df95c5ac8fa007ede64242977950ccef1e613e44c699e664cb46147de00b3506"
}
, "44aaaa5acb7cb3b1425925847159dc07cb8239f0bb8b401a9b8c4e40":
{ "omega": 0
, "issuerPk":
"SrFeckyAd/DBdtjcM1UwczxfOTHZ2KmoYxezgelwxZM9WidrsRaam+3B5co2z8KxSksqaTSsmnqPfmSdIhaPWQ=="
, "delegatePk":
"45f+1ccXVywFao3cCdLId2Pu1cMbMFBVxVmrf0bRRFVRweuQ6lbT7PPniphCj3fGe3pFoLjAG9NjQ/two4eP6w=="
, "cert":
"5f9dc2f9d01801ab1b88acfa99a1d5c636131f90551fdffa91886456127f0f07558de050460457d45d93c1104b5b3c49b48ce2a47e161c9c446a0376641ca001"
}
, "876ec05f35063263c929a08fc391091b60d56b6d6e599a678b05b1b9":
{ "omega": 0
, "issuerPk":
"C08UuPfZfuwQJEj8YUwc90QU8RCWGX+6MsDZH1skUP4pI92aQZZbOigwfRTyUx8Sl7rR2RFQgYnTLZzasRgT2w=="
, "delegatePk":
"m3x6O1tGfDpT5qFdThjaNlSr9WI25IujsVoS9YYtEb2N9THyFSL3utm+RXLl0H88FhFg7TeBmxH3/hM9XPQkbg=="
, "cert":
"54eb24b5c9fee6b62011f17241f8ac04e6ee8546720d8302881c4592e60d2be4f8b8c2b743e5899dc23f2f35dec3e1722c69f28c4018b2242a4fb618d0953205"
}
}
, "startTime": 1611604800
, "nonAvvmBalances":
{ "FHnt4NL7yPXjc63AQzkv43hE9PJW1DkTqAiJdJQ7PDvo89hbXtaeT3ptQL5Dfra":
"15000000000000000"
, "FHnt4NL7yPY4c5grFn5q1nodhDxn6Jbzydtb4iAysxQw54mXGidE3XDc32HbCvH":
"15000000000000000"
, "FHnt4NL7yPYHa18vFUxyJ5eJKt2sCarN3sQ9umLpyPyE7mgrHoqaWQ4YzPRQS5f":
"15000000000000000"
}
, "blockVersionData":
{ "scriptVersion": 0
, "slotDuration": "20000"
, "maxBlockSize": "2000000"
, "maxHeaderSize": "2000000"
, "maxTxSize": "4096"
, "maxProposalSize": "700"
, "mpcThd": "20000000000000"
, "heavyDelThd": "300000000000"
, "updateVoteThd": "1000000000000"
, "updateProposalThd": "100000000000000"
, "updateImplicit": "10000"
, "softforkRule":
{ "initThd": "900000000000000"
, "minThd": "600000000000000"
, "thdDecrement": "50000000000000"
}
, "txFeePolicy":
{ "summand": "155381000000000" , "multiplier": "43946000000" }
, "unlockStakeEpoch": "18446744073709551615"
}
, "protocolConsts": { "k": 36 , "protocolMagic": 3 }
, "avvmDistr": {}
}
56 changes: 56 additions & 0 deletions config/network/mary_qa/genesis/shelley.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"activeSlotsCoeff": 5.0e-2,
"protocolParams": {
"protocolVersion": {
"minor": 0,
"major": 2
},
"decentralisationParam": 1,
"eMax": 18,
"extraEntropy": {
"tag": "NeutralNonce"
},
"maxTxSize": 16384,
"maxBlockBodySize": 65536,
"maxBlockHeaderSize": 1100,
"minFeeA": 44,
"minFeeB": 155381,
"minUTxOValue": 1000000,
"poolDeposit": 500000000,
"minPoolCost": 340000000,
"keyDeposit": 2000000,
"nOpt": 150,
"rho": 0.003,
"tau": 0.20,
"a0": 0.3
},
"genDelegs": {
"615386fb2fe3d5fc9c2f280006ddbe74b8d4f43d79f7b0cb33ab7989": {
"delegate": "4264734bba700f6ff5193e944dd317e8354ca83dc5ef3652c0c168d2",
"vrf": "fe841c44dbb7c9584d0c678de5770f5a714bde9357c085a457a13c762d909f7b"
},
"5512207c13c18d0b1f2dce07263a34ed3686d4b5ffa771253e1d291d": {
"delegate": "f7e5993c5803375659c0bed57748b1214b8c06b34cdfb023cb4de3d5",
"vrf": "387b2057e3b33290f082e6efc0f5ff4620efe81441409dba80c2b2ce700f30b8"
},
"7ea4754369eded12763ae380e482c76b768943519c5259fda75d34af": {
"delegate": "60ba00ef6fce6f1c38a70408dc0e79862298eacc427196ce3419ea31",
"vrf": "57575ee33152f5c342b15be1efbf67f8e84b36a14e32a5fb984ad2b6b4823b6f"
}
},
"updateQuorum": 3,
"networkId": "Testnet",
"initialFunds": {},
"maxLovelaceSupply": 60000000000000000,
"networkMagic": 3,
"epochLength": 7200,
"staking": {
"pools": {},
"stake": {}
},
"systemStart": "2021-01-25T20:00:00.000000000Z",
"slotsPerKESPeriod": 129600,
"slotLength": 1,
"maxKESEvolutions": 62,
"securityParam": 36
}
Loading

0 comments on commit 4615ded

Please sign in to comment.