• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vocdoni / vocdoni-node / 6470775618 / 1
63%
main: 63%

Build:
DEFAULT BRANCH: main
Ran 10 Oct 2023 02:39PM UTC
Files 88
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Oct 2023 02:29PM UTC coverage: 39.984% (-0.08%) from 40.059%
6470775618.1

push

github

web-flow
vochain: order transactions when creating new blocks (#1121)

refactor Vocdoni's Interaction with CometBFT

1. Implement transaction ordering during block creation.
2. Ensure blocks do not store invalid transactions.
3. Introduce mempool TTL mechanism and max attempts protection.
4. Implement Optimistic Execution for validators.
5. Resolve an app hash bug during block construction.

**Transaction Ordering**
  - Transactions are sorted by nonce for the same sender during the "Prepare proposal" phase of CometBFT callbacks.
  
**Block Transaction Validation**
  - A temporary state is constructed to execute proposal transactions, leading to hard-checks against this state. This eliminates the need for the previous soft-check approach.
  - `ProcessProposal` will return REJECT if any transaction in the block proposal is invalid.

**Mempool Enhancements**
  - Transactions will be removed from the mempool after a set duration (TTL).
  - After three unsuccessful attempts to include a transaction in a block, it will be removed from the mempool.

**Optimistic Execution**
  - If a block is executed during `ProcessProposal` by a validator and is accepted, its state is retained and not rolled back.
  - During `FinalizeBlock`, the system checks if the block was previously executed. If it was, there's no need for re-execution, potentially speeding up block production.

**Block Construction Bug**
  - An issue was identified where the app hash reported by `FinalizeBlock` was incorrectly computed.
  - Due to the new CometBFT callback structure, block execution and hash return are separated from saving to persistent storage.
  - The previous `State.Save()` was incompatible with this two-step process. It has been modified to now include `PrepareCommit()` and `Commit()` functions.

---

Signed-off-by: p4u <pau@dabax.net>

5391 of 13483 relevant lines covered (39.98%)

20284.2 hits per line

Source Files on job unit - 6470775618.1
  • Tree
  • List 0
  • Changed 21
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6470775618
  • 19c6d685 on github
  • Prev Job for on main (#6465900935.1)
  • Next Job for on main (#6470977793.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc