fix(ci): fix release workflow syntax error#808
Merged
Conversation
QuantumExplorer
approved these changes
Feb 24, 2023
5 tasks
3 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 workflowbutton in the actions for this workflow)Breaking Changes
Checklist:
For repository code-owners and collaborators only