Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions 2026/Qizhe.Jiang/Code/cacp-costly-escalation/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Vac

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
75 changes: 75 additions & 0 deletions 2026/Qizhe.Jiang/Code/cacp-costly-escalation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# CACP / Costly Escalation source archive

This is one integrated codebase within the Logos Execution Zone monorepo.
`source/` preserves all 18 changed files from
[PR #704](https://github.com/logos-blockchain/logos-execution-zone/pull/704),
including the built bond-program artifact, manifests, lockfile, entry point,
and test-fixture integration. Every file is exported directly from commit
`b7154ba2bf1d456d544da74b61b9b2149298403e`.

The complete change set comprises eight commits. Their hashes and subjects,
source blob IDs, file sizes and SHA-256 checksums are in [provenance.json](provenance.json).

## Implementation map

| Files in `source/` | Role |
| --- | --- |
| `lez/cross_zone/src/cacp.rs` | CACP state machine, exact funded-transaction and proof checks, fallback and reference tests. |
| `lez/cross_zone/src/costly_abort.rs` | Costly Escalation reference adapter and tests; historical filename retained. |
| `lez/programs/cacp_bond/core/` | Agreement schema and IDs, account derivation, state/settlement helpers and core tests. |
| `lez/programs/cacp_bond/src/main.rs` | Executable neutral-zone bond program, authorization, escrow validation, disclosure and settlement. |
| `tools/cacp_demo/` | Live local network harness, scenario assertions and demo instructions. |
| `artifacts/lez/programs/cacp_bond.bin` | Committed RISC Zero guest executable used by the source revision. |
| Cargo manifests, `Cargo.lock`, `Justfile`, program exports and initial-state integration | Connect the new components to the surrounding LEZ workspace. |

## Obtain the full runnable workspace

```sh
git clone https://github.com/Warrenhimself/logos-execution-zone.git lez-cacp
cd lez-cacp
git checkout --detach b7154ba2bf1d456d544da74b61b9b2149298403e
```

Follow that checkout's root README and toolchain/dependency setup. This archive
does not vendor all upstream source, external Cargo dependencies or native
circuit libraries. Build from the full checkout, not directly from `source/`.

## Reconstruct the changes from the base

The [complete patch](patches/cacp-pr-704.patch) includes binary data and all
integration edits. To apply it, first obtain the full repository above and check
out the exact base:

```sh
git checkout --detach 03f46bf191232b43509abb2a03ed7fcc6890dcbc
git apply --check /path/to/Internships/2026/Qizhe.Jiang/Code/cacp-costly-escalation/patches/cacp-pr-704.patch
git apply --index /path/to/Internships/2026/Qizhe.Jiang/Code/cacp-costly-escalation/patches/cacp-pr-704.patch
git write-tree
git rev-parse b7154ba2bf1d456d544da74b61b9b2149298403e^{tree}
```

The last two commands must print the same tree ID. Apply this patch only to
that base; do not apply it again on top of the final source commit.

## Build and verification

From the pinned full checkout:

```sh
cargo test --locked -p cacp_bond_core --lib
cargo test --locked -p cross_zone --lib
cargo check --locked -p cacp_bond_program -p cacp_demo
just demo-cacp
```

The demo requires Docker and the upstream native/circuit dependencies. It uses
local deterministic development funds and development-mode proofs. Its success
marker is `ALL 5 LIVE CACP SCENARIOS PASSED`; this is an expected marker, not
evidence that a fresh live run was performed while creating this archive.
See [Results](../../Results/README.md) for checks actually performed.

## License and provenance

The included source and compiled artifact retain the upstream MIT license.
See the accompanying license file. The original commit is the authority for
the source snapshot; the archive does not rewrite source comments or history.
Loading