From 64c899d289f3b5bf92b5feb4bb56208a0ad2be6d Mon Sep 17 00:00:00 2001 From: Mikhail_Linnik1 Date: Wed, 24 Apr 2024 21:27:11 +0200 Subject: [PATCH] RA-60: Bug fixed, unnecessary files deleted, github workflow added, Ready for PR --- .github/workflows/docker-build.yaml | 11 +- config/mainnet/config.json | 12 +- config/preprod/config.json | 8 +- config/preview/alonzo-genesis.json | 196 ++++++++++++++++++++++++++ config/preview/byron-genesis.json | 117 +++++++++++++++ config/preview/config.json | 114 +++++++++++++++ config/preview/conway-genesis.json | 38 +++++ config/preview/shelley-genesis.json | 68 +++++++++ config/preview/topology.json | 23 +++ config/sanchonet/alonzo-genesis.json | 188 ++++++++++++++++++++++++ config/sanchonet/byron-genesis.json | 62 ++++++++ config/sanchonet/config.json | 114 +++++++++++++++ config/sanchonet/conway-genesis.json | 39 +++++ config/sanchonet/shelley-genesis.json | 56 ++++++++ config/sanchonet/topology.json | 23 +++ config/testnet/config.json | 8 +- docker/.env.dockerfile | 19 ++- docker/Dockerfile | 10 +- docker/Dockerfile_lite | 51 ------- docker/Dockerfile_node | 121 ---------------- docker/copy_node_libs.sh | 1 - docker/entrypoint.sh | 12 +- docker/readme.md | 74 ++++++++++ 23 files changed, 1146 insertions(+), 219 deletions(-) create mode 100644 config/preview/alonzo-genesis.json create mode 100644 config/preview/byron-genesis.json create mode 100644 config/preview/config.json create mode 100644 config/preview/conway-genesis.json create mode 100644 config/preview/shelley-genesis.json create mode 100644 config/preview/topology.json create mode 100644 config/sanchonet/alonzo-genesis.json create mode 100644 config/sanchonet/byron-genesis.json create mode 100644 config/sanchonet/config.json create mode 100644 config/sanchonet/conway-genesis.json create mode 100644 config/sanchonet/shelley-genesis.json create mode 100644 config/sanchonet/topology.json delete mode 100644 docker/Dockerfile_lite delete mode 100644 docker/Dockerfile_node delete mode 100644 docker/copy_node_libs.sh diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 052a006b..4b47fa33 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -1,7 +1,7 @@ name: Build docker file run-name: Build docker file on: - pull_request: + push: branches: - feat/RA-60-Single-docker-container jobs: @@ -10,10 +10,5 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: '21' - distribution: 'temurin' - cache: maven + - name: Build docker images + run: docker build -t cardano-rosetta-java -f ./docker/Dockerfile . diff --git a/config/mainnet/config.json b/config/mainnet/config.json index b38315cf..026f5c3f 100644 --- a/config/mainnet/config.json +++ b/config/mainnet/config.json @@ -1,23 +1,25 @@ { - "AlonzoGenesisFile": "/config/alonzo-genesis.json", + "AlonzoGenesisFile": "/current/alonzo-genesis.json", "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874", - "ByronGenesisFile": "/config/byron-genesis.json", + "ByronGenesisFile": "/current/byron-genesis.json", "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb", - "ConwayGenesisFile": "/config/conway-genesis.json", + "ConwayGenesisFile": "/current/conway-genesis.json", "ConwayGenesisHash": "de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e", "EnableP2P": true, "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 0, "MaxKnownMajorProtocolVersion": 2, + "MinNodeVersion": "8.9.2", + "PeerSharing": true, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresNoMagic", - "ShelleyGenesisFile": "/config/shelley-genesis.json", + "ShelleyGenesisFile": "/current/shelley-genesis.json", "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81", "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 100, - "TargetNumberOfRootPeers": 100, + "TargetNumberOfRootPeers": 60, "TraceAcceptPolicy": true, "TraceBlockFetchClient": false, "TraceBlockFetchDecisions": false, diff --git a/config/preprod/config.json b/config/preprod/config.json index 92297d10..2774dfcc 100644 --- a/config/preprod/config.json +++ b/config/preprod/config.json @@ -1,9 +1,9 @@ { - "AlonzoGenesisFile": "/config/alonzo-genesis.json", + "AlonzoGenesisFile": "/current/alonzo-genesis.json", "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874", - "ByronGenesisFile": "/config/byron-genesis.json", + "ByronGenesisFile": "/current/byron-genesis.json", "ByronGenesisHash": "d4b8de7a11d929a323373cbab6c1a9bdc931beffff11db111cf9d57356ee1937", - "ConwayGenesisFile": "/config/conway-genesis.json", + "ConwayGenesisFile": "/current/conway-genesis.json", "ConwayGenesisHash": "de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e", "EnableP2P": true, "LastKnownBlockVersion-Alt": 0, @@ -13,7 +13,7 @@ "PeerSharing": true, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", - "ShelleyGenesisFile": "/config/shelley-genesis.json", + "ShelleyGenesisFile": "/current/shelley-genesis.json", "ShelleyGenesisHash": "162d29c4e1cf6b8a84f2d692e67a3ac6bc7851bc3e6e4afe64d15778bed8bd86", "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, diff --git a/config/preview/alonzo-genesis.json b/config/preview/alonzo-genesis.json new file mode 100644 index 00000000..0fd90dee --- /dev/null +++ b/config/preview/alonzo-genesis.json @@ -0,0 +1,196 @@ +{ + "lovelacePerUTxOWord": 34482, + "executionPrices": { + "prSteps": + { + "numerator" : 721, + "denominator" : 10000000 + }, + "prMem": + { + "numerator" : 577, + "denominator" : 10000 + } + }, + "maxTxExUnits": { + "exUnitsMem": 10000000, + "exUnitsSteps": 10000000000 + }, + "maxBlockExUnits": { + "exUnitsMem": 50000000, + "exUnitsSteps": 40000000000 + }, + "maxValueSize": 5000, + "collateralPercentage": 150, + "maxCollateralInputs": 3, + "costModels": { + "PlutusV1": { + "sha2_256-memory-arguments": 4, + "equalsString-cpu-arguments-constant": 1000, + "cekDelayCost-exBudgetMemory": 100, + "lessThanEqualsByteString-cpu-arguments-intercept": 103599, + "divideInteger-memory-arguments-minimum": 1, + "appendByteString-cpu-arguments-slope": 621, + "blake2b-cpu-arguments-slope": 29175, + "iData-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-slope": 1000, + "unBData-cpu-arguments": 150000, + "multiplyInteger-cpu-arguments-intercept": 61516, + "cekConstCost-exBudgetMemory": 100, + "nullList-cpu-arguments": 150000, + "equalsString-cpu-arguments-intercept": 150000, + "trace-cpu-arguments": 150000, + "mkNilData-memory-arguments": 32, + "lengthOfByteString-cpu-arguments": 150000, + "cekBuiltinCost-exBudgetCPU": 29773, + "bData-cpu-arguments": 150000, + "subtractInteger-cpu-arguments-slope": 0, + "unIData-cpu-arguments": 150000, + "consByteString-memory-arguments-intercept": 0, + "divideInteger-memory-arguments-slope": 1, + "divideInteger-cpu-arguments-model-arguments-slope": 118, + "listData-cpu-arguments": 150000, + "headList-cpu-arguments": 150000, + "chooseData-memory-arguments": 32, + "equalsInteger-cpu-arguments-intercept": 136542, + "sha3_256-cpu-arguments-slope": 82363, + "sliceByteString-cpu-arguments-slope": 5000, + "unMapData-cpu-arguments": 150000, + "lessThanInteger-cpu-arguments-intercept": 179690, + "mkCons-cpu-arguments": 150000, + "appendString-memory-arguments-intercept": 0, + "modInteger-cpu-arguments-model-arguments-slope": 118, + "ifThenElse-cpu-arguments": 1, + "mkNilPairData-cpu-arguments": 150000, + "lessThanEqualsInteger-cpu-arguments-intercept": 145276, + "addInteger-memory-arguments-slope": 1, + "chooseList-memory-arguments": 32, + "constrData-memory-arguments": 32, + "decodeUtf8-cpu-arguments-intercept": 150000, + "equalsData-memory-arguments": 1, + "subtractInteger-memory-arguments-slope": 1, + "appendByteString-memory-arguments-intercept": 0, + "lengthOfByteString-memory-arguments": 4, + "headList-memory-arguments": 32, + "listData-memory-arguments": 32, + "consByteString-cpu-arguments-intercept": 150000, + "unIData-memory-arguments": 32, + "remainderInteger-memory-arguments-minimum": 1, + "bData-memory-arguments": 32, + "lessThanByteString-cpu-arguments-slope": 248, + "encodeUtf8-memory-arguments-intercept": 0, + "cekStartupCost-exBudgetCPU": 100, + "multiplyInteger-memory-arguments-intercept": 0, + "unListData-memory-arguments": 32, + "remainderInteger-cpu-arguments-model-arguments-slope": 118, + "cekVarCost-exBudgetCPU": 29773, + "remainderInteger-memory-arguments-slope": 1, + "cekForceCost-exBudgetCPU": 29773, + "sha2_256-cpu-arguments-slope": 29175, + "equalsInteger-memory-arguments": 1, + "indexByteString-memory-arguments": 1, + "addInteger-memory-arguments-intercept": 1, + "chooseUnit-cpu-arguments": 150000, + "sndPair-cpu-arguments": 150000, + "cekLamCost-exBudgetCPU": 29773, + "fstPair-cpu-arguments": 150000, + "quotientInteger-memory-arguments-minimum": 1, + "decodeUtf8-cpu-arguments-slope": 1000, + "lessThanInteger-memory-arguments": 1, + "lessThanEqualsInteger-cpu-arguments-slope": 1366, + "fstPair-memory-arguments": 32, + "modInteger-memory-arguments-intercept": 0, + "unConstrData-cpu-arguments": 150000, + "lessThanEqualsInteger-memory-arguments": 1, + "chooseUnit-memory-arguments": 32, + "sndPair-memory-arguments": 32, + "addInteger-cpu-arguments-intercept": 197209, + "decodeUtf8-memory-arguments-slope": 8, + "equalsData-cpu-arguments-intercept": 150000, + "mapData-cpu-arguments": 150000, + "mkPairData-cpu-arguments": 150000, + "quotientInteger-cpu-arguments-constant": 148000, + "consByteString-memory-arguments-slope": 1, + "cekVarCost-exBudgetMemory": 100, + "indexByteString-cpu-arguments": 150000, + "unListData-cpu-arguments": 150000, + "equalsInteger-cpu-arguments-slope": 1326, + "cekStartupCost-exBudgetMemory": 100, + "subtractInteger-cpu-arguments-intercept": 197209, + "divideInteger-cpu-arguments-model-arguments-intercept": 425507, + "divideInteger-memory-arguments-intercept": 0, + "cekForceCost-exBudgetMemory": 100, + "blake2b-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-constant": 148000, + "tailList-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-intercept": 150000, + "equalsString-cpu-arguments-slope": 1000, + "lessThanByteString-memory-arguments": 1, + "multiplyInteger-cpu-arguments-slope": 11218, + "appendByteString-cpu-arguments-intercept": 396231, + "lessThanEqualsByteString-cpu-arguments-slope": 248, + "modInteger-memory-arguments-slope": 1, + "addInteger-cpu-arguments-slope": 0, + "equalsData-cpu-arguments-slope": 10000, + "decodeUtf8-memory-arguments-intercept": 0, + "chooseList-cpu-arguments": 150000, + "constrData-cpu-arguments": 150000, + "equalsByteString-memory-arguments": 1, + "cekApplyCost-exBudgetCPU": 29773, + "quotientInteger-memory-arguments-slope": 1, + "verifySignature-cpu-arguments-intercept": 3345831, + "unMapData-memory-arguments": 32, + "mkCons-memory-arguments": 32, + "sliceByteString-memory-arguments-slope": 1, + "sha3_256-memory-arguments": 4, + "ifThenElse-memory-arguments": 1, + "mkNilPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-slope": 247, + "appendString-cpu-arguments-intercept": 150000, + "quotientInteger-cpu-arguments-model-arguments-slope": 118, + "cekApplyCost-exBudgetMemory": 100, + "equalsString-memory-arguments": 1, + "multiplyInteger-memory-arguments-slope": 1, + "cekBuiltinCost-exBudgetMemory": 100, + "remainderInteger-memory-arguments-intercept": 0, + "sha2_256-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, + "lessThanEqualsByteString-memory-arguments": 1, + "tailList-memory-arguments": 32, + "mkNilData-cpu-arguments": 150000, + "chooseData-cpu-arguments": 150000, + "unBData-memory-arguments": 32, + "blake2b-memory-arguments": 4, + "iData-memory-arguments": 32, + "nullList-memory-arguments": 32, + "cekDelayCost-exBudgetCPU": 29773, + "subtractInteger-memory-arguments-intercept": 1, + "lessThanByteString-cpu-arguments-intercept": 103599, + "consByteString-cpu-arguments-slope": 1000, + "appendByteString-memory-arguments-slope": 1, + "trace-memory-arguments": 32, + "divideInteger-cpu-arguments-constant": 148000, + "cekConstCost-exBudgetCPU": 29773, + "encodeUtf8-memory-arguments-slope": 8, + "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, + "mapData-memory-arguments": 32, + "appendString-cpu-arguments-slope": 1000, + "modInteger-cpu-arguments-constant": 148000, + "verifySignature-cpu-arguments-slope": 1, + "unConstrData-memory-arguments": 32, + "quotientInteger-memory-arguments-intercept": 0, + "equalsByteString-cpu-arguments-constant": 150000, + "sliceByteString-memory-arguments-intercept": 0, + "mkPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-intercept": 112536, + "appendString-memory-arguments-slope": 1, + "lessThanInteger-cpu-arguments-slope": 497, + "modInteger-cpu-arguments-model-arguments-intercept": 425507, + "modInteger-memory-arguments-minimum": 1, + "sha3_256-cpu-arguments-intercept": 0, + "verifySignature-memory-arguments": 1, + "cekLamCost-exBudgetMemory": 100, + "sliceByteString-cpu-arguments-intercept": 150000 + } + } +} diff --git a/config/preview/byron-genesis.json b/config/preview/byron-genesis.json new file mode 100644 index 00000000..99b58458 --- /dev/null +++ b/config/preview/byron-genesis.json @@ -0,0 +1,117 @@ +{ "bootStakeholders": + { "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": 1 + , "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": 1 + , "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": 1 + , "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": 1 + , "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": 1 + , "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": 1 + , "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": 1 + } +, "heavyDelegation": + { "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": + { "omega": 0 + , "issuerPk": + "6hSFCotivD08t02n43RMiaF9LzwtYVrFMu/WX6ShfEsxfdXFL5Y6c+DwHSZOCywU0RJz5er2icIO03UytC9NTg==" + , "delegatePk": + "JEnSVQTPGriTx1+lAMkKhCNsMBDNPGw+NiEvNPh4ui6IdvxrO+WkQPTy5U865XB4VFvi/zb7d+H1bilnztQNBg==" + , "cert": + "558952d17442e8cc73f0c7dd606e329b38ed2ec0c1f83fe2567d28b21ef2223d2d23640cd0531f75832b50e519631c48643fcfaa7168851645dce07b90d87f0e" + } + , "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": + { "omega": 0 + , "issuerPk": + "MJ7IskKU8GKk0Eeg3zhfSOK1DDVXOMHD2V/zhEpODUtL9YB0Y7sXnbZfg3+Df05hskP5Jz+dZvdC6DH/dP9jmQ==" + , "delegatePk": + "hwO7NJL7LfAk5e/QG61FKcdORoK60tvprE3063Muh4EQKrWA6l7t23B2GziK8D0hRO0j5W1Gzpn8WW69XLIlKA==" + , "cert": + "2bccf50d0c3cbb03dd29cfba817e8ba615db3d7722b41b264ad08722e548cfe83d069b29d13e490823d7519ecdd9940ea49573f6027056c4bd58da1adf75020e" + } + , "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": + { "omega": 0 + , "issuerPk": + "pXbW4Jak8maeuWiosvrurykKnqDSHswUjroonSDS3fTnWS+BKe+vjT4zZJNKhQ33KbagiHVJ5CJUNggfsCtG2g==" + , "delegatePk": + "rbJAZp3kWCUvp8dnLR6qsgpGU+qKAFow4NHYKWiKCkfm1qFCFONob50N1IbNWCGWAhg38ZPTvBazTasjsfj6yQ==" + , "cert": + "89e1638e31fd3d402cecb897ba773d8c2c11c2d3cff2462b266e21461539b1a4fe8fb528e159b9af473799b51e49aa5b5816a88f10c484aa7cef7ad12850830a" + } + , "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": + { "omega": 0 + , "issuerPk": + "/LGZjmmcAMRisP7Rf454GM2QUKgj2aAyqE+iQo2PIEhcistFOlT+idtbLTceZAnQcwwPJDtTcNi+EnPQyscZOg==" + , "delegatePk": + "rinFUiKKCPPFY0ULEKn1SPRgLVmOS3jdTXDtrxK6VI1I11G3uBS1Olxi0mQSN3kf+B3hm/xHkuUDVNaSXNiBeQ==" + , "cert": + "3e7f30bb68c5bc4d23c2a730ac154a188a1fd45aac3f438efd380303171443d2ca4f50e5a1ff66b40ae3da64697f2599956ae06c21b73fa828b8c0dc9fb27302" + } + , "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": + { "omega": 0 + , "issuerPk": + "9EE85tTLdSSR4T1Xoy6n9wr6jlbavCdfp9oQKusskO3DSSyNqRYS7QzYQ96j/WnphUey63082YkKijMfF9A4eA==" + , "delegatePk": + "dvyHDkXg8LFtb0K6Sitl8OGSEZPvfCVQYLDR6Au6t6/ROvlerMKQ8uri4fG7hQQzbHKtdKWgv94t+zuFJTQ1fw==" + , "cert": + "5ec0ed46ae7e575bdb089f1bceca3b2689b13a7162fe08578fe60ba64607fffaa507412a97652c3c81cc0ef93ff404cf809a628ae19faba1a035fca0505c1d04" + } + , "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": + { "omega": 0 + , "issuerPk": + "Hr5S5PAxf9HSB4FzmtZzaFcXrNrctrI5XUrDrnCkOUTX6rhbtOMkXU3sWVDOvU6LNSSr3/Ws2+iCYZIr7LmTWg==" + , "delegatePk": + "FaLH2b5H/XS31YRnm98N6fP4Etx6m+GbniVAXMwOp8KhYXPKBJBsX/EjIy3pSkvRBhGCjsycB0yrDxWMi5ZsIQ==" + , "cert": + "10f06304cceb42071605ebba67b308c7568e5e6fe0d773c58f7e8c13bc8d8a340f70a4fd5e1b4a1c1db1de5c7646802bbc929d6c82d7adb8a77cb6ad77eac50a" + } + , "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": + { "omega": 0 + , "issuerPk": + "B2R+VXzy3c8bxncdOpQ2Z/tblxRNQO8AXQ0OsJDQvZYnLeGQcLD78kyYLpi3nfuS4SfnLar23NV4yiEVwaw+Yw==" + , "delegatePk": + "nACHGIBacymrKwn07iW/a5ZKJCPZ2cKQqeXw3ivR7WOYVUuufWhZlCoUTZ7rtBqoDaexblUQwkC7hA7AmNA3FA==" + , "cert": + "b5440daa05f7fae557df46e4f1b7c5802b86f465daad1137e315abf6e72f1c877207276abb8dcba86e18e42d39b34c2f0fa82ba2919944cdc8e2e5264baa450b" + } + } +, "startTime": 1666656000 +, "nonAvvmBalances": + { "FHnt4NL7yPXjpZtYj1YUiX9QYYUZGXDT9gA2PJXQFkTSMx3EgawXK5BUrCHdhe2": + "0" + , "FHnt4NL7yPXk7D87qAWEmfnL7wSQ9AzBU2mjZt3eM48NSCbygxgzAU6vCGiRZEW": + "0" + , "FHnt4NL7yPXpazQsTdJ3Gp1twQUo4N5rrgGbRNSzchjchPiApc1k4CvqDMcdd7H": + "0" + , "FHnt4NL7yPXtNo1wLCLZyGTMfAvB14h8onafiYkM7B69ZwvGgXeUyQWfi7FPrif": + "0" + , "FHnt4NL7yPXtmi4mAjD43V3NB3shDs1gCuHNcMLPsRWjaw1b2yRV2xad8S8V6aq": + "0" + , "FHnt4NL7yPXvDWHa8bVs73UEUdJd64VxWXSFNqetECtYfTd9TtJguJ14Lu3feth": + "30000000000000000" + , "FHnt4NL7yPXvNSRpCYydjRr7koQCrsTtkovk5uYMimgqMJX2DyrEEBqiXaTd8rG": + "0" + , "FHnt4NL7yPY9rTvdsCeyRnsbzp4bN7XdmAZeU5PzA1qR2asYmN6CsdxJw4YoDjG": + "0" + } +, "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": 432 , "protocolMagic": 2 } +, "avvmDistr": {} +} diff --git a/config/preview/config.json b/config/preview/config.json new file mode 100644 index 00000000..b51a3894 --- /dev/null +++ b/config/preview/config.json @@ -0,0 +1,114 @@ +{ + "AlonzoGenesisFile": "/current/alonzo-genesis.json", + "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874", + "ByronGenesisFile": "/current/byron-genesis.json", + "ByronGenesisHash": "83de1d7302569ad56cf9139a41e2e11346d4cb4a31c00142557b6ab3fa550761", + "ConwayGenesisFile": "/current/conway-genesis.json", + "ConwayGenesisHash": "de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e", + "EnableP2P": true, + "ExperimentalHardForksEnabled": false, + "ExperimentalProtocolsEnabled": false, + "LastKnownBlockVersion-Alt": 0, + "LastKnownBlockVersion-Major": 3, + "LastKnownBlockVersion-Minor": 1, + "MinNodeVersion": "8.9.2", + "PeerSharing": true, + "Protocol": "Cardano", + "RequiresNetworkMagic": "RequiresMagic", + "ShelleyGenesisFile": "/current/shelley-genesis.json", + "ShelleyGenesisHash": "363498d1024f84bb39d3fa9593ce391483cb40d479b87233f868d6e57c3a400d", + "TargetNumberOfActivePeers": 20, + "TargetNumberOfEstablishedPeers": 50, + "TargetNumberOfKnownPeers": 100, + "TargetNumberOfRootPeers": 60, + "TestAllegraHardForkAtEpoch": 0, + "TestAlonzoHardForkAtEpoch": 0, + "TestMaryHardForkAtEpoch": 0, + "TestShelleyHardForkAtEpoch": 0, + "TraceAcceptPolicy": true, + "TraceBlockFetchClient": false, + "TraceBlockFetchDecisions": false, + "TraceBlockFetchProtocol": false, + "TraceBlockFetchProtocolSerialised": false, + "TraceBlockFetchServer": false, + "TraceChainDb": true, + "TraceChainSyncBlockServer": false, + "TraceChainSyncClient": false, + "TraceChainSyncHeaderServer": false, + "TraceChainSyncProtocol": false, + "TraceConnectionManager": true, + "TraceDNSResolver": true, + "TraceDNSSubscription": true, + "TraceDiffusionInitialization": true, + "TraceErrorPolicy": true, + "TraceForge": true, + "TraceHandshake": true, + "TraceInboundGovernor": true, + "TraceIpSubscription": true, + "TraceLedgerPeers": true, + "TraceLocalChainSyncProtocol": false, + "TraceLocalConnectionManager": true, + "TraceLocalErrorPolicy": true, + "TraceLocalHandshake": true, + "TraceLocalRootPeers": true, + "TraceLocalTxSubmissionProtocol": false, + "TraceLocalTxSubmissionServer": false, + "TraceMempool": true, + "TraceMux": false, + "TracePeerSelection": true, + "TracePeerSelectionActions": true, + "TracePublicRootPeers": true, + "TraceServer": true, + "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 + } + ] +} diff --git a/config/preview/conway-genesis.json b/config/preview/conway-genesis.json new file mode 100644 index 00000000..5f1de84e --- /dev/null +++ b/config/preview/conway-genesis.json @@ -0,0 +1,38 @@ +{ + "poolVotingThresholds": { + "committeeNormal": 0.51, + "committeeNoConfidence": 0.51, + "hardForkInitiation": 0.51, + "motionNoConfidence": 0.51, + "ppSecurityGroup": 0.51 + }, + "dRepVotingThresholds": { + "motionNoConfidence": 0.51, + "committeeNormal": 0.51, + "committeeNoConfidence": 0.51, + "updateToConstitution": 0.51, + "hardForkInitiation": 0.51, + "ppNetworkGroup": 0.51, + "ppEconomicGroup": 0.51, + "ppTechnicalGroup": 0.51, + "ppGovGroup": 0.51, + "treasuryWithdrawal": 0.51 + }, + "committeeMinSize": 0, + "committeeMaxTermLength": 200, + "govActionLifetime": 10, + "govActionDeposit": 1000000000, + "dRepDeposit": 2000000, + "dRepActivity": 20, + "constitution": { + "anchor": { + "url": "", + "dataHash": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "committee": { + "members": { + }, + "quorum": 0 + } +} diff --git a/config/preview/shelley-genesis.json b/config/preview/shelley-genesis.json new file mode 100644 index 00000000..20abba3f --- /dev/null +++ b/config/preview/shelley-genesis.json @@ -0,0 +1,68 @@ +{ + "activeSlotsCoeff": 0.05, + "epochLength": 86400, + "genDelegs": { + "12b0f443d02861948a0fce9541916b014e8402984c7b83ad70a834ce": { + "delegate": "7c54a168c731f2f44ced620f3cca7c2bd90731cab223d5167aa994e6", + "vrf": "62d546a35e1be66a2b06e29558ef33f4222f1c466adbb59b52d800964d4e60ec" + }, + "3df542796a64e399b60c74acfbdb5afa1e114532fa36b46d6368ef3a": { + "delegate": "c44bc2f3cc7e98c0f227aa399e4035c33c0d775a0985875fff488e20", + "vrf": "4f9d334decadff6eba258b2df8ae1f02580a2628bce47ae7d957e1acd3f42a3c" + }, + "93fd5083ff20e7ab5570948831730073143bea5a5d5539852ed45889": { + "delegate": "82a02922f10105566b70366b07c758c8134fa91b3d8ae697dfa5e8e0", + "vrf": "8a57e94a9b4c65ec575f35d41edb1df399fa30fdf10775389f5d1ef670ca3f9f" + }, + "a86cab3ea72eabb2e8aafbbf4abbd2ba5bdfd04eea26a39b126a78e4": { + "delegate": "10257f6d3bae913514bdc96c9170b3166bf6838cca95736b0e418426", + "vrf": "1b54aad6b013145a0fc74bb5c2aa368ebaf3999e88637d78e09706d0cc29874a" + }, + "b799804a28885bd49c0e1b99d8b3b26de0fac17a5cf651ecf0c872f0": { + "delegate": "ebe606e22d932d51be2c1ce87e7d7e4c9a7d1f7df4a5535c29e23d22", + "vrf": "b3fc06a1f8ee69ff23185d9af453503be8b15b2652e1f9fb7c3ded6797a2d6f9" + }, + "d125812d6ab973a2c152a0525b7fd32d36ff13555a427966a9cac9b1": { + "delegate": "e302198135fb5b00bfe0b9b5623426f7cf03179ab7ba75f945d5b79b", + "vrf": "b45ca2ed95f92248fa0322ce1fc9f815a5a5aa2f21f1adc2c42c4dccfc7ba631" + }, + "ef27651990a26449a40767d5e06cdef1670a3f3ff4b951d385b51787": { + "delegate": "0e0b11e80d958732e587585d30978d683a061831d1b753878f549d05", + "vrf": "b860ec844f6cd476c4fabb4aa1ca72d5c74d82f3835aed3c9515a35b6e048719" + } + }, + "initialFunds": {}, + "maxKESEvolutions": 62, + "maxLovelaceSupply": 45000000000000000, + "networkId": "Testnet", + "networkMagic": 2, + "protocolParams": { + "protocolVersion": { + "minor": 0, + "major": 6 + }, + "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 + }, + "securityParam": 432, + "slotLength": 1, + "slotsPerKESPeriod": 129600, + "systemStart": "2022-10-25T00:00:00Z", + "updateQuorum": 5 +} diff --git a/config/preview/topology.json b/config/preview/topology.json new file mode 100644 index 00000000..30284484 --- /dev/null +++ b/config/preview/topology.json @@ -0,0 +1,23 @@ +{ + "bootstrapPeers": [ + { + "address": "preview-node.play.dev.cardano.org", + "port": 3001 + } + ], + "localRoots": [ + { + "accessPoints": [], + "advertise": false, + "trustable": false, + "valency": 1 + } + ], + "publicRoots": [ + { + "accessPoints": [], + "advertise": false + } + ], + "useLedgerAfterSlot": 41385503 +} diff --git a/config/sanchonet/alonzo-genesis.json b/config/sanchonet/alonzo-genesis.json new file mode 100644 index 00000000..de05d3d9 --- /dev/null +++ b/config/sanchonet/alonzo-genesis.json @@ -0,0 +1,188 @@ +{ + "collateralPercentage": 150, + "costModels": { + "PlutusV1": [ + 197209, + 0, + 1, + 1, + 396231, + 621, + 0, + 1, + 150000, + 1000, + 0, + 1, + 150000, + 32, + 2477736, + 29175, + 4, + 29773, + 100, + 29773, + 100, + 29773, + 100, + 29773, + 100, + 29773, + 100, + 29773, + 100, + 100, + 100, + 29773, + 100, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 1000, + 0, + 1, + 150000, + 32, + 150000, + 1000, + 0, + 8, + 148000, + 425507, + 118, + 0, + 1, + 1, + 150000, + 1000, + 0, + 8, + 150000, + 112536, + 247, + 1, + 150000, + 10000, + 1, + 136542, + 1326, + 1, + 1000, + 150000, + 1000, + 1, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 1, + 1, + 150000, + 1, + 150000, + 4, + 103599, + 248, + 1, + 103599, + 248, + 1, + 145276, + 1366, + 1, + 179690, + 497, + 1, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 148000, + 425507, + 118, + 0, + 1, + 1, + 61516, + 11218, + 0, + 1, + 150000, + 32, + 148000, + 425507, + 118, + 0, + 1, + 1, + 148000, + 425507, + 118, + 0, + 1, + 1, + 2477736, + 29175, + 4, + 0, + 82363, + 4, + 150000, + 5000, + 0, + 1, + 150000, + 32, + 197209, + 0, + 1, + 1, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 150000, + 32, + 3345831, + 1, + 1 + ] + }, + "executionPrices": { + "prMem": 5.77e-2, + "prSteps": 7.21e-5 + }, + "lovelacePerUTxOWord": 34482, + "maxBlockExUnits": { + "exUnitsMem": 50000000, + "exUnitsSteps": 40000000000 + }, + "maxCollateralInputs": 3, + "maxTxExUnits": { + "exUnitsMem": 10000000, + "exUnitsSteps": 10000000000 + }, + "maxValueSize": 5000 +} \ No newline at end of file diff --git a/config/sanchonet/byron-genesis.json b/config/sanchonet/byron-genesis.json new file mode 100644 index 00000000..f0c29c65 --- /dev/null +++ b/config/sanchonet/byron-genesis.json @@ -0,0 +1,62 @@ +{ + "avvmDistr": {}, + "blockVersionData": { + "heavyDelThd": "300000000000", + "maxBlockSize": "2000000", + "maxHeaderSize": "2000000", + "maxProposalSize": "700", + "maxTxSize": "4096", + "mpcThd": "20000000000000", + "scriptVersion": 0, + "slotDuration": "20000", + "softforkRule": { + "initThd": "900000000000000", + "minThd": "600000000000000", + "thdDecrement": "50000000000000" + }, + "txFeePolicy": { + "multiplier": "43946000000", + "summand": "155381000000000" + }, + "unlockStakeEpoch": "18446744073709551615", + "updateImplicit": "10000", + "updateProposalThd": "100000000000000", + "updateVoteThd": "1000000000000" + }, + "bootStakeholders": { + "318488dc356f6034104804b2cb6a2dcc055202491386fb0d5af7c3ba": 1, + "3a3c2ffaf066c8f211a1bdfd844f767ac453b1d94915e725c5867467": 1, + "3ae8eabb4e0626cea0ba38d8303d59514dae9c307d93bad3d259e4a9": 1 + }, + "heavyDelegation": { + "318488dc356f6034104804b2cb6a2dcc055202491386fb0d5af7c3ba": { + "cert": "b80e06679023284236df3464dc6aab3f56f23cb721d5943c59632ac77004f76ae415b6d291606c7194509e1fefa0c8341eed269bd0e0e1433302b00912a4230c", + "delegatePk": "9ELoyHN4GVtXrFzAJZApAVjrhwftqEFVoDXl9ebtTwpe/lG4b5ZkgH3DqwHE1hNJFRsnYs4zYzMmdbnoR7lfUA==", + "issuerPk": "MHFL9SqIV6KuXSAvp08jHBRtHwNsDJMsCxbmXLorSbfLAORg7waqVL8NEaKU3Lb0FBIX5sHVC21i1M/c0jrnlA==", + "omega": 0 + }, + "3a3c2ffaf066c8f211a1bdfd844f767ac453b1d94915e725c5867467": { + "cert": "ce91b8e35b67de2236fa79b353d1c4ebd97ad4b4cc89056a1acfc217ece8e91fbffc4bf44604a96a1064c9997f6cd39b81284aadfac752056eafc6b5996a6509", + "delegatePk": "Grpf6iTqd9aWc3QWvfthNv2l8Pp0X2tKpoIoPn0+Dy1+ow60UTu9i1j4KPjp1uzrnM4JoUcmkCGF507fPagO8w==", + "issuerPk": "1FPA7qSOPVDlNZoQAuoB2dnm+tKI5td6+BO5sJ2rswVxuS6S6sjBFVfVz/VXfKTcEt/AKyffgzWXAtPCnhC1jw==", + "omega": 0 + }, + "3ae8eabb4e0626cea0ba38d8303d59514dae9c307d93bad3d259e4a9": { + "cert": "908dd25262598050d60cb24928a7059fea3726a1dd7764645edab654d3b4e37ba69acd4841454f70f0f643305ede0ef66dc0ea9747a2387da05d2af77963f30a", + "delegatePk": "1zYduiReianx6HJHgQqtira7XY6M/Ol4tFj/O7TzTLcNfgazJm8pq5y6HAANwl91iL1pDZuIgFjzI+2i1Z6y2Q==", + "issuerPk": "Pgj3IyTJDyxr+t5fcMuM3aPtyNCxOo4T9sr78BNbgWBGwlTGo0P6UtzNLyqloLsH8V6Lv6kYMdWELAiEyfCpkw==", + "omega": 0 + } + }, + "nonAvvmBalances": { + "FHnt4NL7yPXqn7xha3WB99wYLxAc1FhceD3D1pQWaCthk9RYB46aGb6Tbq2KxV5": "0", + "FHnt4NL7yPXwj8m191s48v1RZtQqA2sVHpamzStuXTuAnzYUSR6hRPqhYmW3MY4": "0", + "FHnt4NL7yPXzVZ5xexcb7rWqCYWuFU7y6Pp4tLTiv6txhDcpQ2m7AFGMirsi1F1": "30000000000000000", + "FHnt4NL7yPY27r794z4UiYJ3RwezucDRLX94Pzy6mYPNUNWboB71S9xUm2WEDrv": "0" + }, + "protocolConsts": { + "k": 432, + "protocolMagic": 4 + }, + "startTime": 1686789000 +} diff --git a/config/sanchonet/config.json b/config/sanchonet/config.json new file mode 100644 index 00000000..173cbf0f --- /dev/null +++ b/config/sanchonet/config.json @@ -0,0 +1,114 @@ +{ + "AlonzoGenesisFile": "/current/alonzo-genesis.json", + "AlonzoGenesisHash": "8bedcaea62107d8a79ed5293b0027b3f8706a4bc2422f33380cb1fd01c6fa6ec", + "ByronGenesisFile": "/current/byron-genesis.json", + "ByronGenesisHash": "785eb88427e136378a15b0a152a8bfbeec7a611529ccda29c43a1e60ffb48eaa", + "ConwayGenesisFile": "/current/conway-genesis.json", + "ConwayGenesisHash": "49ef010ff0d13b090893a919bbc22022038a8b782faa0b1561a256b781672174", + "EnableP2P": true, + "ExperimentalHardForksEnabled": true, + "ExperimentalProtocolsEnabled": true, + "LastKnownBlockVersion-Alt": 0, + "LastKnownBlockVersion-Major": 3, + "LastKnownBlockVersion-Minor": 1, + "MinNodeVersion": "8.10.0", + "PeerSharing": true, + "Protocol": "Cardano", + "RequiresNetworkMagic": "RequiresMagic", + "ShelleyGenesisFile": "/current/shelley-genesis.json", + "ShelleyGenesisHash": "f94457ec45a0c6773057a529533cf7ccf746cb44dabd56ae970e1dbfb55bfdb2", + "TargetNumberOfActivePeers": 20, + "TargetNumberOfEstablishedPeers": 50, + "TargetNumberOfKnownPeers": 100, + "TargetNumberOfRootPeers": 60, + "TestAllegraHardForkAtEpoch": 0, + "TestAlonzoHardForkAtEpoch": 0, + "TestMaryHardForkAtEpoch": 0, + "TestShelleyHardForkAtEpoch": 0, + "TraceAcceptPolicy": true, + "TraceBlockFetchClient": false, + "TraceBlockFetchDecisions": false, + "TraceBlockFetchProtocol": false, + "TraceBlockFetchProtocolSerialised": false, + "TraceBlockFetchServer": false, + "TraceChainDb": true, + "TraceChainSyncBlockServer": false, + "TraceChainSyncClient": false, + "TraceChainSyncHeaderServer": false, + "TraceChainSyncProtocol": false, + "TraceConnectionManager": true, + "TraceDNSResolver": true, + "TraceDNSSubscription": true, + "TraceDiffusionInitialization": true, + "TraceErrorPolicy": true, + "TraceForge": true, + "TraceHandshake": true, + "TraceInboundGovernor": true, + "TraceIpSubscription": true, + "TraceLedgerPeers": true, + "TraceLocalChainSyncProtocol": false, + "TraceLocalConnectionManager": true, + "TraceLocalErrorPolicy": true, + "TraceLocalHandshake": true, + "TraceLocalRootPeers": true, + "TraceLocalTxSubmissionProtocol": false, + "TraceLocalTxSubmissionServer": false, + "TraceMempool": true, + "TraceMux": false, + "TracePeerSelection": true, + "TracePeerSelectionActions": true, + "TracePublicRootPeers": true, + "TraceServer": true, + "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 + } + ] +} diff --git a/config/sanchonet/conway-genesis.json b/config/sanchonet/conway-genesis.json new file mode 100644 index 00000000..87c9bb30 --- /dev/null +++ b/config/sanchonet/conway-genesis.json @@ -0,0 +1,39 @@ +{ + "poolVotingThresholds": { + "committeeNormal": 0.60, + "committeeNoConfidence": 0.51, + "hardForkInitiation": 0.51, + "motionNoConfidence": 0.60, + "ppSecurityGroup": 0.60 + }, + "dRepVotingThresholds": { + "motionNoConfidence": 0.67, + "committeeNormal": 0.67, + "committeeNoConfidence": 0.60, + "updateToConstitution": 0.75, + "hardForkInitiation": 0.60, + "ppNetworkGroup": 0.67, + "ppEconomicGroup": 0.67, + "ppTechnicalGroup": 0.67, + "ppGovGroup": 0.75, + "treasuryWithdrawal": 0.67 + }, + "committeeMinSize": 7, + "committeeMaxTermLength": 73, + "govActionLifetime": 6, + "govActionDeposit": 50000000000, + "dRepDeposit": 500000000, + "dRepActivity": 20, + "minFeeRefScriptCostPerByte": 44, + "constitution": { + "anchor": { + "url": "", + "dataHash": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "committee": { + "members": { + }, + "threshold": 0.67 + } +} diff --git a/config/sanchonet/shelley-genesis.json b/config/sanchonet/shelley-genesis.json new file mode 100644 index 00000000..54458599 --- /dev/null +++ b/config/sanchonet/shelley-genesis.json @@ -0,0 +1,56 @@ +{ + "activeSlotsCoeff": 5.0e-2, + "epochLength": 86400, + "genDelegs": { + "c1ad22cabb342cbb83ce3859708232f4945ccb669e9b5f932cffc0ed": { + "delegate": "405357b552c397e81f73dcb5a0da0828fe29610bd25197d86130df34", + "vrf": "458215df6c07abc66e80082caa7a189dc2f4995ad4b4b5f09481a55d8d0692d2" + }, + "c264bca994a3a5deee5a1d9b92a3d7e9d6cbdb81f2f6989bb7f7b437": { + "delegate": "d9d9d0f0e1f25c4af4d80cb2d62878b611d8b3a8e1ef548d01f246d7", + "vrf": "624f1bf3b2f978e0c95644f26228b307d7acca7fc7eb3d88fb6f107e0aa1198c" + }, + "d4bf7eb45b72dffa5ac33d5c902fe409e4e611f2e9a52fb0d09784c3": { + "delegate": "806eb0c17d9b0fe6d99acbabe7be76ef72bf9de96c5b58435e50837f", + "vrf": "57e52289207a7128c29e0b7e96a02c731a961a5944329b363bed751ad8f377ee" + } + }, + "initialFunds": {}, + "maxKESEvolutions": 62, + "maxLovelaceSupply": 45000000000000000, + "networkId": "Testnet", + "networkMagic": 4, + "protocolParams": { + "a0": 0.3, + "decentralisationParam": 1.0, + "eMax": 18, + "extraEntropy": { + "tag": "NeutralNonce" + }, + "keyDeposit": 2000000, + "maxBlockBodySize": 65536, + "maxBlockHeaderSize": 1100, + "maxTxSize": 16384, + "minFeeA": 44, + "minFeeB": 155381, + "minPoolCost": 340000000, + "minUTxOValue": 1000000, + "nOpt": 150, + "poolDeposit": 500000000, + "protocolVersion": { + "major": 6, + "minor": 0 + }, + "rho": 3.0e-3, + "tau": 0.2 + }, + "securityParam": 432, + "slotLength": 1, + "slotsPerKESPeriod": 129600, + "staking": { + "pools": {}, + "stake": {} + }, + "systemStart": "2023-06-15T00:30:00Z", + "updateQuorum": 3 +} \ No newline at end of file diff --git a/config/sanchonet/topology.json b/config/sanchonet/topology.json new file mode 100644 index 00000000..4e41c44e --- /dev/null +++ b/config/sanchonet/topology.json @@ -0,0 +1,23 @@ +{ + "bootstrapPeers": [ + { + "address": "sanchonet-node.play.dev.cardano.org", + "port": 3001 + } + ], + "localRoots": [ + { + "accessPoints": [], + "advertise": false, + "trustable": false, + "valency": 1 + } + ], + "publicRoots": [ + { + "accessPoints": [], + "advertise": false + } + ], + "useLedgerAfterSlot": 21599922 +} diff --git a/config/testnet/config.json b/config/testnet/config.json index 3028f097..2ebfdb0b 100644 --- a/config/testnet/config.json +++ b/config/testnet/config.json @@ -1,9 +1,9 @@ { - "AlonzoGenesisFile": "/config/alonzo-genesis.json", + "AlonzoGenesisFile": "/current/alonzo-genesis.json", "AlonzoGenesisHash": "6e39cafb2eda850e141e1d1aa6d6a72172a3b71a4ecb4c582d1aaff611635741", - "ByronGenesisFile": "/config/byron-genesis.json", + "ByronGenesisFile": "/current/byron-genesis.json", "ByronGenesisHash": "83de1d7302569ad56cf9139a41e2e11346d4cb4a31c00142557b6ab3fa550761", - "ConwayGenesisFile": "/config/conway-genesis.json", + "ConwayGenesisFile": "/current/conway-genesis.json", "ConwayGenesisHash": "50d564452b77fadcf94a5e3130c1b53c62ed30e4dc6c4db1beb4dbc2c02f56ce", "EnableP2P": true, "ExperimentalHardForksEnabled": false, @@ -13,7 +13,7 @@ "LastKnownBlockVersion-Minor": 1, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", - "ShelleyGenesisFile": "/config/shelley-genesis.json", + "ShelleyGenesisFile": "/current/shelley-genesis.json", "ShelleyGenesisHash": "bc8e8982b147e4955a8c96ba88fef03853b9ee6901680dc7850a810b4883ca3a", "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, diff --git a/docker/.env.dockerfile b/docker/.env.dockerfile index 975c3976..76579a3c 100644 --- a/docker/.env.dockerfile +++ b/docker/.env.dockerfile @@ -5,7 +5,7 @@ PROTOCOL_MAGIC=1 # mainnet 764824073, preprod 1, testnet 2, devkit 42 NETWORK_MAGIC=${PROTOCOL_MAGIC} -#common env +# Common env DB_USER=rosetta_db_admin DB_SECRET=weakpwd#123_d @@ -15,7 +15,7 @@ DB_HOST=localhost DB_PORT=5432 DB_SCHEMA=${NETWORK} -# Cardano Node variables +# Cardano node variables CARDANO_NODE_HOST=localhost CARDANO_NODE_PORT=3001 CARDANO_NODE_VERSION=8.9.0 @@ -23,7 +23,7 @@ CARDANO_NODE_SUBMIT_HOST=cardano-submit-api NODE_SUBMIT_API_PORT=8090 CARDANO_NODE_SOCKET=/ipc/node.socket -# api env +# Application env API_SPRING_PROFILES_ACTIVE=dev API_PORT=8081 TRANSACTION_TTL=3000 @@ -32,20 +32,19 @@ DB_CONNECTION_PARAMS_PROVIDER_TYPE=ENVIRONMENT DB_DRIVER_CLASS_NAME=org.postgresql.Driver ROSETTA_VERSION=1.4.13 -TOPOLOGY_FILEPATH=/config/topology.json -GENESIS_SHELLEY_PATH=/config/shelley-genesis.json -GENESIS_BYRON_PATH=/config/byron-genesis.json -GENESIS_ALONZO_PATH=/config/alonzo-genesis.json -GENESIS_CONWAY_PATH=/config/conway-genesis.json +TOPOLOGY_FILEPATH=/current/topology.json +GENESIS_SHELLEY_PATH=/current/shelley-genesis.json +GENESIS_BYRON_PATH=/current/byron-genesis.json +GENESIS_ALONZO_PATH=/current/alonzo-genesis.json +GENESIS_CONWAY_PATH=/current/conway-genesis.json API_NODE_SOCKET_PATH=./node/node.socket PRINT_EXCEPTION=true -#api env YACI_SPRING_PROFILES=postgres INDEXER_NODE_PORT=3001 MEMPOOL_ENABLED=true -#Devkit +# Devkit HOST_N2C_SOCAT_PORT=3333 DEVKIT_ENABLED=true diff --git a/docker/Dockerfile b/docker/Dockerfile index 88253531..db418e81 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -121,13 +121,8 @@ WORKDIR /root/app COPY ./pom.xml /root/app/pom.xml -COPY ./api/pom.xml /root/app/api/pom.xml COPY ./api /root/app/api - -COPY ./yaci-indexer/pom.xml /root/app/yaci-indexer/pom.xml COPY ./yaci-indexer /root/app/yaci-indexer - -COPY ./test-data-generator/pom.xml /root/app/test-data-generator/pom.xml COPY ./test-data-generator /root/app/test-data-generator RUN --mount=type=cache,target=/root/.m2 mvn clean package -DskipTests @@ -159,8 +154,8 @@ COPY --from=cardano-builder /root/.local/bin/cardano-* /usr/local/bin/ ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ENV PATH=/usr/local/lib/:$PATH -COPY ./config /config_bck -RUN mkdir /config +COPY ./config /config +RUN mkdir /current RUN mkdir -p /data/db RUN mkdir /ipc @@ -173,7 +168,6 @@ COPY --from=java-builder /root/app/yaci-indexer/target/*.jar /yaci-indexer/app.j RUN mkdir /logs EXPOSE 8081 -#EXPOSE 8081 5432 3001 12788 12798 COPY ./docker/entrypoint.sh /sbin/entrypoint.sh ENTRYPOINT ["/sbin/entrypoint.sh"] diff --git a/docker/Dockerfile_lite b/docker/Dockerfile_lite deleted file mode 100644 index f79b9a76..00000000 --- a/docker/Dockerfile_lite +++ /dev/null @@ -1,51 +0,0 @@ -FROM eclipse-temurin:21-jdk - -WORKDIR / - -ARG PG_VERSION=11 - -# Postgres -RUN apt-get update --fix-missing \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y wget sudo gnupg \ - && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ - && echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main' >> /etc/apt/sources.list - -RUN apt-get update --fix-missing \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - postgresql-${PG_VERSION} - -RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/$PG_VERSION/main/pg_hba.conf -RUN echo "listen_addresses='*'" >> /etc/postgresql/$PG_VERSION/main/postgresql.conf - -# Node -COPY ./docker/node /usr/local/lib -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH -ENV PATH="/usr/local/lib/:$PATH" - -RUN cd /usr/local/lib/ \ - && chmod -R -f 755 * \ - && ln -s libsecp256k1.so.2.0.2 libsecp256k1.so.2 \ - && ln -s libsecp256k1.so.2.0.2 libsecp256k1.so \ - && ln -s libsodium.so.23.3.0 libsodium.so.23 \ - && ln -s libsodium.so.23.3.0 libsodium.so - -COPY ./config /config_bck -RUN mkdir /config - -RUN mkdir -p /data/db -RUN mkdir /ipc - -# Java -COPY ./api/target/*.jar /api/app.jar -COPY ./yaci-indexer/target/*.jar /yaci-indexer/app.jar - -# Run -RUN mkdir /logs - -EXPOSE 8081 -#EXPOSE 8081 5432 3001 12788 12798 - -COPY ./docker/entrypoint.sh /sbin/entrypoint.sh -ENTRYPOINT ["/sbin/entrypoint.sh"] - -CMD ["/bin/sh", "-c", "bash"] diff --git a/docker/Dockerfile_node b/docker/Dockerfile_node deleted file mode 100644 index 66234f6f..00000000 --- a/docker/Dockerfile_node +++ /dev/null @@ -1,121 +0,0 @@ -FROM ubuntu:22.04 AS cardano-builder - -ARG CABAL_VERSION=3.8.1.0 -ARG GHC_VERSION=8.10.7 -ARG CARDANO_NODE_VERSION=8.9.2 - -WORKDIR /root/src - -# Install dependencies -RUN apt-get update --fix-missing - -RUN apt -y --no-install-recommends install \ - automake build-essential pkg-config libffi-dev libgmp-dev libssl-dev libncurses-dev libsystemd-dev zlib1g-dev make \ - g++ tmux git jq wget libncursesw5-dev libtool autoconf liblmdb-dev curl ca-certificates - -# Install ghcup -ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 -RUN bash -c "curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh" - -ENV PATH=/root/.local/bin:/root/.ghcup/bin:/root/.cabal/bin:${PATH} - -# Install cabal -RUN bash -c "ghcup install cabal ${CABAL_VERSION}" -RUN bash -c "ghcup set cabal ${CABAL_VERSION}" - -# Install GHC -RUN bash -c "ghcup install ghc ${GHC_VERSION}" -RUN bash -c "ghcup set ghc ${GHC_VERSION}" - -#Install sodium -RUN export IOHKNIX_VERSION=$(curl https://raw.githubusercontent.com/IntersectMBO/cardano-node/$CARDANO_NODE_VERSION/flake.lock | jq -r '.nodes.iohkNix.locked.rev') \ - && echo "iohk-nix version: $IOHKNIX_VERSION" \ - && export SODIUM_VERSION=$(curl https://raw.githubusercontent.com/input-output-hk/iohk-nix/$IOHKNIX_VERSION/flake.lock | jq -r '.nodes.sodium.original.rev') \ - && echo "Using sodium version: $SODIUM_VERSION" \ - && git clone https://github.com/intersectmbo/libsodium \ - && cd libsodium \ - && git checkout $SODIUM_VERSION \ - && ./autogen.sh \ - && ./configure \ - && make \ - && make check \ - && make install - -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH -ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH - -# Install libsodium -RUN apt -y --no-install-recommends install libsodium-dev - -# Install secp256k1 -RUN export IOHKNIX_VERSION=$(curl https://raw.githubusercontent.com/IntersectMBO/cardano-node/$CARDANO_NODE_VERSION/flake.lock | jq -r '.nodes.iohkNix.locked.rev') \ - && echo "iohk-nix version: $IOHKNIX_VERSION" \ - && export SECP256K1_VERSION=$(curl https://raw.githubusercontent.com/input-output-hk/iohk-nix/${IOHKNIX_VERSION}/flake.lock | jq -r '.nodes.secp256k1.original.ref') \ - && echo "Using secp256k1 version:$SECP256K1_VERSION" \ - && git clone --depth 1 --branch $SECP256K1_VERSION https://github.com/bitcoin-core/secp256k1 \ - && cd secp256k1 \ - && ./autogen.sh \ - && ./configure --enable-module-schnorrsig --enable-experimental \ - && make \ - && make check \ - && make install - -# Install blst -RUN export BLST_VERSION=$(curl https://raw.githubusercontent.com/input-output-hk/iohk-nix/master/flake.lock | jq -r '.nodes.blst.original.ref') \ - && git clone --depth 1 --branch ${BLST_VERSION} https://github.com/supranational/blst \ - && cd blst \ - && ./build.sh \ - && echo "prefix=/usr/local" >> libblst.pc \ - && echo "exec_prefix=\${prefix}" >> libblst.pc \ - && echo "libdir=\${exec_prefix}/lib" >> libblst.pc \ - && echo "includedir=\${prefix}/include" >> libblst.pc \ - && echo "" >> libblst.pc \ - && echo "Name: libblst" >> libblst.pc \ - && echo "Description: Multilingual BLS12-381 signature library" >> libblst.pc \ - && echo "URL: https://github.com/supranational/blst" >> libblst.pc \ - && echo "Version: ${BLST_VERSION#v}" >> libblst.pc \ - && echo "Cflags: -I\${includedir}" >> libblst.pc \ - && echo "Libs: -L\${libdir} -lblst" >> libblst.pc \ - && cp libblst.pc /usr/local/lib/pkgconfig/ \ - && cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/local/include/ \ - && cp libblst.a /usr/local/lib \ - && bash -c "chmod u=rw,go=r /usr/local/{lib/{libblst.a,pkgconfig/libblst.pc},include/{blst.{h,hpp},blst_aux.h}}" - -RUN apt -y --no-install-recommends install libsecp256k1-dev - -#Install node -RUN git clone https://github.com/intersectmbo/cardano-node.git \ - && cd cardano-node \ - && git checkout tags/$CARDANO_NODE_VERSION \ - && echo "with-compiler: ghc-$GHC_VERSION" >> cabal.project.local \ - && echo "" >> cabal.project.local \ - && echo "package cardano-crypto-praos" >> cabal.project.local \ - && echo " flags: -external-libsodium-vrf" >> cabal.project.local \ - && echo "" >> cabal.project.local \ - && echo "package trace-dispatcher" >> cabal.project.local \ - && echo " ghc-options: -Wwarn" >> cabal.project.local \ - && echo "" >> cabal.project.local \ - && echo "package HsOpenSSL" >> cabal.project.local \ - && echo " flags: -homebrew-openssl" >> cabal.project.local \ - && echo "" >> cabal.project.local \ - && mkdir -p /usr/local/opt/openssl \ - && ln -s /opt/homebrew/opt/openssl@3/lib /usr/local/opt/openssl/lib \ - && ln -s /opt/homebrew/opt/openssl@3/include /usr/local/opt/openssl/include - -WORKDIR /root/src/cardano-node - -RUN bash -c "cabal update" -RUN bash -c "cabal build all" -RUN bash -c "cabal build cardano-cli" - -RUN mkdir -p /root/.local/bin \ - && cp -p "$(./scripts/bin-path.sh cardano-node)" /root/.local/bin/ \ - && cp -p "$(./scripts/bin-path.sh cardano-cli)" /root/.local/bin/ - -# Copy libs -RUN mkdir -p /root/lib - -RUN cp -r /usr/local/lib/* /root/lib \ - && cp -r /root/.local/bin/cardano-* /root/lib - -CMD ["/bin/sh", "-c", "bash"] diff --git a/docker/copy_node_libs.sh b/docker/copy_node_libs.sh deleted file mode 100644 index a9bf588e..00000000 --- a/docker/copy_node_libs.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 41ad2d8f..361aeb51 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,8 +1,7 @@ #!/bin/bash echo "entrypoint - run node" -# rm /config/* -cp -r /config_bck/${NETWORK}/* /config/ -cardano-node run --database-path /data/db --host-addr 0.0.0.0 --port ${CARDANO_NODE_PORT} --socket-path /ipc/node.socket --topology /config/topology.json --config /config/config.json > /logs/node.log & +cp -r /config/${NETWORK}/* /current/ +cardano-node run --database-path /data/db --host-addr 0.0.0.0 --port ${CARDANO_NODE_PORT} --socket-path /ipc/node.socket --topology /current/topology.json --config /current/config.json > /logs/node.log & echo "entrypoint - run postgres" /etc/init.d/postgresql start @@ -19,10 +18,9 @@ if [[ -z $(sudo -u postgres psql -U postgres -Atc "SELECT 1 FROM pg_catalog.pg_d fi echo "entrypoint - run indexer" -exec java -jar -DdbUrl="${DB_URL}" -DdbUser="${DB_USER}" -DdbSecret="${DB_SECRET}" -DdbDriverName="${DB_DRIVER_CLASS_NAME}" /yaci-indexer/app.jar > /logs/indexer.log & +exec java -jar /yaci-indexer/app.jar > /logs/indexer.log & echo "entrypoint - run api" -exec java -jar -DdbUrl="${DB_URL}" -DdbUser="${DB_USER}" -DdbSecret="${DB_SECRET}" -DdbDriverName="${DB_DRIVER_CLASS_NAME}" /api/app.jar > /logs/api.log & +exec java -jar /api/app.jar > /logs/api.log & -echo "entrypoint - run bash" -/bin/sh -c bash +$@ diff --git a/docker/readme.md b/docker/readme.md index e69de29b..ebdaef45 100644 --- a/docker/readme.md +++ b/docker/readme.md @@ -0,0 +1,74 @@ +## Introduction + +Dockerfile contains cardano-node, Postgres, Cardano Rosetta API Java implementation + +Cardano-node is compiled inside the image from source. +The api and yaci-indexer modules are compiled inside the image from source. +Postgres is installed from the repository. + +Entrypoint file ``entrypoint.sh`` run all and creates the database and the postgres user. + +### 1. Build +``` +docker build -t {image_name} -f ./docker/Dockerfile . +``` +The build can take up to 1.5 hours. + +### 2. Run +```` +docker run --env-file .\docker\.env.dockerfile -p 8081:8081 -it {image_name}:latest +```` +We need to specify the path to the environment variables file and open the port. + +### 3. Changing project settings + +All application settings are located in the ``.\docker\.env.dockerfile`` file. +We can specify network, ports, postgres user, etc. + +### 4. Changing build parameters +``` +docker build -t {image_name} --build-arg PG_VERSION=11 -f ./docker/Dockerfile . +``` +We can specify Cabal, GHC, Cardano node, and Postgres versions when building an image. + +The default values: +`` +CABAL_VERSION=3.8.1.0 +`` +`` +GHC_VERSION=8.10.7 +`` +`` +CARDANO_NODE_VERSION=8.9.2 +`` +`` +PG_VERSION=11 +`` + +### 5. Volume with Cardano node data +```` +docker run --env-file .\docker\.env.dockerfile -p 8081:8081 -v {custom_folder}:/data/db -it {image_name}:latest +```` +It is possible to root the cardano node data volumetrically to the /data/db point. + +We can mount a volume with Cardano node data to ``/data/db`` to prevent loading during initialization. + +### 6. Volume with custom network configurations +```` +docker run --env-file .\docker\.env.dockerfile -p 8081:8081 -v {custom_folder}:/config -it {image_name}:latest +```` +The cardano node configuration json's are stored in the ``config`` folder and copied into the image on build. +If we want to use a custom configuration without rebuilding the image, we can mount a volume with configs to ``/config`` + +### 7. Logs location + +The logs can be viewed inside the container. +`` +Caradano node - /logs/node.log +`` +`` +Yaci indexer - /logs/indexer.log +`` +`` +Api - /logs/api.log +`` \ No newline at end of file