Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Splice main to version 0.3.9-snapshot.20250124.8128.0.vdfb0f214 (automatic PR) #201

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion LATEST_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.5
0.3.8
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.6
0.3.9
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ object SpliceConfig {
deriveReader[MigrateValidatorPartyConfig]
implicit val validatorConfigReader: ConfigReader[ValidatorAppBackendConfig] =
deriveReader[ValidatorAppBackendConfig].emap { conf =>
val participantIdentifier =
ValidatorCantonIdentifierConfig.resolvedNodeIdentifierConfig(conf).participant
for {
_ <- Either.cond(
!conf.svValidator || conf.validatorPartyHint.isEmpty,
Expand All @@ -617,6 +619,16 @@ object SpliceConfig {
(),
ConfigValidationFailed("Validator party hint must be specified for non-SV validators"),
)
_ <- Either.cond(
conf.participantBootstrappingDump.forall(
_.newParticipantIdentifier == Some(participantIdentifier)
),
(),
ConfigValidationFailed(
s"New participant identifier in bootstrap dump config ${conf.participantBootstrappingDump
.map(_.newParticipantIdentifier)} must match participant node identifier $participantIdentifier"
),
)
} yield conf
}
implicit val validatorClientConfigReader: ConfigReader[ValidatorAppClientConfig] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,6 @@ class SvAppBackendReference(
httpCommand(HttpSvAdminAppClient.GetMediatorNodeStatus())
}

def signSynchronizerBootstrappingState(domainIdPrefix: String): Unit =
consoleEnvironment.run {
httpCommand(
HttpSvSoftDomainMigrationPocAppClient.SignSynchronizerBootstrappingState(domainIdPrefix)
)
}

def initializeSynchronizer(domainIdPrefix: String): Unit =
consoleEnvironment.run {
httpCommand(HttpSvSoftDomainMigrationPocAppClient.InitializeSynchronizer(domainIdPrefix))
}

def reconcileSynchronizerDamlState(domainIdPrefix: String): Unit =
consoleEnvironment.run {
httpCommand(
Expand Down Expand Up @@ -440,13 +428,7 @@ class SvAppBackendReference(
)

def sequencerClient(domainId: DomainId): SequencerClientReference = {
val synchronizerConfig = config.synchronizerNodes.get(domainId.uid.identifier.str) match {
case Some(synchronizer) => synchronizer
case None =>
config.localSynchronizerNode.getOrElse(
throw new RuntimeException("No sequencer admin connection configured for SV App")
)
}
val synchronizerConfig = synchronizerConfigForDomain(domainId)
new SequencerClientReference(
consoleEnvironment,
s"sequencer client for $name for domain $domainId",
Expand All @@ -463,11 +445,20 @@ class SvAppBackendReference(
)
}

def mediatorClient(domainId: DomainId): MediatorClientReference = {
val synchronizerConfig: SvSynchronizerNodeConfig = synchronizerConfigForDomain(domainId)
new MediatorClientReference(
consoleEnvironment,
s"mediator client for $name for domain $domainId",
synchronizerConfig.mediator.toCantonConfig,
)
}

def mediatorClient(domainAlias: DomainAlias): MediatorClientReference = {
val synchronizerConfig: SvSynchronizerNodeConfig = synchronizerConfigForDomain(domainAlias)
new MediatorClientReference(
consoleEnvironment,
s"mediator client for $name",
s"mediator client for $name for domain $domainAlias",
synchronizerConfig.mediator.toCantonConfig,
)
}
Expand All @@ -482,4 +473,15 @@ class SvAppBackendReference(
}
synchronizerConfig
}

private def synchronizerConfigForDomain(domainId: DomainId) = {
val synchronizerConfig = config.synchronizerNodes.get(domainId.uid.identifier.str) match {
case Some(synchronizer) => synchronizer
case None =>
config.localSynchronizerNode.getOrElse(
throw new RuntimeException("No sequencer admin connection configured for SV App")
)
}
synchronizerConfig
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ onboardingSecretFrom:
optional: false
# Party ID hint for the validator operator party, should be of format <organization>-<function>-<enumerator>,
# e.g. digitalAsset-finance-1
validatorPartyHint: ""
validatorPartyHint: "YOUR_VALIDATOR_PARTY_HINT"

# MIGRATION_START
# Replace MIGRATION_ID with the migration ID of the global synchronizer.
Expand All @@ -23,17 +23,16 @@ persistence:
secretName: postgres-secrets
host: postgres

# PARTICIPANT_BOOTSTRAP_DUMP_START
# Uncomment the following block if you want to restore from a participant dump
# participantIdentitiesDumpImport:
# secretName: participant-bootstrap-dump
# PARTICIPANT_BOOTSTRAP_DUMP_END
# and recover your balance
# PARTICIPANT_BOOTSTRAP_MIGRATE_TO_NEW_PARTICIPANT_START
# Uncomment the following line if you want to migrate the validator party to a new participant
# newParticipantIdentifier: put-some-new-string-never-used-before
# participantIdentitiesDumpImport:
# secretName: participant-bootstrap-dump
# # Make sure to also adjust nodeIdentifier to the same value
# newParticipantIdentifier: put-some-new-string-never-used-before
# migrateValidatorParty: true
# PARTICIPANT_BOOTSTRAP_MIGRATE_TO_NEW_PARTICIPANT_END

# Replace YOUR_VALIDATOR_NAME with the name you provided for your validator identity.
# Replace YOUR_VALIDATOR_NODE_NAME with the name you provided for your validator identity.
# This value will be used for the node identifier of your participant.
nodeIdentifier: YOUR_VALIDATOR_NAME
nodeIdentifier: "YOUR_VALIDATOR_NODE_NAME"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
canton.participants.validatorParticipant.http-ledger-api-experimental = null
canton.participants.validatorParticipant.http-ledger-api = null
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ canton {
enable-verbose-hashing = true
}
}
http-ledger-api-experimental {
http-ledger-api {
server {
port = 7575
address = 0.0.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ _aliceParticipant_client {
admin-api.port = 15502
ledger-api.port = 15501
# Unused so just disable it
http-ledger-api-experimental = null
http-ledger-api = null
}

_bobParticipant_client {
admin-api.port = 15602
ledger-api.port = 15601
# Unused so just disable it
http-ledger-api-experimental = null
http-ledger-api = null
}

_splitwellParticipant_client {
admin-api.port = 15702
ledger-api.port = 15701
# Unused so just disable it
http-ledger-api-experimental = null
http-ledger-api = null
}

_sv1Sequencer_client {
Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/test/resources/simple-topology-canton.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _sv4Participant_client {
_aliceParticipant_client {
admin-api.port = 5502
ledger-api.port = 5501
http-ledger-api-experimental {
http-ledger-api {
server.port = 6201
allow-insecure-tokens = true
}
Expand All @@ -35,7 +35,7 @@ _aliceParticipant_client {
_bobParticipant_client {
admin-api.port = 5602
ledger-api.port = 5601
http-ledger-api-experimental {
http-ledger-api {
server.port = 6301
allow-insecure-tokens = true
}
Expand All @@ -44,7 +44,7 @@ _bobParticipant_client {
_splitwellParticipant_client {
admin-api.port = 5702
ledger-api.port = 5701
http-ledger-api-experimental {
http-ledger-api {
server.port = 6401
allow-insecure-tokens = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include required("include/participants.conf")
_validatorParticipant_client {
admin-api.port = 5902
ledger-api.port = 5901
http-ledger-api-experimental {
http-ledger-api {
server.port = 6901
allow-insecure-tokens = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.lfdecentralizedtrust.splice.sv.automation.delegatebased.{
}
import org.lfdecentralizedtrust.splice.wallet.automation.SubscriptionReadyForPaymentTrigger
import com.digitalasset.canton.config.NonNegativeFiniteDuration
import com.digitalasset.canton.console.CommandFailure
import com.digitalasset.canton.logging.SuppressionRule
import com.digitalasset.canton.topology.PartyId
import org.scalatest.Assertion
Expand Down Expand Up @@ -156,7 +157,11 @@ class AnsIntegrationTest extends IntegrationTest with WalletTestUtil with Trigge

requestAndPayForEntry(aliceRefs, testEntryName)
eventually() {
val entry = sv1ScanBackend.lookupEntryByName(testEntryName)
val entry =
try sv1ScanBackend.lookupEntryByName(testEntryName)
catch {
case e: CommandFailure if e.getMessage contains "Entry with name" => fail(e)
}
entry.name shouldBe testEntryName
entry.user shouldBe aliceRefs.userParty.toProtoPrimitive
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class DockerComposeValidatorFrontendIntegrationTest
}

"docker-compose based validator with auth works" in { _ =>
val validatorUserPassword = sys.env(s"VALIDATOR_WEB_UI_PASSWORD")
val validatorUserPassword = sys.env(s"COMPOSE_VALIDATOR_WEB_UI_PASSWORD")

withComposeValidator(
extraClue = "with auth",
Expand All @@ -263,13 +263,13 @@ class DockerComposeValidatorFrontendIntegrationTest
eventuallySucceeds()(go to s"http://wallet.localhost")
completeAuth0LoginWithAuthorization(
"http://wallet.localhost",
"[email protected]",
"admin@compose-validator.com",
validatorUserPassword,
() => seleniumText(find(id("logged-in-user"))) should startWith(partyHint),
)
completeAuth0LoginWithAuthorization(
"http://ans.localhost",
"[email protected]",
"admin@compose-validator.com",
validatorUserPassword,
() => seleniumText(find(id("logged-in-user"))) should startWith(partyHint),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,21 @@ class SoftDomainMigrationIntegrationTest
val dsoRules = sv1Backend.getDsoInfo().dsoRules

clue("Bootstrap new domain") {
clue("Sign bootstrapping state") {
val signed = env.svs.local.map { sv =>
Future { sv.signSynchronizerBootstrappingState(prefix) }
clue("Wait for signed topology state to appear") {
env.svs.local.map { sv =>
eventually() {
sv.participantClient.topology.domain_parameters
.list(filterDomain = "global-domain-new") should not be empty
}
}
signed.foreach(_.futureValue)
}
clue("Initialize synchronizer nodes") {
val initialized = env.svs.local.map { sv =>
Future { sv.initializeSynchronizer(prefix) }
clue("Wait for synchronizer to be initialized") {
env.svs.local.map { sv =>
eventually() {
sv.sequencerClient(newDomainId).health.status.isActive shouldBe Some(true)
sv.mediatorClient(newDomainId).health.status.isActive shouldBe Some(true)
}
}
initialized.foreach(_.futureValue)
}
clue("New synchronizer is registered in DsoRules config") {
val (_, dsoRulesVoteRequest) = actAndCheck(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ class ValidatorReonboardingIntegrationTest

val dumpPath = Files.createTempFile("participant-dump", ".json")

val aliceValidatorLocalRestartName = "aliceValidatorLocalRestart"

private def aliceValidatorLocalRestart(implicit env: SpliceTestConsoleEnvironment) = v(
aliceValidatorLocalRestartName
)

private def aliceValidatorLocalWalletClient(implicit env: SpliceTestConsoleEnvironment) =
wc("aliceValidatorWalletLocal")

Expand Down Expand Up @@ -97,25 +103,33 @@ class ValidatorReonboardingIntegrationTest
),
),
)
val aliceValidatorConfigNewBase = aliceValidatorConfig
.copy(
adminApi =
aliceValidatorConfig.adminApi.copy(internalPort = Some(Port.tryCreate(27603))),
storage = aliceValidatorConfig.storage match {
case c: SpliceDbConfig.Postgres =>
c.copy(
config = c.config
.withValue(
"properties.databaseName",
ConfigValueFactory.fromAnyRef("splice_apps_reonboard"),
)
)
case _ => throw new IllegalArgumentException("Only Postgres is supported")
},
cantonIdentifierConfig = Some(
ValidatorCantonIdentifierConfig(
participant = "aliceValidatorLocalNewForValidatorReonboardingIT"
)
),
)
config.copy(
validatorApps = config.validatorApps +
(InstanceName.tryCreate("aliceValidator") -> aliceValidatorConfig) +
(InstanceName.tryCreate("aliceValidatorLocal") -> {
aliceValidatorConfig
aliceValidatorConfigNewBase
.copy(
adminApi =
aliceValidatorConfig.adminApi.copy(internalPort = Some(Port.tryCreate(27603))),
storage = aliceValidatorConfig.storage match {
case c: SpliceDbConfig.Postgres =>
c.copy(
config = c.config
.withValue(
"properties.databaseName",
ConfigValueFactory.fromAnyRef("splice_apps_reonboard"),
)
)
case _ => throw new IllegalArgumentException("Only Postgres is supported")
},
participantBootstrappingDump = Some(
ParticipantBootstrapDumpConfig
.File(
Expand All @@ -134,7 +148,8 @@ class ValidatorReonboardingIntegrationTest
)
),
)
}),
}) +
(InstanceName.tryCreate(aliceValidatorLocalRestartName) -> aliceValidatorConfigNewBase),
walletAppClients = config.walletAppClients + (
InstanceName.tryCreate("aliceValidatorWalletLocal") -> {
val aliceValidatorWalletConfig =
Expand Down Expand Up @@ -313,6 +328,11 @@ class ValidatorReonboardingIntegrationTest
.loneElement
.effectiveAmount shouldBe lockedAmount
}

clue("Restart validator without migration config") {
aliceValidatorLocalBackend.stop()
aliceValidatorLocalRestart.startSync()
}
}
}
}
Loading