Skip to content

chore: initial statistics subsystem#5

Open
EclesioMeloJunior wants to merge 195 commits intomasterfrom
statistics-collector
Open

chore: initial statistics subsystem#5
EclesioMeloJunior wants to merge 195 commits intomasterfrom
statistics-collector

Conversation

@EclesioMeloJunior
Copy link
Member

Description

  • Creates Statistics Collector subsytem
  • Defines the subsystem messages
/// Messages sent to the Statistics Collector subsystem.
#[derive(Debug)]
pub enum StatisticsCollectorMessage {
	// Approval vote received
	ApprovalVoting(Hash, CandidateHash, (ValidatorIndex, DelayTranche)),

	// Candidate received enough approval and now is approved
	CandidateApproved(CandidateHash, Hash),

	// Set of candidates that has not shared votes in time
	ObservedNoShows(SessionIndex, Vec<ValidatorIndex>),

	// All relay block's candidates are approved, therefore relay block is approved
	RelayBlockApproved(Hash)
}
  • Updated approval-voting to send data to the statistics collector subsytem

Next Steps

  • Collect approval distribution metrics (upload & downloads)
    • Define subsystem messages
    • Update approval distribution to send messages
  • Publish prometheus metrics
  • Calculate approvals tallies

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ EclesioMeloJunior
❌ EgorPopelyaev
You have signed the CLA already but the status is still pending? Let us recheck it.

- Inject Authority Discovery to Availability Distribution
- When responding to a chunk request get the peer id and retrive its authority ids
- In the Collector store the session info which enable to get the validator index from authority ids
EclesioMeloJunior and others added 30 commits January 27, 2026 08:08
…aritytech#10920)

fixes paritytech/contract-issues#213 where
storage deposit refunds failed in nested/reentrant calls.

Problem
Storage refunds were calculated incorrectly when a contract allocated
storage, then performed a nested call that cleared it. Pending storage
changes lived only in the parent FrameMeter, so child frames could not
see them and refunds were skipped.

Solution
Apply pending storage deposit changes to a cloned ContractInfo before
creating nested frames. This makes the parent’s storage state visible to
child frames during refund calculation.

Implementation
- Added apply_pending_changes_to_contract() to apply pending diffs to
ContractInfo
- Added apply_pending_storage_changes() wrapper on FrameMeter
- Applied pending storage changes before nested frame creation in
exec.rs (3 locations)

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: pgherveou <pgherveou@gmail.com>
…ck (paritytech#11031)

After `AuraDigestProvider` was introduced, emulated integration tests
for parachains with `slot_duration != relay_slot_duration` (e.g. 12s
Polkadot/Kusama chains) panic because `FixedVelocityConsensusHook`
derives a parachain slot that doesn't match `CurrentSlot`.
Fix by advancing the relay block number by `slot_duration /
RELAY_CHAIN_SLOT_DURATION_MILLIS` per parachain block (instead of always
+1), and computing the aura digest slot inline using both durations.
This removes the `DigestProvider` associated type from the `Parachain`
trait and the `AuraDigestProvider` struct — the emulator now handles the
digest automatically.
Downstream users must remove `DigestProvider: AuraDigestProvider,` from
their `decl_test_parachains!` invocations.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Description

Add `DecodeWithMemTracking` derive to `CompactProof` in
`substrate/primitives/trie/src/storage_proof.rs`.

`StorageProof` already derived `DecodeWithMemTracking` but
`CompactProof` in the same file was missed.

## Integration

No integration changes required for downstream projects. `CompactProof`
now implements `DecodeWithMemTracking`, which is a strictly additive
trait implementation. Existing code using `CompactProof` will continue
to work as before.

## Review Notes

Single-line change adding `DecodeWithMemTracking` to the derive macro
list on `CompactProof`:

```diff
-#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
+#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, DecodeWithMemTracking, TypeInfo)]
 pub struct CompactProof {
     pub encoded_nodes: Vec<Vec<u8>>,
 }
```

`CompactProof` only contains `Vec<Vec<u8>>`, which already implements
`DecodeWithMemTracking`, so the derive works without any manual
implementation.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Lets give the link-checker job some new life.

Sadly our blog posts are not available anymore (or at least I could not
find them), so I removed all references to them. Was thinking about
linking web archive, but its silly to first remove our blog and then
link to an archive.
### Context

When verifying Ethereum-to-Polkadot transfer messages, the key field in
receipt_proof is not used. Remove it as a cleanup and update the tests
accordingly.

---------

Co-authored-by: Branislav Kontur <bkontur@gmail.com>
…10794)

Changes:
- Ensure all benchmarks run for at least 10 seconds. Configurable with
`--min-duration <s>`
- Turn off runtime logging in bench bot to reduce spam log output
- Reduce DB repetition to 1 since PoV metering must be deterministic

Example of the System benchmark with the `set_heap_pages` benchmark that
took less than 10 ms before:
```pre
2026-01-13T21:36:10.687286Z [ 22 % ] Starting benchmark: frame_system::set_heap_pages    
2026-01-13T21:36:10.688437Z [ 33 % ] Starting benchmark: frame_system::set_code    
```

Now takes 10 seconds:
```pre
2026-01-13T21:37:31.392981Z [ 22 % ] Starting benchmark: frame_system::set_heap_pages    
2026-01-13T21:37:32.271275Z [ 22 % ] Running  benchmark: frame_system::set_heap_pages (overtime)    
2026-01-13T21:37:37.272099Z [ 22 % ] Running  benchmark: frame_system::set_heap_pages (overtime)    
2026-01-13T21:37:41.393107Z [ 33 % ] Starting benchmark: frame_system::set_code    
```

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Follow up of paritytech#11038

Even though the job passed in my last PR, I missed this broken link. So
here we go again.
…aritytech#11053)

Latest version of tracing-subscriber right now doesn't support ASNI
colour codes correctly: tokio-rs/tracing#3378

So, the workaround right now is to pin it to `0.3.19`.


Closes: paritytech#11030

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ttHub fails on relay chain (paritytech#11055)

Emit SessionKeysUpdateFailed with the operation type and dispatch error
for observability so set_keys/purge_kets failures from AssetHub are
observable on-chain.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.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.

10 participants