Skip to content

Commit 985a842

Browse files
authored
support sending long notes (offchain, proxy-re-encrypted via IPFS) (#1726)
* cli: support send-note * add new TOPs for relayed notes * add explicit rpc call size limit before a TOP enters the pool * generalize ParentchainCall to TrustedCallSideEffect and introduce Ipfs option without implementing it * connect Ipfs OcallApi * refactor Ipfs support and plaintext relay notes to ipfs if requested * cli cleanup * add cli args for ipfs endpoint for worker * proxy-encrypt the message payload and decrypt in cli when fetching notes * cleanup & fmt * clippy * fix tests * fix evm build * fix retreival > retrieval * move IPFS encryption logic into its own helper fn * refactor ocal ipfs client handling * add simple integration test with ipfs relayed note * fmt * fix CI * fix CI * fix CI * CI try different * fall back to file dump if ipfs add fails for any reason to enable recovery * CI fix port clash * clippy&fmt * CI do not map ports to host * CI fix internal port * doc fixes * use stack instead of heap for ocall return value * log filepath for local file fallback when writing to IPFS * fixes * fmt&clippy * add ipfs fallback unit test * fmt * probe content size for OCALL * better test logs * disable cid return value to debug enclave crash * add unit test for IpfsCid::default * try to allow more threads * revert more ocall stuff to be closer to master * disable tokio_main entirely in ocall * disable test verification logic * disable entire ipfs test. see if integration test will fail too * further strip down ipfs ocall * ocall: add dump to file * ocall: add synchronous use of ipfs api * just bypass the block_on * try * no call to IpfsClient at all * one step forward * always return Ok * restore functionality * clippy&fmt * use tstd for file io in test * avoid tests running in parallel * debug logs * more verbose debug logs * disable fallback testing * get rid of read_ipfs ocall and unused return value * fmt * verbose logs in docker demo * back to unit testing of ocall * isolate ipfs test * refactor ocall slice arg into vec * bypass from_content_bytes with dummy value * re-implement IpfsCid for single chunk raw * debug logging * fake cid again but derive multihash * fake cid again * reprodice sha2 256 * simple remove sha2_256 call * derive sha256 with sgx primitive * add missing toml * wrap cid manually * refactor into fully functional itp-ipfs-cid * swap all usages of IpfsCid for new crate * clean up test logging * revert enclave test isolation * clippy * cleanup deps * save our tomorrow * fmt * taplo * ocall ipfs add raw leaves * fix and test decode for OpaqueCall * review comments * fixes * add e2e test for 80kB payload * fmt * log cosmetics * allow client-provided encryption key for relaying messages
1 parent 7588cfd commit 985a842

70 files changed

Lines changed: 1983 additions & 979 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_and_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ jobs:
271271
demo_name: demo-direct-call
272272
host: test-runner-sgx
273273
sgx_mode: HW
274+
- test: relayed-notes
275+
flavor_id: sidechain
276+
demo_name: demo-send-relayed-note
277+
host: test-runner-sgx
278+
sgx_mode: HW
274279
- test: Sidechain
275280
flavor_id: sidechain
276281
demo_name: demo-sidechain

0 commit comments

Comments
 (0)