diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index 10d2cbcae15..98fba837c93 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -143,3 +143,7 @@ xctest xctestrun xcworkspace yoroi +dalek +Keyhash +Scripthash +vkey \ No newline at end of file diff --git a/catalyst-gateway/Cargo.lock b/catalyst-gateway/Cargo.lock index d09dc3788d6..ac9e4454702 100644 --- a/catalyst-gateway/Cargo.lock +++ b/catalyst-gateway/Cargo.lock @@ -152,9 +152,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arrayvec" @@ -178,24 +178,24 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -376,15 +376,15 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "syn_derive", ] [[package]] name = "brotli" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -444,7 +444,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cardano-chain-follower" version = "0.0.1" -source = "git+https://github.com/input-output-hk/hermes.git#5d3746d9e8cd969e3fa1452e18dfac8891d01a06" +source = "git+https://github.com/input-output-hk/hermes.git#8b2ac7b2fa79af75fd20f33128db6525d708400a" dependencies = [ "pallas", "pallas-hardano", @@ -534,9 +534,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -556,14 +556,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -698,7 +698,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -709,7 +709,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -878,7 +878,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -966,9 +966,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -985,9 +985,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" +checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" dependencies = [ "bytes", "fnv", @@ -1053,6 +1053,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1137,12 +1143,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", - "futures-util", + "futures-core", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -1170,7 +1176,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1193,7 +1199,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.2", + "h2 0.4.3", "http 1.1.0", "http-body 1.0.0", "httparse", @@ -1861,7 +1867,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbb7b706f2afc610f3853550cdbbf6372fd324824a087806bd4480ea4996e24" dependencies = [ - "heck", + "heck 0.4.1", "itertools 0.10.5", "prost", "prost-types", @@ -1933,7 +1939,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2006,7 +2012,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2029,7 +2035,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "thiserror", ] @@ -2075,7 +2081,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.52", + "syn 2.0.53", "thiserror", ] @@ -2194,9 +2200,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -2233,7 +2239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -2456,7 +2462,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.52", + "syn 2.0.53", "walkdir", ] @@ -2572,7 +2578,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2600,9 +2606,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" dependencies = [ "indexmap 2.2.5", "itoa", @@ -2737,9 +2743,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -2755,7 +2761,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2787,22 +2793,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2897,7 +2903,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2928,9 +2934,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2980,7 +2986,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", @@ -3048,7 +3054,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3176,9 +3182,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "url" @@ -3291,7 +3297,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -3313,7 +3319,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3358,9 +3364,9 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" dependencies = [ "redox_syscall", "wasite", @@ -3369,9 +3375,9 @@ dependencies = [ [[package]] name = "wildmatch" -version = "2.3.0" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495ec47bf3c1345005f40724f0269362c8556cbc43aed0526ed44cae1d35fceb" +checksum = "939e59c1bc731542357fdaad98b209ef78c8743d652bb61439d16b16a79eb025" [[package]] name = "winapi" diff --git a/catalyst-gateway/Earthfile b/catalyst-gateway/Earthfile index 52d951b5532..10dc76baed5 100644 --- a/catalyst-gateway/Earthfile +++ b/catalyst-gateway/Earthfile @@ -4,7 +4,7 @@ VERSION --try --global-cache 0.7 # Set up our target toolchains, and copy our files. builder: - DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.9.3+SETUP + DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.9.8+SETUP COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates tests . COPY --dir ./event-db/queries ./event-db/queries diff --git a/catalyst-gateway/bin/src/event_db/error.rs b/catalyst-gateway/bin/src/event_db/error.rs index 3fadc1981ad..f4a0376cac5 100644 --- a/catalyst-gateway/bin/src/event_db/error.rs +++ b/catalyst-gateway/bin/src/event_db/error.rs @@ -47,6 +47,9 @@ pub(crate) enum Error { /// Unable to extract policy assets #[error("Unable parse assets: {0}")] AssetParsingIssue(String), + /// Unable to extract hashed witnesses + #[error("Unable to extract hashed witnesses: {0}")] + HashedWitnessExtraction(String), } impl From> for Error { diff --git a/catalyst-gateway/bin/src/event_db/utxo.rs b/catalyst-gateway/bin/src/event_db/utxo.rs index 99faeb39f55..c059b405e47 100644 --- a/catalyst-gateway/bin/src/event_db/utxo.rs +++ b/catalyst-gateway/bin/src/event_db/utxo.rs @@ -5,8 +5,14 @@ use pallas::ledger::traverse::MultiEraTx; use super::follower::SlotNumber; use crate::{ - event_db::{Error, Error::SqlTypeConversionFailure, EventDB}, - util::parse_policy_assets, + event_db::{ + Error::{self, SqlTypeConversionFailure}, + EventDB, + }, + util::{ + extract_hashed_witnesses, extract_stake_credentials_from_certs, + find_matching_stake_credential, parse_policy_assets, + }, }; impl EventDB { @@ -20,6 +26,29 @@ impl EventDB { self.index_txn_data(tx.hash().as_slice(), slot_no, network) .await?; + let stake_credentials = extract_stake_credentials_from_certs(&tx.certs()); + + // Don't index if there is no staking + if stake_credentials.is_empty() { + return Ok(()); + } + + let witnesses = match extract_hashed_witnesses(tx.vkey_witnesses()) { + Ok(w) => w, + Err(err) => return Err(Error::HashedWitnessExtraction(err.to_string())), + }; + + let (_stake_credential, stake_credential_hash) = + match find_matching_stake_credential(&witnesses, &stake_credentials) { + Ok(s) => s, + Err(_err) => { + // Most TXs will not have abided by staking rules, hence logging is too + // noisy. We will not index these TXs and ignore + // them. + return Ok(()); + }, + }; + // index outputs for tx_out in tx.outputs() { // extract assets @@ -45,9 +74,11 @@ impl EventDB { .to_string(), ) })?, - &tx.hash().as_slice(), /* temporary until we have foreign key - * relationship in the context of - * registrations */ + &hex::decode(&stake_credential_hash).map_err(|e| { + Error::DecodeHex(format!( + "Unable to decode stake credential hash {e}" + )) + })?, &assets, ], ) diff --git a/catalyst-gateway/bin/src/util.rs b/catalyst-gateway/bin/src/util.rs index 902abc50efb..5fefd23f48e 100644 --- a/catalyst-gateway/bin/src/util.rs +++ b/catalyst-gateway/bin/src/util.rs @@ -1,8 +1,26 @@ //! Block stream parsing and filtering utils -use pallas::ledger::traverse::{Era, MultiEraAsset, MultiEraPolicyAssets}; +use std::error::Error; + +use cryptoxide::{blake2b::Blake2b, digest::Digest}; +use pallas::ledger::{ + primitives::conway::{StakeCredential, VKeyWitness}, + traverse::{Era, MultiEraAsset, MultiEraCert, MultiEraPolicyAssets}, +}; use serde::Serialize; +/// Witness pub key hashed with blake2b +pub type WitnessHash = String; + +/// Witness pub key in hex +pub type WitnessPubKey = String; + +/// Stake credential hash from the certificate +pub type StakeCredentialHash = String; + +/// Correct stake credential key in hex +pub type StakeCredentialKey = String; + #[derive(Default, Debug, Serialize)] /// Assets pub struct Asset { @@ -23,14 +41,6 @@ pub struct PolicyAsset { pub assets: Vec, } -/// Eras before staking should be ignored -pub fn valid_era(era: Era) -> bool { - matches!( - era, - Era::Shelley | Era::Allegra | Era::Mary | Era::Alonzo | Era::Babbage | Era::Conway - ) -} - /// Extract assets pub fn parse_policy_assets(assets: &[MultiEraPolicyAssets<'_>]) -> Vec { assets @@ -70,3 +80,79 @@ pub fn parse_child_assets(assets: &[MultiEraAsset]) -> Vec { }) .collect() } + +/// Eras before staking should be ignored +pub fn valid_era(era: Era) -> bool { + !matches!(era, Era::Byron) +} + +/// Extract stake credentials from certificates. Stake credentials are 28 byte blake2b +/// hashes. +pub fn extract_stake_credentials_from_certs( + certs: &[MultiEraCert<'_>], +) -> Vec { + let mut stake_credentials = Vec::new(); + + for cert in certs { + if let Some(cert) = cert.as_alonzo() { + match cert { + pallas::ledger::primitives::alonzo::Certificate::StakeDelegation( + stake_credential, + _, + ) => { + match stake_credential { + StakeCredential::AddrKeyhash(stake_credential) => { + stake_credentials.push(hex::encode(stake_credential.as_slice())); + }, + StakeCredential::Scripthash(_) => (), + } + }, + _ => continue, + } + } + } + + stake_credentials +} + +/// Extract witness pub keys and pair with blake2b hash of the pub key. +/// Hashes are generally 32-byte long on Cardano (or 256 bits), +/// except for credentials (i.e. keys or scripts) which are 28-byte long (or 224 bits) +pub fn extract_hashed_witnesses( + witnesses: &[VKeyWitness], +) -> Result, Box> { + let mut hashed_witnesses = Vec::new(); + for witness in witnesses { + let pub_key_bytes: [u8; 32] = witness.vkey.as_slice().try_into()?; + + let pub_key_hex = hex::encode(pub_key_bytes); + + let mut digest = [0u8; 28]; + let mut context = Blake2b::new(28); + context.input(&pub_key_bytes); + context.result(&mut digest); + hashed_witnesses.push((pub_key_hex, hex::encode(digest))); + } + + Ok(hashed_witnesses) +} + +/// Match hashed witness pub keys with hashed stake credentials from the TX certificates +/// to identify the correct stake credential key. +pub fn find_matching_stake_credential( + witnesses: &[(WitnessPubKey, WitnessHash)], stake_credentials: &[String], +) -> Result<(StakeCredentialKey, StakeCredentialHash), Box> { + stake_credentials + .iter() + .zip(witnesses.iter()) + .find_map(|(stake_credential, (pub_key, pub_key_hash))| { + if stake_credential == pub_key_hash { + Some((pub_key.clone(), pub_key_hash.clone())) + } else { + None + } + }) + .ok_or( + "No stake credential from the certificates matches any of the witness pub keys".into(), + ) +} diff --git a/catalyst-gateway/deny.toml b/catalyst-gateway/deny.toml index 80eedc9a6e6..24ab10c6ca9 100644 --- a/catalyst-gateway/deny.toml +++ b/catalyst-gateway/deny.toml @@ -110,7 +110,8 @@ allow = [ "BSD-3-Clause", "BSD-2-Clause", "BlueOak-1.0.0", - "Apache-2.0 WITH LLVM-exception" + "Apache-2.0 WITH LLVM-exception", + "CC0-1.0" ] # List of explicitly disallowed licenses # See https://spdx.org/licenses/ for list of possible licenses diff --git a/catalyst-gateway/event-db/Earthfile b/catalyst-gateway/event-db/Earthfile index 5a9767bb8ee..208ca7c2de0 100644 --- a/catalyst-gateway/event-db/Earthfile +++ b/catalyst-gateway/event-db/Earthfile @@ -9,7 +9,7 @@ VERSION 0.7 # Internal: builder is our Event db builder target. Prepares all necessary artifacts. # CI target : dependency builder: - DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.3+BUILDER \ + DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.8+BUILDER \ --sqlfluff_cfg=./../../+repo-config/repo/.sqlfluff COPY ./../../+repo-config/repo/.sqlfluff . @@ -24,7 +24,7 @@ builder: check: FROM +builder - DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.3+CHECK + DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.8+CHECK # format all SQL files in the current project. Local developers tool. @@ -32,15 +32,15 @@ check: format: LOCALLY - DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.2+FORMAT --src=$(echo ${PWD}/../../) + DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.8+FORMAT --src=$(echo ${PWD}/../../) # build - an event db docker image. # CI target : true build: FROM +builder - DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.2+BUILD --image_name=event-db - DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.2+DOCS --image_name=event-db + DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.8+BUILD --image_name=event-db + DO github.com/input-output-hk/catalyst-ci/earthly/postgresql:v2.9.8+DOCS --image_name=event-db # test the event db database schema # CI target : true diff --git a/docs/Earthfile b/docs/Earthfile index 36fb903fb85..8e8f5ec78f6 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -6,7 +6,7 @@ VERSION 0.7 # Copy all the source we need to build the docs src: # Common src setup - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.5+SRC + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.8+SRC # Now copy into that any artifacts we pull from the builds. COPY --dir ../+repo-docs/repo /docs/includes @@ -21,12 +21,12 @@ src: docs: FROM +src - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.5+BUILD + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.8+BUILD # Make a locally runable container that can serve the docs. local: # Build a self contained service to show built docs locally. - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.5+PACKAGE + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.9.8+PACKAGE # Copy the static pages into the container COPY +docs/ /usr/share/nginx/html