regolith-labs / ore

ORE is a cryptocurrency everyone can mine.
https://ore.supply
685 stars 235 forks source link

Auth ix to allow mine cpis #72

Closed HardhatChad closed 3 months ago

HardhatChad commented 3 months ago
cavemanloverboy commented 3 months ago
Auth = 0,

rip my sdk and all active devnet miners lol. not super important.

cavemanloverboy commented 3 months ago

This is needlessly complex imo. You don't actually need the first ix to have a discriminator, or to invoke the ore program.

Just look for a noop program invocation (2 cus) that has zero accounts and instruction data with len=32. In fact, you don't even need to check for noop program. Just look at the instruction data. If the user calls some other program with this pubkey data, so be it. still unique for the transaction which is all you need; all we want here is 32 bytes that are static throughout the entire transaction.

please use my noop program bc spl noop is bloated and not actually noop. validators will load less program data and execute less bpf instructions.

zakajd commented 3 months ago

Why are you fighting sybil so hard with the new design? Given the adaptive difficulty mechanics and "choose your difficulty" mining it only makes sense to use all resources for a single wallet instead of spamming as in ORE v1

HardhatChad commented 3 months ago

If we allow multiple hashes per transaction, there's a financial incentive to fit as many hashes as possible in each transaction to minimize your overall fees/hash.