Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0e92266
some fixes + diff data source
kpinter-iohk Nov 7, 2025
a5a545e
fixes
kpinter-iohk Nov 10, 2025
1123111
add block caching
kpinter-iohk Nov 12, 2025
9f129e1
remove diff sources
kpinter-iohk Nov 12, 2025
64ebe1b
fix docstrings
kpinter-iohk Nov 12, 2025
477da44
address comments
kpinter-iohk Nov 13, 2025
1441b3a
better errors
kpinter-iohk Nov 13, 2025
edaa6ec
upgrade to dolos rc2
kpinter-iohk Nov 13, 2025
7570d44
formatting
kpinter-iohk Nov 13, 2025
7b29bcd
fix
kpinter-iohk Nov 14, 2025
3e3d7f9
api cleanup
kpinter-iohk Nov 14, 2025
5beac89
fixes
kpinter-iohk Nov 6, 2025
0f28a5a
stake distribution dolos data source
kpinter-iohk Nov 5, 2025
a37bb82
wip
kpinter-iohk Nov 14, 2025
31284fb
WIP fix compiler errors
jankun4 Nov 19, 2025
a1d7609
Merge remote-tracking branch 'origin/dolos-data-source-bridge-jankun'…
ladamesny Nov 19, 2025
b94fdbd
ETCM-12351: Implement governed-map data source
ladamesny Nov 21, 2025
9754ae6
ETCM-12351: clean up for stake distribution
ladamesny Nov 21, 2025
ae2bcd7
ETCM-12351: optimize asset utxo dolos query
ladamesny Nov 21, 2025
872256b
tests: fix closing parens and types
ladamesny Nov 24, 2025
90bada8
ETCM-12351: Refactor Dolos data sources: manual asset filtering and i…
ladamesny Nov 24, 2025
e3b5957
ETCM-12351: fix dolos data source code
ladamesny Nov 25, 2025
9608e5a
Merge master into ETCM-12351-dolos-governed-map-data-source
ladamesny Nov 26, 2025
8509df2
ETCM-12351: apply option to set dolos to local env
ladamesny Nov 26, 2025
bff4f35
ETCM-12351: improve error handling on dolos data sourcce
ladamesny Dec 1, 2025
5933299
Mrge branch 'master' of github.com:input-output-hk/partner-chains int…
ladamesny Dec 1, 2025
eda4777
ETCM-12351: rename variable
ladamesny Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions demo/node/src/data_sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ pub fn create_mock_data_sources()

// TODO Currently uses db-sync for unimplemented Dolos data sources
pub async fn create_dolos_data_sources(
metrics_opt: Option<McFollowerMetrics>,
_metrics_opt: Option<McFollowerMetrics>,
) -> std::result::Result<DataSources, Box<dyn Error + Send + Sync + 'static>> {
let dolos_client = partner_chains_dolos_data_sources::get_connection_from_env()?;
let pool = partner_chains_db_sync_data_sources::get_connection_from_env().await?;
let block_dbsync = Arc::new(
partner_chains_db_sync_data_sources::BlockDataSourceImpl::new_from_env(pool.clone())
.await?,
);
let block_dolos = Arc::new(
partner_chains_dolos_data_sources::BlockDataSourceImpl::new_from_env(dolos_client.clone())
.await?,
Expand All @@ -130,29 +125,18 @@ pub async fn create_dolos_data_sources(
),
),
block_participation: Arc::new(
partner_chains_db_sync_data_sources::StakeDistributionDataSourceImpl::new(
pool.clone(),
metrics_opt.clone(),
STAKE_CACHE_SIZE,
partner_chains_dolos_data_sources::StakeDistributionDataSourceImpl::new(
dolos_client.clone(),
),
),
governed_map: Arc::new(
partner_chains_db_sync_data_sources::GovernedMapDataSourceCachedImpl::new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see 2 datasources coming from dbsync here, StakeDistributionDataSourceImpl and CachedTokenBridgeDataSourceImpl

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, this is intentional.

At the beginning of this, we had dbsync based data sources (multiple).
To implement the dolos data sources, I copied the dbsync based data sources, and started replacing them one by one. This is necessary as we can't implement all 5-6 data sources all at once.
There is a transitional period, while the dolos data sources use a mixture of dolos and dbsync. We go through each source in the dolos data sources, and we rewrite the dbsync ones to use dolos.

Note, that all of this is in addition to the dbsync data source, which is kept as is.
Again, in addition to the dbsync data sources we created the dolos ones, which use pieces of the dbsync implementation as stand-in, until they are implemented one by one and replaced. This is needed because there is a lot of code and we don't want to do it all in one PR.

pool.clone(),
metrics_opt.clone(),
GOVERNED_MAP_CACHE_SIZE,
block_dbsync.clone(),
)
.await?,
),
bridge: Arc::new(
partner_chains_db_sync_data_sources::CachedTokenBridgeDataSourceImpl::new(
pool,
metrics_opt,
block_dbsync,
BRIDGE_TRANSFER_CACHE_LOOKAHEAD,
partner_chains_dolos_data_sources::GovernedMapDataSourceImpl::new(
dolos_client.clone(),
),
),
bridge: Arc::new(partner_chains_dolos_data_sources::TokenBridgeDataSourceImpl::new(
dolos_client,
)),
})
}

