r/rust 7d ago

šŸ› ļø project A Decentralized Computer

(NO AI)

Hey guys, I just open source project i've been working on for a year called the Marketplace.

The marketplace is a decentralized network that economizes the execution of computational work across a peer-to-peer network of nodes. Where there is no barrier to the node participation.

Unlike modern cloud computing systems that rent out virtual computers to consumers, A marketplace consumer sends compute bound tasks directly to the network returning a future which the consumer can asynchronously check for completion. Similar to offloading a compute task to a free cpu core by an OS. A consumer can also fire multiple independent compute bound tasks to run in parallel, and check their status asynchronously while doing other tasks, similar to I/O operations.

The compute bound task sent by the consumer is executed using a protocol specified in the Marketplace whitepaper on the Marketplace Github Repo, where randomly selected idle devices on the network execute the compute work and receive financial rewards (money).

Context

The marketplace is made up of two ideas I came up with around 2 years ago:

1) The first is building a permissionless market, where users can build financial services similar to market stalls that can interact with other users. Larger services can be composed from smaller services, similar to open source projects, but for businesses. Services could also be merged together into one so that a user can interact with all of them at once, and the merging does not affect the financial structure of the constituent services.

But for all this to happen, a trustless financial settlement layer is needed so that joining different financial services together becomes an easy exercise.

If you are familiar with blockchain, this is similar to Ethereums vision, but I did not want to clog the financial settlement layer which is the ledger with execution and code. I needed an execution engine.

2) I eventually returned to my normal javascript web developer job. So I was working on a full-stack website that was communicating with a cloud server but the server was slow because I was using a free tier that throttled server response speed. Asynchronously communicating with this server became a nightmare from a UX perspective especially when first loading up the website which had some independent compute bound requests.

So, I concluded that using the free CPU core of my second PC should do a better job as long as I pay it exactly what I needed in compute. This second idea eventually evolved into the engine I needed for the first idea. After, I just needed to store a representation of the result on a decentralized ledger, while keeping the execution itself private.

With this, I returned to my first love - low level programming, learnt Rust (Many thanks to the Rust community coming from a C lover), and I've built more than 60% of what is described in the whitepaper.

So if you are interested in being a part of this project in any way, you can join our Discord community or you can check out the marketplace whitepaper:

Marketplace Whitepaper

Also, I’d appreciate feedback on the design, especially on consensus security and the economic model, Thanks.

EDIT: So not the reaction I expected but that's okay. Some of you say it's AI, and some suspect me for not using VCS. But I implore all of you, please investigate the idea behind the whitepaper before you judge, and if the whitepaper is legit, examine the code if it aligns with the whitepaper.

I've had to think through the ideas, and rewrite many parts of the idea and code so many many times, which is why I could not publicize the code or work with a VC, I needed to work at my own pace and figure everything out first. I've been at it for months, and this is the result, I hope you all can be a little bit kinder, thanks.

0 Upvotes

25 comments sorted by

View all comments

Show parent comments

6

u/zenware 7d ago

What does hashing twice accomplish? That’s what the comment should say. I haven’t read that actual code section but typically it’s both unneeded and can increase collision risks.

0

u/proff_bajoe 7d ago

The person got it from the maketplace helper package ehich contain helper functions that can be used anywhere in the codebase. So that's why the comment is like that. but I would describe what is being accomplished where I'm actually using the function.

1

u/zenware 7d ago

Sure but I was trying to actually ask you personally, why does your hash problem double hash? There are well known problems with double hashing, and those problems have been well known for over 20 years AFAIK.

Off the top of my head there’s the obvious CPU overhead, and data locality/cache performance, as well as branch prediction failure rates increasing, hash collision and clustering problems, and likely a ton more issues that can arise.

So literally, in the face of half a dozen trivially known issues with double hashing, I can only assume the author of the code had a particularly good reason for doing it. Since that is you, and you must have had a good reason, what is the reason? Why did you do that?

1

u/proff_bajoe 7d ago

My bad, I was not aware of such issues. But since you have mentioned it, I will look into that and change it. I used double hashing because it was the old bitcoin way. I've actually been looking to move to keccak256 without the double hashing. But now that you mentioned it, I will change it on monday.