From b8b7db223d05c31eb37cc70a4241f68538a301e6 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 23 Aug 2023 18:25:14 +0200 Subject: [PATCH 1/2] chore: sanchonet --- .vscode/settings.json | 1 + CHANGELOG.md | 1 + src/constants/genesis.ts | 18 ++++++++++++++++++ src/types/common.ts | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bcec5b1f..ca5e1fc0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,7 @@ "pino", "prebuild", "preprod", + "sanchonet", "SECP", "ts", "utxo", diff --git a/CHANGELOG.md b/CHANGELOG.md index cb3fbad3..ae6432fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- support for Cardano Sanchonet - translation of cost models from numerical IDs to strings, required for `cardano-db-sync 13.1.1.3` and newer [#130](https://github.com/blockfrost/blockfrost-backend-ryo/pull/130) diff --git a/src/constants/genesis.ts b/src/constants/genesis.ts index 33a5afc4..dcae4e15 100644 --- a/src/constants/genesis.ts +++ b/src/constants/genesis.ts @@ -50,6 +50,18 @@ export const GENESIS: Record = { max_kes_evolutions: 62, security_param: 2160, }, + sanchonet: { + active_slots_coefficient: 0.05, + update_quorum: 3, + max_lovelace_supply: '45000000000000000', + network_magic: 4, + epoch_length: 86_400, + system_start: 1_686_789_000, + slots_per_kes_period: 129_600, + slot_length: 1, + max_kes_evolutions: 62, + security_param: 432, + }, }; export const BYRON_GENESIS: Record = { @@ -77,6 +89,12 @@ export const BYRON_GENESIS: Record = { safe_zone: 864, end_epoch: 0, }, + sanchonet: { + epoch_length: 4320, + slot_length: 20, + safe_zone: 864, + end_epoch: 0, + }, }; export const PROTOCOL_VERSIONS: Record = { diff --git a/src/types/common.ts b/src/types/common.ts index 549c02ca..c02d8c3f 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -5,9 +5,9 @@ import { components } from '@blockfrost/openapi'; export type Order = 'asc' | 'desc'; export type AddressType = 'byron' | 'shelley'; -export const CARDANO_NETWORKS = ['mainnet', 'testnet', 'preview', 'preprod']; +export const CARDANO_NETWORKS = ['mainnet', 'testnet', 'preview', 'preprod', 'sanchonet']; -export type Network = 'mainnet' | 'testnet' | 'preview' | 'preprod'; +export type Network = 'mainnet' | 'testnet' | 'preview' | 'preprod' | 'sanchonet'; export interface ResultFound { result: number; From 67ebc9e31bb940d6e1cd14f5f92c70007ba1e3bc Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Fri, 3 Nov 2023 08:22:04 +0100 Subject: [PATCH 2/2] nix: update yarn-project.nix --- yarn-project.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn-project.nix b/yarn-project.nix index 227676db..940ef85c 100644 --- a/yarn-project.nix +++ b/yarn-project.nix @@ -144,6 +144,7 @@ cacheEntries = { "JSONStream@npm:1.3.5" = { filename = "JSONStream-npm-1.3.5-1987f2e6dd-2605fa1242.zip"; sha512 = "2605fa124260c61bad38bb65eba30d2f72216a78e94d0ab19b11b4e0327d572b8d530c0c9cc3b0764f727ad26d39e00bf7ebad57781ca6368394d73169c59e46"; }; "eslint-plugin-prettier@npm:5.0.0" = { filename = "eslint-plugin-prettier-npm-5.0.0-2f21113cba-84e88744b9.zip"; sha512 = "84e88744b9050f2d5ef31b94e85294dda16f3a53c2449f9d33eac8ae6264889b459bf35a68e438fb6b329c2a1d6491aac4bfa00d86317e7009de3dad0311bec6"; }; "supertest@npm:6.3.3" = { filename = "supertest-npm-6.3.3-2e2b5bc83a-38239e517f.zip"; sha512 = "38239e517f7ba62b7a139a79c5c48d55f8d67b5ff4b6e51d5b07732ca8bbc4a28ffa1b10916fbb403dd013a054dbf028edc5850057d9a43aecbff439d494673e"; }; +"@blockfrost/openapi@npm:0.1.60" = { filename = "@blockfrost-openapi-npm-0.1.60-64f77da01a-2ab66de532.zip"; sha512 = "2ab66de532917fef3f1e88ab0cbb4259f79ba9b73fd865cd815f1e836d596de4394ece2914bd8b5ac8f0d38a7f7e11226a6a21ec298a4becf4d273e40abb08f4"; }; "@types/pg@npm:8.10.2" = { filename = "@types-pg-npm-8.10.2-de8ade0e64-49da89f64c.zip"; sha512 = "49da89f64cec1bd12a3fbc0c72b17d685c2fee579726a529f62fcab395dbc5696d80455073409947a577164b3c53a90181a331e4a5d9357679f724d4ce37f4b9"; }; "axios@npm:1.5.0" = { filename = "axios-npm-1.5.0-35a845e191-e7405a5dbb.zip"; sha512 = "e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be"; }; "@types/express@npm:4.17.17" = { filename = "@types-express-npm-4.17.17-46fe8173db-0196dacc27.zip"; sha512 = "0196dacc275ac3ce89d7364885cb08e7fb61f53ca101f65886dbf1daf9b7eb05c0943e2e4bbd01b0cc5e50f37e0eea7e4cbe97d0304094411ac73e1b7998f4da"; }; @@ -161,6 +162,7 @@ cacheEntries = { "@blockfrost/blockfrost-js@npm:5.4.0" = { filename = "@blockfrost-blockfrost-js-npm-5.4.0-32c36ce5a9-76bdd7e1b4.zip"; sha512 = "76bdd7e1b4d5b386db0db66be648123b22d03808b66f42f85bf0899cc67170922cec6b9b289fd797db1a27c752b20c931a7586f5b4a0bdce2c2c07599c2bc4eb"; }; "@blockfrost/blockfrost-tests@npm:1.10.0" = { filename = "@blockfrost-blockfrost-tests-npm-1.10.0-51b0cc8326-8cfb3d6ef5.zip"; sha512 = "8cfb3d6ef52f6f5a6da0e2f8ad5088c39e3c1546ee7f3147ab923860364101d17d589e22d5b80a0c78efeb43df59cb77271b15718a1bc7a251167dd24ca04afd"; }; "@blockfrost/blockfrost-utils@npm:2.8.0" = { filename = "@blockfrost-blockfrost-utils-npm-2.8.0-7809fac5e3-f46163e55d.zip"; sha512 = "f46163e55d2ad686efcf8eadd9d10a320ba866acb75a829620eed9ccbe356ad2b53e29e36ead37a8b6eb62a38ac4d97c959a3fbc3d9994b6f2fdd2274a38bc08"; }; +"yaml@npm:2.2.1" = { filename = "yaml-npm-2.2.1-b7f7f5e84d-84f68cbe46.zip"; sha512 = "84f68cbe462d5da4e7ded4a8bded949ffa912bc264472e5a684c3d45b22d8f73a3019963a32164023bdf3d83cfb6f5b58ff7b2b10ef5b717c630f40bd6369a23"; }; "mnemonist@npm:0.39.5" = { filename = "mnemonist-npm-0.39.5-cbd4ee161e-6669d687a4.zip"; sha512 = "6669d687a434226924b2c84ee6eb7ce7d0f83dfc5caad8bcc164c73c0c11fb6d43cbe32636e710f068046f4b40a56c3032532554e93e02640aafc6ca3dd222e6"; }; "@types/node@npm:14.14.28" = { filename = "@types-node-npm-14.14.28-f643c75c74-a8dcec1fc4.zip"; sha512 = "a8dcec1fc45a8c1573f519d33d1d017562432f939a5ec2fd6f71343a51085b2c5d105db1186086cd1bba9abf95e80c7538ef2eb459e8719d48b77458eb19be64"; }; "pg-protocol@npm:1.5.0" = { filename = "pg-protocol-npm-1.5.0-390f8d9ed8-b839d12caf.zip"; sha512 = "b839d12cafe942ef9cbc5b13c174eb2356804fb4fe8ead8279f46a36be90722d19a91409955beb8a3d5301639c44854e49749de4aef02dc361fee3e2a61fb1e4"; }; @@ -168,6 +170,7 @@ cacheEntries = { "follow-redirects@npm:1.15.2" = { filename = "follow-redirects-npm-1.15.2-1ec1dd82be-faa66059b6.zip"; sha512 = "faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190"; }; "proxy-from-env@npm:1.1.0" = { filename = "proxy-from-env-npm-1.1.0-c13d07f26b-ed7fcc2ba0.zip"; sha512 = "ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4"; }; "prettier-linter-helpers@npm:1.0.0" = { filename = "prettier-linter-helpers-npm-1.0.0-6925131a7e-00ce8011cf.zip"; sha512 = "00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392"; }; +"cbor@npm:8.1.0" = { filename = "cbor-npm-8.1.0-c1a4d6266a-a90338435d.zip"; sha512 = "a90338435dc7b45cc01461af979e3bb6ddd4f2a08584c437586039cd5f2235014c06e49d664295debbfb3514d87b2f06728092ab6aa6175e2e85e9cd7dc0c1fd"; }; "blake2b@npm:2.1.3" = { filename = "blake2b-npm-2.1.3-b5b61ec9ad-e652234249.zip"; sha512 = "e652234249cbdb3345488d52b5e76e8572b8e5333f3f0d5e716772b7c5d2142f433c3fe86130e92117329532e1d1235cdaa89f40bbca27a8ae528bef428241ef"; }; "@sentry/node@npm:7.69.0" = { filename = "@sentry-node-npm-7.69.0-5b1090f2f6-97210ced96.zip"; sha512 = "97210ced968a3d968fd9d93e67e1f3c9613b99b223f87fad944e6e94db40ebc10a7c339c848e0529c5ded69f94f1f689b4a6df1da4df1aad6663a752ac591d03"; }; "@types/qs@npm:6.9.7" = { filename = "@types-qs-npm-6.9.7-4a3e6ca0d0-7fd6f9c250.zip"; sha512 = "7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba"; }; @@ -205,6 +208,7 @@ cacheEntries = { "jdenticon@npm:3.2.0" = { filename = "jdenticon-npm-3.2.0-da0f1bbe59-cdc0651532.zip"; sha512 = "cdc0651532f38e02c8e6661f0185735dcd29b7cd17677c69be31916ed38d81ded8bc749deb79925ad8aaf68da0b7a49f0835879c70a7dea042caa6c47faaebee"; }; "cbor@npm:9.0.0" = { filename = "cbor-npm-9.0.0-aa1b41b42c-f24f0ab21d.zip"; sha512 = "f24f0ab21d2a7b93fff890504efe1a4fee84ca69252485e4491ebf1513caedcdc858bf1b82a642251ab119144fd350bd81a52d8adf11cbf42629abce68239210"; }; "prom-client@npm:14.2.0" = { filename = "prom-client-npm-14.2.0-67b29e14e5-d4c04e5761.zip"; sha512 = "d4c04e57616c72643dd02862d0d4bde09cf8869a19d0aef5e7b785e6e27d02439b66cdc165e3492f62d579fa91579183820870cc757a09b99399d2d02f46b9f1"; }; +"nofilter@npm:3.1.0" = { filename = "nofilter-npm-3.1.0-3c5ba47d92-58aa85a5b4.zip"; sha512 = "58aa85a5b4b35cbb6e42de8a8591c5e338061edc9f3e7286f2c335e9e9b9b8fa7c335ae45daa8a1f3433164dc0b9a3d187fa96f9516e04a17a1f9ce722becc4f"; }; "nanoassert@npm:1.1.0" = { filename = "nanoassert-npm-1.1.0-1da45b4766-f360fe639d.zip"; sha512 = "f360fe639db8edc422de9f5a8a7d384ba9c11e9c6fac149f7ad3b0a94e4ec9d5aa44ce55b3e4c7682658efad792604fc96c336b0e80a3590744104ba58af80c7"; }; "@sentry/types@npm:7.69.0" = { filename = "@sentry-types-npm-7.69.0-76b51593a9-aaa40a43ca.zip"; sha512 = "aaa40a43cab358e10c2566d62966eff61925fb2605c146967bf9eb8acb4a883d4ca7c8a5eee1915271da08f27ddf1ed7dc520a8617f229ce70c7d00557173cc4"; }; "cookie@npm:0.4.1" = { filename = "cookie-npm-0.4.1-cc5e2ebb42-bd7c47f5d9.zip"; sha512 = "bd7c47f5d94ab70ccdfe8210cde7d725880d2fcda06d8e375afbdd82de0c8d3b73541996e9ce57d35f67f672c4ee6d60208adec06b3c5fc94cebb85196084cf8"; }; @@ -263,7 +267,6 @@ cacheEntries = { "has-flag@npm:4.0.0" = { filename = "has-flag-npm-4.0.0-32af9f0536-261a135703.zip"; sha512 = "261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad"; }; "bignumber.js@npm:9.1.2" = { filename = "bignumber.js-npm-9.1.2-c2228c6a4a-582c03af77.zip"; sha512 = "582c03af77ec9cb0ebd682a373ee6c66475db94a4325f92299621d544aa4bd45cb45fd60001610e94aef8ae98a0905fa538241d9638d4422d57abbeeac6fadaf"; }; "expect@npm:29.3.1" = { filename = "expect-npm-29.3.1-2892df60b8-e9588c2a43.zip"; sha512 = "e9588c2a430b558b9a3dc72d4ad05f36b047cb477bc6a7bb9cfeef7614fe7e5edbab424c2c0ce82739ee21ecbbbd24596259528209f84cd72500cc612d910d30"; }; -"nofilter@npm:3.1.0" = { filename = "nofilter-npm-3.1.0-3c5ba47d92-58aa85a5b4.zip"; sha512 = "58aa85a5b4b35cbb6e42de8a8591c5e338061edc9f3e7286f2c335e9e9b9b8fa7c335ae45daa8a1f3433164dc0b9a3d187fa96f9516e04a17a1f9ce722becc4f"; }; "@sentry-internal/tracing@npm:7.69.0" = { filename = "@sentry-internal-tracing-npm-7.69.0-eb49cfc65f-3ccb7e7d00.zip"; sha512 = "3ccb7e7d008dd39ed2bb9a02fcd7ae6161a8355451891db25020d8068357254a430e697c4f72c4d1d747754585ca0f610cea6798d51b6a791ae2c73ee399b58e"; }; "@typescript-eslint/typescript-estree@npm:6.7.2" = { filename = "@typescript-eslint-typescript-estree-npm-6.7.2-f8db4ff40e-c30b980356.zip"; sha512 = "c30b9803567c37527e2806badd98f3083ae125db9a430d8a28647b153e446e6a4b830833f229cca27d5aa0ff5497c149aaa524aa3a6dbf932b557c60d0bfd4f9"; }; "tslib@npm:2.4.1" = { filename = "tslib-npm-2.4.1-36f0ed04db-19480d6e03.zip"; sha512 = "19480d6e0313292bd6505d4efe096a6b31c70e21cf08b5febf4da62e95c265c8f571f7b36fcc3d1a17e068032f59c269fab3459d6cd3ed6949eafecf64315fca"; }; @@ -292,7 +295,6 @@ cacheEntries = { "make-error@npm:1.3.6" = { filename = "make-error-npm-1.3.6-ccb85d9458-b86e5e0e25.zip"; sha512 = "b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402"; }; "v8-compile-cache-lib@npm:3.0.1" = { filename = "v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip"; sha512 = "78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0"; }; "yn@npm:3.1.1" = { filename = "yn-npm-3.1.1-8ad4259784-2c487b0e14.zip"; sha512 = "2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6"; }; -"yaml@npm:2.2.1" = { filename = "yaml-npm-2.2.1-b7f7f5e84d-84f68cbe46.zip"; sha512 = "84f68cbe462d5da4e7ded4a8bded949ffa912bc264472e5a684c3d45b22d8f73a3019963a32164023bdf3d83cfb6f5b58ff7b2b10ef5b717c630f40bd6369a23"; }; "pg-int8@npm:1.0.1" = { filename = "pg-int8-npm-1.0.1-5cd67f3e22-a1e3a05a69.zip"; sha512 = "a1e3a05a69005ddb73e5f324b6b4e689868a447c5fa280b44cd4d04e6916a344ac289e0b8d2695d66e8e89a7fba023affb9e0e94778770ada5df43f003d664c9"; }; "pg-numeric@npm:1.0.2" = { filename = "pg-numeric-npm-1.0.2-9026ec3427-8899f8200c.zip"; sha512 = "8899f8200caa1744439a8778a9eb3ceefb599d893e40a09eef84ee0d4c151319fd416634a6c0fc7b7db4ac268710042da5be700b80ef0de716fe089b8652c84f"; }; "postgres-array@npm:3.0.2" = { filename = "postgres-array-npm-3.0.2-da6a3f1fed-5955f9dffe.zip"; sha512 = "5955f9dffeb6fa960c1a0b04fd4b2ba16813ddb636934ad26f902e4d76a91c0b743dcc6edc4cffc52deba7d547505e0020adea027c1d50a774f989cf955420d1"; }; @@ -321,7 +323,6 @@ cacheEntries = { "strip-json-comments@npm:3.1.1" = { filename = "strip-json-comments-npm-3.1.1-dcb2324823-492f73e272.zip"; sha512 = "492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443"; }; "@sinonjs/commons@npm:2.0.0" = { filename = "@sinonjs-commons-npm-2.0.0-3716f24f20-5023ba17ed.zip"; sha512 = "5023ba17edf2b85ed58262313b8e9b59e23c6860681a9af0200f239fe939e2b79736d04a260e8270ddd57196851dde3ba754d7230be5c5234e777ae2ca8af137"; }; "@cspotcode/source-map-support@npm:0.8.1" = { filename = "@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip"; sha512 = "5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa"; }; -"cbor@npm:8.1.0" = { filename = "cbor-npm-8.1.0-c1a4d6266a-a90338435d.zip"; sha512 = "a90338435dc7b45cc01461af979e3bb6ddd4f2a08584c437586039cd5f2235014c06e49d664295debbfb3514d87b2f06728092ab6aa6175e2e85e9cd7dc0c1fd"; }; "assert-options@npm:0.8.1" = { filename = "assert-options-npm-0.8.1-ed3051eefd-aaf86a9c6a.zip"; sha512 = "aaf86a9c6a330e43172544ce2cc2b59bf8b4338dd0933d852e9b7efbae7b801944671e7dd6cc172d0dcfc88713009d88dca56cc34c8d4ba7fc5aeb1cf3e9bcef"; }; "pg-minify@npm:1.6.3" = { filename = "pg-minify-npm-1.6.3-fef1d2601d-5b9868f2b9.zip"; sha512 = "5b9868f2b90b9629455db6e13c35b1228b65803bbf9fc1a02d49fe147b55bb20eed53d368bf8f9f8127a2e740697b20702702e58f4846d9f5f3749d840a14c99"; }; "spex@npm:3.3.0" = { filename = "spex-npm-3.3.0-833f63faad-c2797eae65.zip"; sha512 = "c2797eae658e0f97b92775a9a87cd6d615e87693b4d5abfd3120543391e3eeab2755ab101489752f3ff47c1e0623737a604c5411e8f9bca7714d4e0427c182c0"; }; @@ -1085,7 +1086,6 @@ cacheEntries = { "word-wrap@npm:1.2.3" = { filename = "word-wrap-npm-1.2.3-7fb15ab002-30b48f91fc.zip"; sha512 = "30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f"; }; "type-check@npm:0.3.2" = { filename = "type-check-npm-0.3.2-a4a38bb0b6-dd3b149564.zip"; sha512 = "dd3b1495642731bc0e1fc40abe5e977e0263005551ac83342ecb6f4f89551d106b368ec32ad3fb2da19b3bd7b2d1f64330da2ea9176d8ddbfe389fb286eb5124"; }; "levn@npm:0.3.0" = { filename = "levn-npm-0.3.0-48d774b1c2-0d084a5242.zip"; sha512 = "0d084a524231a8246bb10fec48cdbb35282099f6954838604f3c7fc66f2e16fa66fd9cc2f3f20a541a113c4dafdf181e822c887c8a319c9195444e6c64ac395e"; }; -"@blockfrost/openapi@npm:0.1.60" = { filename = "@blockfrost-openapi-npm-0.1.60-64f77da01a-2ab66de532.zip"; sha512 = "2ab66de532917fef3f1e88ab0cbb4259f79ba9b73fd865cd815f1e836d596de4394ece2914bd8b5ac8f0d38a7f7e11226a6a21ec298a4becf4d273e40abb08f4"; }; }; in optionalOverride overrideAttrs project