integritee-network / integritee-node

Integritee node with TEE registry validating remote attestation
Apache License 2.0
45 stars 12 forks source link

Can meilisearch or server be installed on integritee sidechain #195

Open amiyatulu opened 11 months ago

amiyatulu commented 11 months ago

Can long running process or server like meilisearch be installed on integritee? Meilisearch is an actix server.

brenzi commented 11 months ago

I think that may be feasible. You may need to patch these libs to make them build in no_std environments though

Sounds more like a use case for a trusted offchain worker than a sidechain. What would you like to build?

amiyatulu commented 11 months ago

Why no_std environments is required for offchain computing? Aren't offchain computing non-determinsitic. Yes, I am also looking at how to do with offchain worker, substrate-ipfs is a good example, which I will go through. There are many use cases, like indexing the feeds for search, using a ipfs storage with a database for sql queries, machine learning etc. One won't need an additional centralized server for it.

Offchain workers don't work with std it seems.

brenzi commented 11 months ago

with offchain worker I didn't mean substrate ones. I meant ours: https://docs.integritee.network/4-development/4.4-sdk/4.4.2-trusted-off-chain-worker

no_std not strictly necessary. You could use gramine together with out attesteer if you just want a verifiable search service.

However, if you need interaction with L1 blockchains, we recommend using our SDK and use no_std dependencies for it. This has nothing to do with determinism. It's just about the lack of a std environment in SGX enclaves as we build them

amiyatulu commented 10 months ago

If we install meilisearch on integritee sidechain or offchain worker, wouldn't computation be redundant, that is every node will be running meilisearch? Wouldn't it be inefficient in terms of energy consumption, as we only need 2-5 meilisearch nodes depending on bandwidth of the node and amount of queries. Though meilisearch requires very less memory for running, wouldn't it do the big computation only when api of integritee node is called?

brenzi commented 10 months ago

The level of redundancy is for you to steer by either running exactly the number of workers yourself or incentivizing others to reach that number

brenzi commented 10 months ago

It may be easier to have a call and discuss your use case and how our tech can be applied best

amiyatulu commented 10 months ago

The level of redundancy is for you to steer by either running exactly the number of workers yourself or incentivizing others to reach that number

Running a node by myself requires a lot of lifelong maintenance, so it's better to incentivize others and have it run by the community. There are multiple use cases, such as converting PubActivity social media (Mastodon, PeerTube) to blockchain, where nodes are incentivized to run by the community, and they don't have to rely on altruistic donations to scale the system.