Skip to content

Epicbox Cancellation Requests & Multi-Party Reflection [DO NOT MERGE] - #1429

Draft
who-biz wants to merge 19 commits into
cypherstack:stagingfrom
who-biz:epicbox-cancel-reflect
Draft

Epicbox Cancellation Requests & Multi-Party Reflection [DO NOT MERGE]#1429
who-biz wants to merge 19 commits into
cypherstack:stagingfrom
who-biz:epicbox-cancel-reflect

Conversation

@who-biz

@who-biz who-biz commented Aug 10, 2026

Copy link
Copy Markdown

Do not merge this yet (mostly here for easily referenced diff and a working build tree). Much needs changed before production (epic repo dependency updates, epicbox server upgrades by all instance admins, etc). But all is functional and working well with the prospective upgrade codebases, so far in my testing. Will cover more testing tomorrow with a clean build too. As I'm doing that, I'll write up a full-throated summary and replace this (placeholder) text.

I would also like to clean up wallet lifetime. As it stands, wallet is instantiated with

let wallet_int = Box::into_raw(Box::new(wlt)) as i64;

Then, no cleanup for the Box occurs even on delete_wallet calls. While I haven't yet tested to verify - seems like wallet lifetime remains for entirety of process execution, for every wallet scenario. To this point: I'd also like to clean up listener_cancel.

Quick references for bundled submodules, dependencies, new epicbox server code:

FFI was overhauled in these changes as well, for safer memory handling and full utilization of rust ownership for safety. Nullable pointers have been removed everywhere they could be in the FFI, and intermediate variables have been minimized as well.

Local cancellation of slates is a fallback case now, and a persistent 32 character identifier is now chosen & assigned by sender to a given epicbox-relayed slatepack. On postSlate() calls, the epicbox server persists this ID, alongside the existing epicboxmsgids (message IDs change with each step of ITX). These are structurally different, intentionally. That persistent ID becomes our cancellation mechanism for requests (signature-gated and requires proof of tx membership).

Once a cancellation is requested, the epicbox server removes the slates-in-progress from slates DB, and adds a tombstone for them in a newly added cancelledSlates DB. Receiver or sender (if disconnected) is notified upon next connection to epicbox of the cancellation. Both receiver & sender can request a cancellation, and this is reflected to the other party over epicbox protocol extensions. The protocol message is wired into a local cancellation for both parties, which is gated by the newly added epicbox_tx_id.

New methods involved for cancellation can be called from CLI as follows:

# by standard index, or slate, etc - via new epicbox flag on cancel cmd:
./epic-wallet cancel -i <tx_id> -m epicbox

# or by epicbox_tx_is
./epic-wallet cancel -e <epicbox_tx_id>

@who-biz
who-biz force-pushed the epicbox-cancel-reflect branch from 8ede0c5 to 37d8f28 Compare August 10, 2026 22:38
@julian-CStack
julian-CStack marked this pull request as draft August 11, 2026 17:46
@who-biz
who-biz force-pushed the epicbox-cancel-reflect branch 2 times, most recently from 5b2be02 to 37d8f28 Compare August 12, 2026 14:47
@who-biz
who-biz force-pushed the epicbox-cancel-reflect branch from 0b12ecf to 96b3ec3 Compare August 12, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant