TimeBounds Ledger Number & Semantic Ledger Time Sorting.

Open
#290 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
blockchain

Research direction

Start by reading the four proposed amendments in this issue and the related Semantic Ledger Time Sorting issue #291. Compare the implications of the proposed transaction formats and TimeBounds reinterpretation; the work is done only after the protocol design is decided and its required changes are specified.

Written by the indexing model from the issue text.

Description

needs draft

Currently, the TimePoint data structure used for transaction minTime and maxTime refers to unix time stamps rather than ledger heights. Referring to ledger numbers instead of wall clock times is better for smart contracting applications where the goal is to ensure a number of ledgers (e.g., 1 ledger) between two actions to ensure that they are not ordered incorrectly (assuming they use different source account sequence numbers).

To fix this, I have four proposed amendments:

  1. Use the new Transaction formats to permit transactions with ledger number based timeouts instead of wall clock time
  2. Use the new Transaction formats to permit transactions with ledger number based timeouts as well as wall clock time
  3. Reinterpret TimeBounds to a LedgerNumberBounds if maxTime < minTime, making old transaction format capable of expressing ledger number bounds but also making previously statically provably invalid transactions valid
  4. Semantic Ledger Time Sorting (see #291, separate issue as it was sufficiently complicated to merit separate discourse).

Overall, my favor goes to solution 2, then 1, then 3 but I understand there may be alternative preferences based on complexity of implementation. 4 should be considered separately, as it would be in parallel to one of these three.

Dominant language
RPC
Stars
632
Forks
399
Avg merge
1d 23h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

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 stellar/stellar-protocol

All issues in stellar/stellar-protocol

Similar issues

More Blockchain issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.