suave-geth icon indicating copy to clipboard operation
suave-geth copied to clipboard

Add offchain package

Open lthibault opened this issue 2 years ago β€’ 3 comments

πŸ“ Summary

Begins formal separation of infrastructure and application logic.
Introduces offchain package that defines a top-level Env struct. This struct contains various APIs to off-chain services. Currently this includes only Datastore. Uses IPFS sidecar as test implementation.

Follow-up work:

  1. Define precompiles to interact with Datastore from Solidity (in progress)
  2. Migrate cstore.Engine to Env

πŸ“š References

https://docs.ipfs.tech/concepts/content-addressing https://github.com/multiformats/cid


  • [x] I have seen and agree to CONTRIBUTING.md

lthibault avatar Jan 10 '24 06:01 lthibault

Noticed that the tests fail: https://github.com/flashbots/suave-geth/actions/runs/7471328612/job/20331422338?pr=154#step:9:2848

metachris avatar Jan 10 '24 10:01 metachris

I wanted to add some additional context on the IPFS sidecar, as I don't think I've done a very good job of explaining myself so far (cc @Ruteri) πŸ™‚

My reasons for proposing this change boil down to the following:

  1. Running an IPFS sidecar is very helpful for me to prototype fast.
  2. I am adding a feature flag to enable this, so it won’t interfere with any dev or prod setups.
  3. We don’t have to keep IPFS. We can discuss when the time comes to enable the feature in prod.

If the above sounds reasonable to you guys (cc @ferranbt ), here is the course I have plotted for myself:

  • [x] Fix the panic in the unit tests. (WIP)
  • [x] Await one final review from you guys (possibly including a quick sync-up call?)
  • [x] Proceed with follow-up PRs

Please LMK if there's any part of this that seems reckless or ill-advised. I am eager to ship, but I don't want to be the proverbial bull in the china shop! πŸ˜…

lthibault avatar Jan 10 '24 20:01 lthibault

Okay, I think this is ready to go, pending approval.

I'm proceeding with the next PR: implementing precompiles to interact with the datastore.

lthibault avatar Jan 10 '24 23:01 lthibault