Expand Down
33 changes: 21 additions & 12 deletions dev/local-environment/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,15 @@ choose_deployment_option() {
echo "===== CUSTOM STACK MODIFICATIONS ========"
read -p "Make custom modification to the stack? (Y/N): " modify_stack
if [[ $modify_stack =~ ^[Yy]$ ]]; then
echo "Choose your deployment option:"
echo "1) Include only Cardano testnet"
echo "2) Include Cardano testnet with Ogmios"
echo "3) Include Cardano testnet, Ogmios, DB-Sync and Postgres"
echo "4) Deploy a single Partner Chains node with network_mode: "host" for external connections (adjust partner-chains-external-node.txt before running this script)"
echo "5) Deploy a 3 node Partner Chain network using wizard"
echo "6) Include Cardano testnet, Ogmios, and Dolos"
read -p "Enter your choice (1/2/3/4/5/6): " deployment_option
echo "Choose your deployment option:"
echo "1) Include only Cardano testnet"
echo "2) Include Cardano testnet with Ogmios"
echo "3) Include Cardano testnet, Ogmios, DB-Sync and Postgres"
echo "4) Deploy a single Partner Chains node with network_mode: \"host\" for external connections (adjust partner-chains-external-node.txt before running this script)"
echo "5) Deploy a 3 node Partner Chain network using wizard"
echo "6) Include Cardano testnet, Ogmios, DB-Sync, Postgres, Dolos and Partner Chains nodes with Dolos"
echo "7) Include Cardano testnet, Ogmios, Dolos (NO DB-Sync/Postgres) and Partner Chains nodes with Dolos"
read -p "Enter your choice (1/2/3/4/5/6/7): " deployment_option
else
deployment_option=0
fi
Expand Down Expand Up @@ -382,7 +383,7 @@ create_docker_compose() {
cat ./modules/partner-chains-wizard.txt >> docker-compose.yml
;;
6)
echo -e "Including all services with Dolos data source.\n"
echo -e "Including all services with Dolos data source.\\n"
cat ./modules/cardano.txt >> docker-compose.yml
cat ./modules/ogmios.txt >> docker-compose.yml
cat ./modules/db-sync.txt >> docker-compose.yml
Expand All @@ -391,6 +392,14 @@ create_docker_compose() {
cat ./modules/partner-chains-nodes-dolos.txt >> docker-compose.yml
cat ./modules/partner-chains-setup.txt >> docker-compose.yml
;;
7)
echo -e "Including Cardano testnet, Ogmios, Dolos (no DB-Sync/Postgres) and Partner Chains nodes with Dolos.\\n"
cat ./modules/cardano.txt >> docker-compose.yml
cat ./modules/ogmios.txt >> docker-compose.yml
cat ./modules/dolos.txt >> docker-compose.yml
cat ./modules/partner-chains-nodes-dolos.txt >> docker-compose.yml
cat ./modules/partner-chains-setup.txt >> docker-compose.yml
;;
0)
echo -e "Including all services.\n"
cat ./modules/cardano.txt >> docker-compose.yml
Expand Down Expand Up @@ -427,11 +436,11 @@ parse_arguments() {
shift
;;
-d|--deployment-option)
if [[ -n "$2" && "$2" =~ ^[1-6]$ ]]; then
if [[ -n "$2" && "$2" =~ ^[1-7]$ ]]; then
deployment_option="$2"
shift 2
else
echo "Error: Invalid deployment option '$2'. Valid options are 1, 2, 3, 4, 5 or 6."
echo "Error: Invalid deployment option '$2'. Valid options are 1, 2, 3, 4, 5, 6 or 7."
exit 1
fi
;;
Expand Down Expand Up @@ -462,7 +471,7 @@ parse_arguments() {
echo "Usage: $0 [OPTION]..."
echo "Initialize and configure the Docker environment."
echo " -n, --non-interactive Run with no interactive prompts and accept sensible default configuration settings."
echo " -d, --deployment-option Specify one of the custom deployment options (1, 2, 3, or 4)."
echo " -d, --deployment-option Specify one of the custom deployment options (1, 2, 3, 4, 5, 6, or 7)."
echo " -p, --postgres-password Set a specific password for PostgreSQL (overrides automatic generation)."
echo " -i, --node-image Specify a custom Partner Chains Node image."
echo " -t, --tests Include tests container."
Expand Down
Loading
Loading