jarry-xiao / candyland

Proof of concept program for compressing NFTs
GNU Affero General Public License v3.0
111 stars 13 forks source link

Concurrent Writes into Merkle Tree #92

Closed ngundotra closed 2 years ago

ngundotra commented 2 years ago

Bubblegum auth now controls an allow-list of accounts that can append directly into the tree. Hard-coded to 5 possible spots.

This makes it easier to make money deploying trees by renting out append allowlist spots to dapps.

However, if this feature is rebuilt by composing programs, then this may end up being a waste of on-chain bytes. Some experimentation is needed to determine usefulness.

ngundotra commented 2 years ago

Ready for review

austbot commented 2 years ago

is this pr still needed/outdated?

jarry-xiao commented 2 years ago

is this pr still needed/outdated?

Eventually I think it's probably wise to rethink the authorization scheme that we've established. If we will be reusing the same tree for almost everything (obv depends a lot on what the runtime can sustain with the write lock), it probably makes sense to handle the append authorization at a higher level. In that regard I think we should use this PR as a starting point for a potentially much more complicated procedure.

ngundotra commented 2 years ago

This change may result in changes to indexing. I'd like to fix such indexing issues in a separate PR.

ngundotra commented 2 years ago

Closing this PR in favor of 2 separate PRs: