Skip to content

feat: bounty #1511 RIP-305 Track C bridge API and lock ledger#734

Merged
Scottcjn merged 2 commits intoScottcjn:mainfrom
createkr:feat/issue1511-airdrop-trackc
Mar 9, 2026
Merged

feat: bounty #1511 RIP-305 Track C bridge API and lock ledger#734
Scottcjn merged 2 commits intoScottcjn:mainfrom
createkr:feat/issue1511-airdrop-trackc

Conversation

@createkr
Copy link
Copy Markdown
Contributor

@createkr createkr commented Mar 9, 2026

Implements RIP-305 Track C (bridge API + lock ledger) with strict one-bounty scope and verification coverage.\n\nPayout wallet: RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35 (split: createkr-wallet).

@createkr createkr requested a review from Scottcjn as a code owner March 9, 2026 03:11
@github-actions github-actions bot added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related tests Test suite changes size/XL PR: 500+ lines labels Mar 9, 2026
@createkr createkr force-pushed the feat/issue1511-airdrop-trackc branch from 0dfc267 to 7562dd8 Compare March 9, 2026 03:13
- Add RIP-0305 specification document for bridge API and lock ledger
- Implement bridge_api.py with REST endpoints:
  - POST /api/bridge/initiate - Create bridge transfers (deposit/withdraw)
  - GET /api/bridge/status - Query transfer status
  - GET /api/bridge/list - List transfers with filters
  - POST /api/bridge/void - Admin void operations
  - POST /api/bridge/update-external - External confirmation callbacks
- Implement lock_ledger.py for locked asset tracking:
  - Lock creation and release
  - Lock queries by miner
  - Auto-release of expired locks
  - Forfeit mechanism for penalties
- Add comprehensive test suite (27 tests) covering:
  - Bridge validation and address format checks
  - Bridge transfer creation and status queries
  - Lock ledger operations
  - Integration tests for full deposit/void flows
- Add API documentation in docs/bridge-api.md

Tests: 27 passed
No regressions in existing test suite
- Import bridge_api and lock_ledger modules in rustchain_v2_integrated_v2.2.1_rip200.py
- Register bridge and lock ledger routes at node startup
- Initialize bridge_transfers and lock_ledger database schemas
- Add init_bridge_schema function to bridge_api.py
- Update init_lock_ledger_schema to support cursor-based initialization

Track C completion: Bridge API endpoints now available at:
- POST /api/bridge/initiate
- GET /api/bridge/status/<tx_hash>
- GET /api/bridge/list
- POST /api/bridge/void
- POST /api/lock/release
- GET /api/lock/miner/<miner_id>

All 27 existing tests pass.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Repository owner deleted a comment from MontaEllis8 Mar 9, 2026
Copy link
Copy Markdown
Contributor

@MontaEllis8 MontaEllis8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good bridge API implementation. Consider adding proper error handling for cross-chain communication failures and ensuring atomicity for lock/unlock operations.

@Scottcjn Scottcjn merged commit acbcc0a into Scottcjn:main Mar 9, 2026
4 of 5 checks passed
createkr added a commit to createkr/Rustchain that referenced this pull request Mar 22, 2026
…Scottcjn#734)

* feat: implement RIP-305 Track C bridge API + lock ledger (Scottcjn#1511)

- Add RIP-0305 specification document for bridge API and lock ledger
- Implement bridge_api.py with REST endpoints:
  - POST /api/bridge/initiate - Create bridge transfers (deposit/withdraw)
  - GET /api/bridge/status - Query transfer status
  - GET /api/bridge/list - List transfers with filters
  - POST /api/bridge/void - Admin void operations
  - POST /api/bridge/update-external - External confirmation callbacks
- Implement lock_ledger.py for locked asset tracking:
  - Lock creation and release
  - Lock queries by miner
  - Auto-release of expired locks
  - Forfeit mechanism for penalties
- Add comprehensive test suite (27 tests) covering:
  - Bridge validation and address format checks
  - Bridge transfer creation and status queries
  - Lock ledger operations
  - Integration tests for full deposit/void flows
- Add API documentation in docs/bridge-api.md

Tests: 27 passed
No regressions in existing test suite

* feat: integrate RIP-0305 Track C bridge API + lock ledger into main node

- Import bridge_api and lock_ledger modules in rustchain_v2_integrated_v2.2.1_rip200.py
- Register bridge and lock ledger routes at node startup
- Initialize bridge_transfers and lock_ledger database schemas
- Add init_bridge_schema function to bridge_api.py
- Update init_lock_ledger_schema to support cursor-based initialization

Track C completion: Bridge API endpoints now available at:
- POST /api/bridge/initiate
- GET /api/bridge/status/<tx_hash>
- GET /api/bridge/list
- POST /api/bridge/void
- POST /api/lock/release
- GET /api/lock/miner/<miner_id>

All 27 existing tests pass.


---------

Co-authored-by: createkr <createkr@proton.me>
@Scottcjn
Copy link
Copy Markdown
Owner

Scottcjn commented Apr 2, 2026

Transfer confirmed — this was included in the batch settlement of 1,091 RTC to @createkr's wallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) documentation Improvements or additions to documentation node Node server related size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants