Most systems:
- update state (UPDATE)
- delete data (DELETE)
- allow human control
CP:
- does NOT update state (append-only)
- does NOT delete data
- does NOT allow human control over expiration (time-only)
This sandbox may look simple, but it is built on fundamentally different constraints.
This is not a demo.
This is for observing system behavior under these constraints.
In this system, the following behaviors actually occur:
- value is issued
- value disappears over time
- neither is decided by humans
Expiration is triggered manually for observation,
but the condition of expiration itself is determined by time, not human decision.
▶ Run this now (30 sec)
git clone https://github.com/contribution-protocol/cp-sandbox.git
cd cp-sandbox
php -S localhost:8000Open in browser:
This is a sandbox for observing the core behavior of the Contribution Protocol (CP).
This sandbox runs the minimal structure of CP: cp-minimal-structure.txt
- Not production-ready
- May contain bugs (e.g. double issuance)
- For observing minimal behavior only
- Issue a token (
mint.php) - Trigger time-based expiration (
expire.php) - Inspect append-only records (
cp.sqlite)
- Does issuance ever exceed the available reserve?
- Do unused tokens expire based on time alone?
- Are all records strictly append-only?
No database setup is required.
The database (cp.sqlite) is automatically created on first run.
php -S localhost:8000
Then open in your browser:
cp.sqlite→ SQLite database (auto-created, append-only)db.sql→ schema definitionmint.php→ token issuanceexpire.php→ expiration process
This is a minimal sandbox to observe the core behavior of CP.
Issues and PRs are welcome.
多くのシステムでは:
- 状態を更新する(UPDATE)
- データを削除する(DELETE)
- 人が制御できる
CPでは:
- 状態を更新しない(追記のみ / append-only)
- データを削除しない
- 失効は人が制御できない(時間のみで決まる)
このsandboxはシンプルに見えますが、 前提となる制約は根本的に異なります。
これはデモではありません。 これはこれらの制約のもとでのシステム挙動を観察するためのものです。
このシステムでは、次のような挙動が実際に発生します:
- 価値が発行される
- 価値が時間によって消える
- そのどちらも、人間は決めていない
※ 失効は観察のために手動で実行されますが、
失効の条件そのものは人ではなく時間によって決まります。
▶ 今すぐ実行(30秒)
git clone https://github.com/contribution-protocol/cp-sandbox.git
cd cp-sandbox
php -S localhost:8000ブラウザで開く:
これはContribution Protocol(CP)のコア挙動を観察するためのサンドボックスです。
このsandboxは、以下のCP最小構造を実行するものです: cp-minimal-structure.txt
- 本番利用は想定していません
- 二重発行などのバグが含まれる可能性があります
- 最小挙動の観察用です
- トークンを発行する(
mint.php) - 時間による失効を実行する(
expire.php) - 追記のみの記録を確認する(
cp.sqlite)
- 発行が引当残高を超えないか
- 未使用トークンが時間のみで失効するか
- 記録が完全に追記のみか
データベースの準備は不要です。
初回実行時に cp.sqlite が自動生成されます。
php -S localhost:8000
ブラウザでアクセス:
cp.sqlite→ SQLite(自動生成・追記型)db.sql→ テーブル定義mint.php→ 発行expire.php→ 失効
CPのコア挙動を観察するための最小サンドボックスです。
Issue / PR 歓迎