Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Dispenser Address to be Source Address #1785

Open
adamkrellenstein opened this issue May 11, 2024 · 8 comments
Open

Require Dispenser Address to be Source Address #1785

adamkrellenstein opened this issue May 11, 2024 · 8 comments

Comments

@adamkrellenstein
Copy link
Member

adamkrellenstein commented May 11, 2024

Screenshot 2024-05-11 at 6 59 03 AM

EDIT: It turns out that there is a hacky workaround was implemented as a mandatory protocol change just last November (with the casual changelog entry "Redefined EMPTY address to mean no XCP or BTC history"). This prevents dispensers from being opened on any address that has any XCP or BTC history, which probably resolves the associated security issue. Unfortunately, that little patch unintentionally (and retroactively!) made the entirety of AddrIndexRs (and its ~200GB database) consensus-critical and mandatory for parsing. :/ AddrIndexRs is a broken, unmaintained fork of a third-party codebase that is not deterministic and has been the cause of a large number of critical bugs in Counterparty, not to mention the fact that it makes Counterparty deployment a total PITA. See https://github.com/CounterpartyXCP/counterparty-core/pull/1255/files#diff-446a2aa52fd57fd6379f4732ae36f794df6f0fb1585494f798f4aa3f7b94fca2R136. Generally speaking, opening dispensers on addresses you can't prove that you own is a Bad Idea(TM), and just generally unnecessary... (yes, it will require a moving tokens to a cold wallet before using that cold wallet as a dispenser). Once we implement this, we can kill AddrIndexRs, per #1764.

@adamkrellenstein adamkrellenstein added this to the Proposed Protocol Changes milestone May 11, 2024
@davestaxcp
Copy link

this was discussed here (it can only be on addresses with no btc history) #1534

which is why the communication for opening dispensers is the written the way it is here https://davestaxcp.gitbook.io/freewallet.io-user-manual/freewallet-functions/setting-up-a-dispenser

I sometime open dispensers for friends and new users (and when users can only access Freewallet Mobile) from time to time.
https://xchain.io/tx/182cc0e538f4617df767d7a5d54aba547ca1e8d38655c3f7a096aff9a118730b

It is very common within the xcp art community and incredibly helpful.

@B0BSmiths
Copy link

Opening a dispenser on a 'cold wallet' requires you to be able to open a dispenser on a non source address.

Having to make your cold wallet hot to create a dispenser is a downgrade

@B0BSmiths
Copy link

Opening a dispenser on a non source address requires only a single tx.

Opening a dispenser from a source address requires the address to have btc so must first be loaded with btc, meaning it becomes a two tx process and the cost increases

@adamkrellenstein
Copy link
Member Author

Okay there's a sanity check now that it only works for empty addresses...

@adamkrellenstein adamkrellenstein removed this from the Proposed Protocol Changes milestone May 12, 2024
@adamkrellenstein
Copy link
Member Author

adamkrellenstein commented May 13, 2024

Pretty sure this is required in order to get rid of the AddrIndexRs dependency. (#1785)

@B0BSmiths
Copy link

If the address is brand new - e.g. has no btc balance and no counterparty activity it wont exist in the AddrIndexRs database so how is it dependant on it ?

@adamkrellenstein
Copy link
Member Author

@B0BSmiths you have to check that the address isn't in the database

@adamkrellenstein adamkrellenstein modified the milestones: Proposed Protocol Changes, v10.2.0 and v9.62.0 (Protocol Change) May 13, 2024
@adamkrellenstein adamkrellenstein changed the title You should not be able to create a dispenser for an address you don't own! [Protocol Change] You should not be able to create a dispenser for an address you don't own! May 19, 2024
@adamkrellenstein adamkrellenstein changed the title [Protocol Change] You should not be able to create a dispenser for an address you don't own! You should not be able to create a dispenser for an address you don't own! May 19, 2024
This was referenced May 23, 2024
@adamkrellenstein adamkrellenstein changed the title You should not be able to create a dispenser for an address you don't own! Require Dispenser Address to be Source Address May 26, 2024
@mikeinspace
Copy link

I'm okay with this change given the AddrIndexRs impact, though it will kind of suck to lose Fair Minting ability (xcp20.wtf style). However, I'm following this thread and will try to collaborate on potential alternatives to Fair Minting: #1843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants