litentry / tee-worker

Based on the integritee-network/worker framework
Apache License 2.0
4 stars 2 forks source link

Unimplemented `next_key()` in sgx `sp-io` #84

Closed Kailai-Wang closed 2 years ago

Kailai-Wang commented 2 years ago

Currently next_key is not implemented for sgx sp-io crate: https://github.com/litentry/tee-worker/blob/63e7518a37a23644377691b0c8d18fa8c13fb8e3/core-primitives/substrate-sgx/sp-io/src/lib.rs#L254-L257

It causes problems that we can't query storage in an iterator-based way, e.g. iter_values(), iter_prefix().

Why does it work in tests? Because the litentry/pallets is located in the project root where sp-io is not patched, otherwise it wouldn't have compiled as the sgx sp-io doesn't even have TestExternalities.

We need to: