Skip to content

ledger: switch to wrpc pack/unpack from wrpc-transport - #279

Open
rvolosatovs wants to merge 1 commit into
mainfrom
roman/ledger/wrpc-pack
Open

rvolosatovs wants to merge 1 commit into
mainfrom
roman/ledger/wrpc-pack

Conversation

@rvolosatovs

@rvolosatovs rvolosatovs commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Switch the ledger from wrpc-pack to pack_ready/unpack in
wrpc-transport, pinning wrpc to main at a1ad72ea:

Nothing the ledger packs (transactions, genesis outputs, /rpc results)
contains futures or streams, so every call site uses pack_ready, and
Ledger::new stays synchronous. The wrpc-pack dependency is dropped.

wrpc-wave renames WaveEncoder to ValueEncoder, and read_value is
now generic over the value type, so the CLI asks for
wasm_wave::value::Value explicitly.

@rvolosatovs
rvolosatovs added this pull request to stack #272 October 21, 2026 16:17
Base automatically changed from roman/ledger/queries to main October 21, 2026 17:34
@rvolosatovs
rvolosatovs force-pushed the roman/ledger/wrpc-pack branch 2 times, most recently from 8ac6472 to 89c6af2 Compare October 21, 2026 17:42
@rvolosatovs
rvolosatovs marked this pull request as ready for review October 21, 2026 17:43
@rvolosatovs
rvolosatovs marked this pull request as draft October 21, 2026 17:46
Pin wrpc to main a1ad72ea, which folds `wrpc-pack` into
`wrpc-transport` (bytecodealliance/wrpc#1553) and adds `pack_ready`,
a synchronous `pack` that fails with `WouldBlock` on pending
asynchronous values.

None of the values the ledger packs contain futures or streams, so use
`pack_ready` throughout, which also keeps `Ledger::new` synchronous
without polling `pack` by hand. `wrpc-wave` renames `WaveEncoder` to
`ValueEncoder`, and `read_value` is now generic over the value type.

Assisted-by: anthropic:claude-opus-5-5
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
@rvolosatovs
rvolosatovs force-pushed the roman/ledger/wrpc-pack branch from 89c6af2 to e7ce51e Compare October 22, 2026 11:53
@rvolosatovs
rvolosatovs marked this pull request as ready for review October 22, 2026 11:54

This branch has not been deployed

No deployments
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