Skip to content

fix(ci): fix release workflow syntax error#808

Merged
QuantumExplorer merged 1 commit into
v0.24-devfrom
fix/release-action
Feb 24, 2023
Merged

fix(ci): fix release workflow syntax error#808
QuantumExplorer merged 1 commit into
v0.24-devfrom
fix/release-action

Conversation

@pshenmic

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Platform release github actions workflow is currently broken, and it breaks on every pull request merge, because of syntax error.

Example: https://github.com/dashpay/platform/actions/runs/4261755175

What was done?

Put env inside run step script string

How Has This Been Tested?

Not tested yet (there is no Run workflow button in the actions for this workflow)

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer
QuantumExplorer merged commit 38708ce into v0.24-dev Feb 24, 2023
@QuantumExplorer
QuantumExplorer deleted the fix/release-action branch February 24, 2023 15:21
shumkov added a commit that referenced this pull request Jun 19, 2026
…when ports vanish

Two Core 23 masternode-diff correctness fixes (rust-dashcore#808 context):

1. Zeroed legacy port must not surface. Core 23 (ProTx v3) entries zero the
   deprecated flat platformP2PPort/HTTPPort (the real port lives in the nested
   `addresses`). The diff accessor already drops a zero addresses port, but the
   legacy fallback in diff_platform_{p2p,http}_port read the raw legacy field — so
   an edge diff (addresses unresolvable + legacy 0) would set a validator's
   platform port to 0, the exact failure #808 fixed. The fallback now drops 0.

2. Remove cached validators when platform ports disappear. The widened refresh
   guard reaches update_masternode_in_validator_sets for any addresses delta, but
   the helper only writes ports when they resolve — so a Core 23 diff clearing
   `addresses` (Some(None)) or zeroing the ports left the cached ValidatorV0 with
   its stale ports, and Tenderdash kept getting a dead endpoint. After apply_diff
   we now check the updated state via resolves_platform_validator_ports() (both
   ports mandatory, matching new_validator_if_masternode_in_state) and drop the
   validator from the sets when it no longer resolves them.

Tests: zeroed-legacy-dropped; resolves-for-core23-addresses / for-legacy;
does-not-resolve-when-ports-disappear (cleared + http-only). 10 tests green,
clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shumkov added a commit that referenced this pull request Jun 19, 2026
…ulti-reviewer)

Self-review pass (3 reviewers) over the #808 Core-23 handling. All findings are
P2P-connectivity, not consensus (validator_sets live in the non-hashed `aux` CF and
Tenderdash's committed ValidatorSet hash excludes node_address/ports/membership), but
each leaves a validator advertising a wrong/stale/dead platform endpoint:

F1 — Persisted round-trip masked an `addresses` clear after restart. The reverse
  `From<MasternodeStateV0> for DMNState` stuffed the resolved port into `legacy_*`
  with `addresses: None`; after restart an `addresses: Some(None)` clear left the
  stale legacy port, the full-state accessor fell back to it, and the de-platformed
  validator was wrongly retained. Now reconstructs the Core-23 `addresses` shape
  (host = service IP), `legacy_*: None`, so a later clear is honored.

F2 — Two sources of truth. Validity was judged on the post-apply full state but the
  validator was patched from the raw diff; since `apply_diff` wholesale-replaces
  `addresses`, a partial Core-23 diff could clobber the unchanged axis. Replaced
  `resolves_platform_validator_ports` + diff-patching `update_masternode_in_validator_sets`
  with a single `validator_refresh_from_state` (Some → `apply_validator_refresh`,
  None → remove), deriving every field once from the post-apply full state.

F3 — `validator_refresh_from_state` now requires `platform_node_id` (matching
  `new_validator_if_masternode_in_state`); an HPMN that lost it is no longer valid.

F4 — Validator `node_ip` now uses the accessor's platform p2p host (= service IP for
  a legacy node, the Core-23 platform host otherwise) instead of always `service.ip()`.

F5 — Port resolution uses `u16::try_from` (drop out-of-range) instead of `as u16`
  truncation, in both the diff resolvers and the full-state derivation — an
  out-of-range legacy port can no longer truncate to 0 (the #808 shape).

Tests (red→green where applicable): reverse-From reconstructs addresses + a clear now
drops the endpoint (RED on old legacy-shaped round-trip); refresh resolves Core-23
with the platform host / legacy with service IP; refresh None on ports-disappear,
missing node-id; diff resolver drops zero + out-of-range legacy ports. 180
masternode/validator lib tests green, clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shumkov added a commit that referenced this pull request Jun 19, 2026
…ork() removal

Updates all 8 rust-dashcore workspace deps 981e97f1 -> ceee4a9b40 (dev HEAD), which
picks up #813 (DashPay account-index derivation path) and #814 (revert of the temporary
#808 Core 23 nested-masternode-address SML changes), so platform keeps the existing
flat-field masternode shape and no consensus change is needed.

The bump also crosses #802 (removed Address::network(), replaced Network with AddressPrefix
because an address's prefix is ambiguous across testnet/devnet and legacy-regtest). Migrate
the four call sites:
- wasm-sdk validate_address: addr.is_valid_for_network(net) — a bool, exactly what it
  computed and now correct for the shared testnet/devnet prefix.
- platform-wallet derivation_path_for_derived_address: the path only distinguishes mainnet
  (coin 5') from everything else (1'), so probe is_valid_for_network(Mainnet).
- platform-wallet-ffi address rendering (2 sites): an address_display_network helper probes
  mainnet/testnet/regtest, decisive for the bech32m platform-payment addresses rendered here
  (mainnet ds / testnet+devnet tb / regtest dsrt).

Migration tracked in #3939. Full workspace --all-targets compiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants