Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Consider making offers expire

Aperta
#175 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma

Direzione di ricerca

Inizia leggendo CAP0-0003 e la discussione dell’issue sul comportamento dell’order book. Confronta gli approcci proposti di purge e deterministic-expiration, quindi determina se il protocollo necessita di una semantica e di una specifica definite; al momento, l’issue non indica file di implementazione, test o criteri concreti di completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

CAP help wanted needs draft

One of the things we learned with the protocol 10 rollout with changes like CAP0-0003 is that it's becoming increasingly hard to not break certain client business logic that rely on undocumented (something we can improve on for sure) or undefined behavior.

One aspect in particular is on how the order book functions: while the order book can "at any time" cancel or modify outstanding order, the issue is that those events happen so rarely that people may not realize that this is the case.

A simple way to turn the "improbable" into "certainty" (therefore hardening client code), would be to simply move semantics that are closer to how other markets work: force long lasting orders to be recreated at a regular time.

A couple possible approaches to start the discussion.

The purge

There could be a recurrent "purge" of the order book that deletes X% of the orders every T ledgers (both of these would be network parameters).
This approach seems to be close to what we want: non deterministic (due to the random nature) deletion of orders, which forces clients to not rely on any particular behavior of how the order book state is managed.

By having many ledgers between purge events, the "pseudo randomness" that comes with simple things like "ledger hash" is quite strong.

Deterministic expiration

We could also add an expiration time as a network parameter, we would pick something like a week or two as a starting point and offers would just automatically get deleted when they reach their expected life time.

The issue with that approach is that it only partially solves the problem: what if we want in a future upgrade or a future version of the protocol to delete certain offers? If client code relies on certain timing, it won't work.

A nice thing about this solution is that it's basically how standard order books work (be it "good for day" or "good until cancelled" that really means 30 or 60 days for most brokerage firms).

Lingua principale
RPC
Stelle
634
Fork
399
Merge medio
23h 36m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stellar/stellar-protocol

Tutte le issue di stellar/stellar-protocol

Issue simili

Altre issue su Distributed Systems

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.