Fixes a set of critical and high-confidence bugs#91
Open
Fingerling42 wants to merge 14 commits into
Open
Conversation
- disable socket retry around ServiceFunctions.extrinsic - raise AmbiguousExtrinsicSubmissionException on lost submit response - expose signed extrinsic hash when available - keep one-shot retry with backoff for read-only calls - convert extrinsic resubmission regression into a passing test
- switch transfer_tokens to Balances.transfer_allow_death - convert transfer call regression tests to passing guards - add read-only payment_queryInfo smoke coverage for transfer calls
- read DatalogIndex at the requested historical block - detect empty buffers with start == end - compute latest index modulo Datalog.WindowSize - add ServiceFunctions.get_constant for runtime constants - cover wrapped end=0 and historical latest lookups
- treat None as the only all-extrinsics selector - return numeric extrinsic indexes without off-by-one adjustment - reject negative, out-of-bounds, and invalid index types - add InvalidExtrinsicIndex for block lookup failures - expand ChainUtils regression coverage
- raise RPCRequestException when nonce RPC returns an error - reject malformed nonce responses without result - stop masking failed nonce reads as nonce 0 - cover successful, error, and malformed nonce responses
- query System.Events with the callback block hash - resolve block hash from header number when hash is absent - add ServiceFunctions.get_block_hash helper - cover block-bound Subscriber event reads
- normalize subscribed addresses to exact-match sets - avoid mutating event attributes during filtering - add explicit address extractors per supported event type - handle Liability NewLiability and NewReport payload shapes - pin Liability event shapes in metadata-contract tests
- replace readline slicing with newline-only rstrip - add shared stdin line reader for write commands - cover datalog and launch CLI input with newline, without newline, and empty input
- require 32-byte hex digests before CID encoding - validate CID base58 decoding, length, and sha2-256 prefix - raise clear ValueError messages for invalid IPFS inputs - cover round-trip and negative IPFS helper cases
- add generic InvalidHash base exception - keep InvalidExtrinsicHash as a compatible subclass - require 0x-prefixed 32-byte hex hashes - reject non-hex, malformed, and non-string hash values - cover valid and invalid hash validation cases
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.
What changed
Balances.transfer_allow_death, which exists in the current runtime.Datalog.get_item()latest lookup for historical reads and ring-buffer wraparound.ChainUtils.0.Subscriberread events from the exact block being processed.Tests
Adds or updates regression tests for the fixed behavior, including:
Compatibility notes
Most changes preserve the existing public API and make previously broken and error-prone cases explicit.
The main behavioral change is extrinsic retry handling: write operations are no longer automatically resubmitted after an ambiguous network failure, because the node may already have accepted the transaction.