bestinslot-xyz / OPI

Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin.
Apache License 2.0
202 stars 110 forks source link

Pow20 #30

Closed pow20 closed 6 months ago

pow20 commented 7 months ago

Pow20 is a proof of work protocol that extends Brc20 with a handful of extra rules for minting and deploying a token outlined here https://protocol.pow20.io

2 new fields introduced into the deploy difficulty is number of leading 0's required by the double sha 256 of the solution startingBlock is the block where minting begins, the blockheader is included in the solution. This prevents mining in secret by deployer

{
  "p": "pow-20",
  "op": "deploy",
  "tick": "DOTI",
  "max": "21000000",
  "lim": "1000",
  "difficulty": "5",
  "startBlock": "875000"
  "dec": "8" // max 15
  "icon": "534cede12f90729d961dbdaf7dc889e9ac6567fd43759097567bca2f2791dcd8i0"
}

1 new field introduced to the mint inscription

{
  "p": "pow-20",
  "op": "mint",
  "tick": "DOTI",
  "amt": "1000",
  "solution": "<TICK>:<BTC_ADDRESS>:<START_BLOCK_HEADER>:<NONCE>"
}

New Indexer Rules

1 Open question is how can we get a url to report to and get a consensus view of Pow20

samedcildir commented 7 months ago

Thank you for the PR, we really appreciate it.

I've reviewed the code and there are several changes that I think would make this module better:

If you open report_hashes part at the end of the code, we can create a new tab for Pow20 on opi.network where you can get a consensus view table.

pow20 commented 7 months ago

Thank you, I really appreciate your time to review

I have addressed the concerns raised

pow20 commented 7 months ago

@samedcildir I have also added back the filter for cursed brc20

samedcildir commented 6 months ago

Thank you for the changes, I'll merge this and enable pow20 reporting on api.opi.network 👍