neume-network / strategies

Indexing strategies for the neume network.
GNU General Public License v3.0
11 stars 7 forks source link

EPIC: Integrate the new sound protocol contracts #294

Closed TimDaub closed 1 year ago

TimDaub commented 1 year ago
TimDaub commented 1 year ago

An overview of the sound-protocol's new components:

Description:

Screenshot 2022-09-29 at 15 47 55
TimDaub commented 1 year ago

Re-assigned this to me as it's an EPIC and not a directly actionable issue. Here are the TODOs:

il3ven commented 1 year ago

@TimDaub, @Kunkka0822 wanted to work more on this epic and has asked me to open new issues. What do you think about the following approach?

TimDaub commented 1 year ago
  • Create a strategy to track Transfer events on all the sound edition contracts we found in #295. Instead of simply tracking Transfer event we should track Transfer events where tokenId is 1. Since all the other tokenIds will be editions.

In a Telegram channel and by reading @gigamesh, I've heard that a SoundEditionV1 contract can indeed have two or more different songs and so it may not be sufficient to just track tokenId=1.

Anyways, with the rest of the proposed tasks, I agree.

gigamesh commented 1 year ago

Hello! Cool to see yall building on our contracts. :D

To clarify, each instance of SoundEditionV1 only corresponds to a single edition (in most cases, a song).

We haven't announced our docs yet, but we have lots of info here: https://docs.sound.xyz/

TimDaub commented 1 year ago

To clarify, each instance of SoundEditionV1 only corresponds to a single edition (in most cases, a song).

@gigamesh: So say we do as @il3ven suggested and just call the first tokenId of each SoundEditionV1, will we eventually get the metadata of all songs published on the sound-protocol? Because e.g. in the "Editions Working Group Telegram Channel" @musnit pointed out that a SoundEditionV1 can have the metadata of more than one song.

gigamesh commented 1 year ago

Oh I see, I misunderstood the earlier discussion.

Normally you could just get it from the first token, but for Reo Cragun's Frameworks album we deployed it as an edition with all the songs represented via the metadata folder.

The easiest way to get the data would be our API, but if you don't want that dependency and make it future-proof, you'd need to scrape all the tokenIds. It's not likely we're going to do more releases like Reo's but its def not a guarantee.

Reo examples: https://7gznwfqpv3obvwsj53uehxiinvw7vu3qxnkcjjclqlujt4kr4voq.arweave.net/-bLbFg-u3BraSe7oQ90IbW3603C7VCSkS4LomfFR5V0/1 https://7gznwfqpv3obvwsj53uehxiinvw7vu3qxnkcjjclqlujt4kr4voq.arweave.net/-bLbFg-u3BraSe7oQ90IbW3603C7VCSkS4LomfFR5V0/333

TimDaub commented 1 year ago

OK, thanks for the prompt response.

There are now two possibilities with varying degrees of complexity:

(1) Ignore Reo release and just crawl all SoundEditionV1s with the first tokenId (2) Crawl all tokenURIs and then try to determine which editions equate to a new song

For (2), I'm still in the dark about how that'd work consistently. Is there any smart contract function @gigamesh that helps us understand if two editions are for a different song?

gigamesh commented 1 year ago

Good points! Unfortunately there is no function that publishes that info, but its definitely something we could consider adding for future editions. Let me talk to the rest of the team and circle back.

TimDaub commented 1 year ago

What if for each token's metadata we compared the losslessaudio file? Would that allow us to determine the number of unique songs?

vigneshka commented 1 year ago

@TimDaub , +1 on using onchain source of truth.

I would recommend option 2: Crawl all tokenURIs.

The metadata for each song has a unique title and track number within the contract. This is consistent across editions that are a single song and the album case.

e.g. for Reo Craguns's Frameworks project (album case): https://etherscan.io/token/0xf0701a661363f463c8de5bd6b009c0e9ceaba51a#readContract

https://7gznwfqpv3obvwsj53uehxiinvw7vu3qxnkcjjclqlujt4kr4voq.arweave.net/-bLbFg-u3BraSe7oQ90IbW3603C7VCSkS4LomfFR5V0/1

https://7gznwfqpv3obvwsj53uehxiinvw7vu3qxnkcjjclqlujt4kr4voq.arweave.net/-bLbFg-u3BraSe7oQ90IbW3603C7VCSkS4LomfFR5V0/2

TimDaub commented 1 year ago

Hey @vigneshka, thanks, that's helpful. So just to make sure I understood you correctly, this means that for an artist that uses 1 SoundEditionV1 contract for 1 song, for all tokenURIs e.g. ar://zUTuV0VL7w1z5cuGkBs2b-O3DRY2O2qA_ifSQqjLnzA/[1-N], we'd always find trackNumber===1, right?

And the only exception would for now be Reo where the trackNumber increases, but that allows us to understand unique songs contained in the SoundEditionv1. If so, I think that's a nice structure that we can implement, please let me know!

vigneshka commented 1 year ago

Yup, exactly!

TimDaub commented 1 year ago

@gigamesh and @vigneshka heads up this entire epic is now available as an outcome of the crawl strategy of neume, in this data set and soon probably also in music-os https://github.com/neume-network/data/blob/main/results/music-os-accumulator-extraction