NeoRust v2.1.0
NeoRust 2.1.0 makes production failures explicit and recoverable while keeping
the existing 2.x entry points available. Provider errors now retain useful
retry metadata, malformed numeric data is rejected instead of silently wrapped,
and release automation fails closed before publishing incomplete releases.
Added
- Checked amount construction:
DecimalAmount::try_from_rawvalidates raw
base-unit values from RPC responses, caches, configuration, and user input.
Deserialization now uses the same validation path, preventing malformed
amounts from entering application state. - Provider-aware unified errors:
NeoError::providerpreserves rate-limit,
retry, validation, wallet, configuration, and network classifications.
CodecErroralso converts directly into the unified SDK boundary. - Structured retry classification: JSON-RPC and provider errors expose
retryability, rate limits, server backoff hints, unknown transactions,
already-known transactions, and deterministic transaction rejection helpers. - Full-width Neo X transactions: callers can build and submit Alloy
TransactionRequestvalues without the legacy transaction wrapper'su64
value limit. ExistingNeoXTransactionserialization and send methods remain
available.
Changed
- Retries follow provider intent: deterministic failures return immediately;
transient failures use capped exponential backoff, honor bounded
Retry-Afterguidance from JSON-RPC error envelopes, and release queue
capacity correctly after completion or cancellation. Plain HTTP 429 responses
retain rate-limit classification and use configured backoff for 2.x error
compatibility. - Transaction rebroadcasts are outcome-aware: an already-known transaction
is treated as accepted, deterministic node rejections become transaction
errors with the transaction hash, and only transient provider failures are
retried. - HTTP failures retain protocol context: non-success HTTP statuses and
JSON-RPC error envelopes keep safe request IDs and retry metadata instead of
collapsing into generic transport strings. - Neo X remains source-compatible: the Alloy-backed provider, wallet,
bridge, and transaction paths preserve legacy accessors while adding checked
conversions and full-width request APIs. - Release publication is fail-closed: tagged releases validate package and
changelog versions, require an annotated tag reachable frommaster, run
formatting, Clippy, tests, rustdoc, audit, and supply-chain policy checks,
distinguish an absent crate from registry failures, and require crates.io
credentials before creating the GitHub release.
Fixed
- Contract, policy, bridge, transaction, and string conversions now reject
negative or oversized values instead of wrapping through unchecked integer
casts. Iterator batch sizes are validated before RPC calls. - High-level balance and CLI rendering paths reject malformed decimal counts
and amounts, while token filters continue to ignore unrelated malformed
entries. - Confirmation polling stops on deterministic provider errors rather than
converting every failure into a timeout. - Name service, notary, token, and smart-contract helpers now propagate
provider and script-building failures through their declared error types. - Retry classification no longer lowercases and duplicates complete
provider-controlled error messages.
Security
- Provider URLs redact usernames, passwords, query strings, and fragments from
DisplayandDebug; JSON-RPC error data and HTTP response bodies are not
exposed through general-purpose formatting. - Dependency policy rejects yanked packages and narrows advisory exceptions.
RUSTSEC-2023-0071remains explicitly documented becausejsonwebtoken
enables RSA transitively while NeoRust's JWT API exposes HS256 only. - The lockfile updates
opensslandcmovpast all currently published GitHub
security advisories, including the high-severity OpenSSL advisories reported
against 0.10.75. - The website lockfile updates
http-proxy-middlewareandjs-yamlpast their
moderate-severity advisories;npm auditreports no remaining findings. - Example and CLI manifests are explicitly non-publishable; only the
neo3
package can be released to crates.io.
Compatibility
- The minimum supported Rust version is now 1.91 (previously 1.83). This is
enforced in CI and applies to bothneo3and the bundled CLI. DecimalAmount::from_rawis deprecated in favor of the checked constructor;
its zero fallback remains for 2.x source and behavior compatibility.- Error
Display/Debugoutput intentionally omits sensitive provider data.
Applications should use structured fields and error helpers instead of
parsing formatted error strings.
Verified
- Strict all-feature and no-default-feature Clippy, the Rust 1.91 all-feature
check, the locked workspace test suite, and warnings-as-errors rustdoc pass. cargo auditandcargo denypass with the documented RSA exception and
unmaintained transitive warnings;npm auditreports zero vulnerabilities.- The production documentation site builds successfully, GitHub workflows pass
actionlint, and theneo3 2.1.0crates.io dry run verifies a 279-file
package including its declared tests and benchmarks.