Skip to content

Conversation

ladamesny
Copy link
Contributor

Description

Add your description here, if it fixes a particular issue please provide a
link
to the issue.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages.
  • The size limit of 400 LOC isn't needlessly exceeded
  • The PR refers to a JIRA ticket (if one exists)
  • New tests are added if needed and existing tests are updated.
  • New code is documented and existing documentation is updated.
  • Relevant logging and metrics added
  • Any changes are noted in the changelog.md for affected crate
  • Self-reviewed the diff

chrispalaskas and others added 8 commits August 29, 2025 12:30
…docker environment

- Fix SubstrateApi WebSocket URL construction to properly convert HTTP/HTTPS to WS/WSS with /ws path
- Replace Kubernetes runners with local runners in jolteon_docker stack config to avoid k8s dependency
- Add Alice development account (//Alice) fixture for jolteon_docker environment with sufficient balance
- Create comprehensive substrate smoke tests covering block production, node info, balance queries, and transactions
- Add graceful handling of solochain template runtime validation issues in transaction tests
- Improve API resilience with mock fallbacks for missing partner chain components

Tests now successfully validate connectivity, RPC functionality, and basic operations against jolteon_docker substrate node.
Transaction validation fails due to runtime WASM issue in TaggedTransactionQueue_validate_transaction.
- Add hardcoded Polkadot SDK-compatible type registry for Jolteon runtime
- Upgrade substrate-interface to 1.7.11 and scalecodec to 1.2.11
- Remove skip-on-runtime-errors behavior from transaction test
- Resolves WASM runtime validation errors and codec decoding issues
- **Commit Latency**: 10-30 seconds (Jolteon advantage)
- **Certification Rate**: 80-95% consecutive certifications

### **Comparison to HotStuff**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need any comparison to hotstuff

- **Round Rate**: 2-5 rounds per minute (depending on configuration)
- **QC Rate**: 1-3 QCs per minute
- **Commit Latency**: 10-30 seconds (Jolteon advantage)
- **Certification Rate**: 80-95% consecutive certifications
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we get these metrics from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't know. I think from AI - I haven't reviewed this stuff yet.. Not sure if we even need this document.


### **Test Pass Rate**
- **Smoke Test**: 100% pass rate
- **RPC Tests**: 90%+ pass rate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which endpoints can fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a "success criteria" for us to "accept" the feature. maybe we don't need this. Same for performance targets below. I'll remove them for now.

4. **✅ Safety Properties**: Fork prevention and consistency
5. **✅ Liveness Properties**: Continuous progress guarantees

The testing framework is **production-ready** and will provide valuable insights into your Jolteon consensus implementation's behavior, performance, and reliability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this line? Production-ready is not well defined.

logger.info(f"Initial round state: {initial_round}")

# Wait for round progression
wait_time = 30 # Wait 30 seconds for round advancement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of 30 seconds can we find the protocol parameter and set it here? It should be called something like max round time, or round timeout.

logger.info(f"Initial QC: {initial_qc}")

# Wait for QC progression
wait_time = 45 # Wait 45 seconds for QC advancement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here. Not sure why you wait 45 seconds, you could wait round_timeout + 1 or something like that.

else:
logger.info(f"⚠️ QC round stayed the same: {initial_qc['round']}")

# Verify vote count is reasonable (should be >= 2f+1 for n=3f+1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how we verify that the votes are >=2f+1

# Monitor consensus state over time
wait_time = 60 # Monitor for 1 minute
check_interval = 15 # Check every 15 seconds
logger.info(f"Monitoring consensus state for {wait_time} seconds...")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of magic numbers please.
If we can't get exactly when the next block is incoming at least let's wait a protocol value period, such as round_timeout.

# Monitor progress over time
wait_time = 120 # Monitor for 2 minutes
check_interval = 20 # Check every 20 seconds
logger.info(f"Monitoring liveness for {wait_time} seconds...")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, wait a couple of rounds max time instead of magic numbers.


# Monitor consensus state over time to observe commit patterns
wait_time = 90 # Monitor for 1.5 minutes
check_interval = 10 # Check every 10 seconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same. I'm not sure what the getReplicaState returns. But if it has an anchor to the parent block we should utilize that.


# Monitor for QC formation and subsequent commits
wait_time = 120 # Monitor for 2 minutes
check_interval = 5 # Check every 5 seconds for higher resolution
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're looking for at least 1 state change then for sure you'll get it after a round timeout period (perhaps + a bit more time, not sure how we can quantify it though)

Replace hardcoded timeouts in Jolteon tests with block_duration-based
configurable parameters for better environment flexibility.
…nd time-based monitoring

- Refactor consensus tests from time-based waiting to efficient block-based analysis
- Add shared helper function for consensus state collection across multiple RPC endpoints
- Fix test_jolteon_advanced.py safety properties test to require minimum 3 blocks for meaningful validation
- Rewrite test_jolteon_consensus_rpc.py with proper syntax and time-based progression monitoring
- Update pytest.ini to register custom markers (jolteon, consensus, advanced)
- Improve error handling and logging for expected behaviors (duplicate block samples)
- Ensure tests properly validate consensus progression over time rather than static state
Base automatically changed from jolteon/local-env to jolteon-e2e-tests September 10, 2025 00:56
@ladamesny ladamesny self-assigned this Sep 10, 2025
@ladamesny ladamesny marked this pull request as ready for review September 10, 2025 01:07
@ladamesny ladamesny merged commit 8b265b1 into jolteon-e2e-tests Sep 10, 2025
@ladamesny ladamesny deleted the jolteon/rpc-tests branch September 10, 2025 01:07
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