Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Historical preimage lookup uses AND instead of OR for three-timestamp histories

Open Beginner friendly
#399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
blockchain

Research direction

Open Blockchain/Sources/Blockchain/State/State.swift at State.historicalLookup around line 417 and compare the three-timestamp condition with Graypaper v0.7.2 and v0.8.0 §9.2.1, equation 9.7. Done means three-timestamp histories use the two availability periods defined by the specification rather than requiring both periods simultaneously.

Written by the indexing model from the issue text.

Description

State.historicalLookup in Blockchain/Sources/Blockchain/State/State.swift:417 checks a three-timestamp history [x, y, z] using:

x <= timeslot && timeslot < y && z <= timeslot

Both Graypaper v0.7.2 and v0.8.0, §9.2.1 (“Invariants”), equation 9.7, define availability for [x, y, z] as:

(x ≤ timeslot < y) OR (z ≤ timeslot)

The implementation should use OR between the two availability periods.

Dominant language
Swift
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-web3-stack/boka

All issues in open-web3-stack/boka

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.