Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Consider making offers expire

オープン
#175 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞

調査の方向性

まず CAP0-0003 と、issue で議論されている order-book の動作を読みます。提案されている purge と deterministic-expiration のアプローチを比較し、次にプロトコルに確定したセマンティクスと仕様が必要かどうかを判断します。現在、issue には実装ファイル、テスト、具体的な完了条件が記載されていません。

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
RPC
スター
632
フォーク
399
平均マージ
1日 23時間
マージ済み PR(30日)
6

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stellar/stellar-protocol のほかの issue

stellar/stellar-protocol の issue をすべて見る

似ている issue

Distributed Systems の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。