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

vocdoni / vocdoni-node / 6470775618
63%

Build:
DEFAULT BRANCH: main
Ran 10 Oct 2023 02:39PM UTC
Jobs 2
Files 164
Run time 5s
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: 57.862% (+0.3%) from 57.607%
6470775618

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>

451 of 621 new or added lines in 18 files covered. (72.62%)

33 existing lines in 11 files now uncovered.

12880 of 22260 relevant lines covered (57.86%)

12286.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit - 6470775618.1 10 Oct 2023 02:39PM UTC 0
39.98
GitHub Action Run
2 integration - 6470775618.2 10 Oct 2023 02:39PM UTC 0
51.83
GitHub Action Run
Source Files on build 6470775618
Detailed source file information is not available for this build.
  • Back to Repo
  • 19c6d685 on github
  • Prev Build on main (#6465900935)
  • Next Build on main (#6470977793)
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