valorem-labs-inc / quay

An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.
https://alcibiades.capital/blog/announcing-quay/
MIT License
190 stars 19 forks source link

Seaport Gossip support #33

Open Evalir opened 2 years ago

Evalir commented 2 years ago

Motivation

Recently Opensea released Seaport Gossip, a P2P network for sharing Seaport orders.

I wanted to build my own rust client for it as a toy project, but saw the conversation in the Discord about rather upstreaming these changes to Quay. I'd love to help if possible, and so I'd like to know if there have been any discussions / efforts related to this, or if ti's entirely out of scope for the repo. If we wanna proceed, we could use this issue to track the changes needed.

0xAlcibiades commented 2 years ago

Let's do it. Any proposal on where to start?

0xAlcibiades commented 2 years ago

So it does seem like this makes sense, we could add a quay-gossip binary which acts as a client for the seaport gossip network.

Evalir commented 1 year ago

Alright, so after stubbing some things, here's the tasks. It's not 100% exhaustive as many of the seaport gossip functionalities in the reference implementation are still unfinished/unclear:

0xAlcibiades commented 1 year ago

@Evalir about SSZ, most types should already exist https://lighthouse-docs.sigmaprime.io/ssz/index.html

About JSON encoding, I don't know that our gossip node needs to worry about json, as we have the server to perform any database queries. Is there some other reason why it'll need to encode/decode json? Everything over the wire should be SSZ.

Evalir commented 1 year ago

Right, i meant ssz encoding/decoding for the seaport types we currently have, using ssz_derive.

For JSON encoding, i'm just still unsure if they encode the types into a different json structure—and if so then we'd need new types for that intermediate structure.

0xAlcibiades commented 1 year ago

I don't think they are using any json once it's in the network, so shouldn't be a concern.