Martin Tomazic

Results 15 comments of Martin Tomazic

# Optimize Checkpoint Creation Design ## Context _Checkpoint_ is state dump at a given _height_, that facilitates [state sync](https://docs.oasis.io/node/run-your-node/advanced/sync-node-using-state-sync/). It consists of many _chunks_ to enable parallel and partial downloads...

>Add support for restoring from the new version of checkpoints. I would say restoration is already version agnostic. Furthermore with version being part of the checkpoint hash you already cannot...

For the future, if we want to optimize further, we could take some inspiration from snap sync ([repo](https://github.com/ethereum/devp2p/blob/master/caps/snap.md) and [blog post](https://blog.ethereum.org/2021/03/03/geth-v1-10-0?utm_source=chatgpt.com#snap-sync)). The idea would be: 1. Additional key value db...

So existing: https://github.com/oasisprotocol/oasis-core/blob/aeffe3bd6ce9f62ddf3487225ec58e31bd616259/go/common/node/sgx.go#L35-L36 becomes the "default policy", and we add additional `PerRolePolicy map[node.RolesMask]*quote.Policy`? > This would allow a more relaxed general policy but stricter requirements for nodes that can access...

>Currently the key manager runtime takes its own quote policy into account for all incoming EnclaveRPC connections. It should instead support using per-runtime quote policies in order to allow independent...

Do we make changelog even for such trivial PRs?

> As discussed in private, roothash.ServiceClient should probably not be responsible for reindexing, nor should roothash.BlockHistory know anything about storage, node types etc... Likely this code needs a thorough refactor....

## Proposed implementation (consensus) Keep (abusing) [ad-hoc production]( [see](https://github.com/oasisprotocol/oasis-core/blob/5c2b576da712b5d998bdf21b749423a95e8075e8/go/consensus/cometbft/full/common.go#L605)) of light blocks and only write light headers to the new light history before pruning corresponding height. Pros: * _Simpler_ as...

**Update**: I postponed this a bit due to a more important work on pruning/badger reclaiming space. Will start moving this forward in the coming days, especially the first PR that...

This task is currently on hold but for the future reference: 1. https://github.com/oasisprotocol/oasis-core/issues/6356 would probably be the most impactful. 2. If **1.** is not enough, runtime state sync should be...