As an App Provider Is there a way to programmatically confirm which validators have uploaded a specific dar?
This is useful especially when upgrading the application to ensure all clients are on a supported version of a dar.
As an App Provider Is there a way to programmatically confirm which validators have uploaded a specific dar?
This is useful especially when upgrading the application to ensure all clients are on a supported version of a dar.
Yes. The Admin API provides access to the topology state of the Network. The following commands within the canton console return a list of all participants that have vetted a certain package:
@ val packageID = <my package ID>
packageID: String = <my package ID>
@ val packageVettedParticipantIds = participants.remote.flatMap { participant => val vettedPackages =
participant.topology.vetted_packages.list()
vettedPackages.filter(res => res.item.packages.exists(_.packageId == packageID))
.map(res => res.item.participantId)
}
packageVettedParticipantIds: Seq[ParticipantId] = List(
PAR::validator1::122021...,
PAR::validator2::1220ca...,
)