BIP-777 (GPR) The Great Poker Restoration: Add the poker client back to bitcoin #32181

pull stutxo wants to merge 2 commits into bitcoin:master from stutxo:master changing 11 files +888 −0
  1. stutxo commented at 6:13 AM on April 1, 2025: contributor

    This introduces a local poker client that allows you to play poker against your own node!

    Satoshi envisioned bitcoin as peer-to-peer digital cash but he also added the only other known use case for cryptocurrency in bitcoin's original implementation: gambling.

    This remains the sole significant innovation across all other cryptocurrency projects. Therefore, I believe it’s time to reconnect this concept with bitcoin and initiate The Great Poker Restoration.

    Original bitcoin poker code can be found here:

    Next steps

    • Add multiplayer lobbies
    • Add OP_SECURETHEPOT
  2. BIP-777 add local poker client to begin the great poker restoration d4a6c4065a
  3. DrahtBot commented at 6:13 AM on April 1, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32181.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    If your review is incorrectly listed, please react with πŸ‘Ž to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31664 (Fees: add Fee rate Forecaster Manager by ismaelsadeeq)
    • #29415 (Broadcast own transactions only via short-lived Tor or I2P connections by vasild)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. laanwj added the label Feature on Apr 1, 2025
  5. DrahtBot added the label CI failed on Apr 1, 2025
  6. DrahtBot commented at 7:16 AM on April 1, 2025: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Debug: https://github.com/bitcoin/bitcoin/runs/39748147405</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. fanquake marked this as a draft on Apr 1, 2025
  8. hebasto commented at 8:18 AM on April 1, 2025: member

    Where is the best place to learn poker?

  9. l0rinc commented at 10:01 AM on April 1, 2025: contributor

    <img src="https://github.com/user-attachments/assets/54cb8ae5-c886-4204-8083-a69afb39c7e3" width="500">

  10. Sjors commented at 10:49 AM on April 1, 2025: member

    I think we should prioritise Cashu integration, cc @callebtc IMG_8889

  11. sipa commented at 10:53 AM on April 1, 2025: member

    If the goal is gambling, I see no better way than reintroducing the CPU mining feature in Bitcoin Core.

  12. instagibbs commented at 10:54 AM on April 1, 2025: member

    lack of QT support kills it

  13. polespinasa commented at 11:14 AM on April 1, 2025: contributor

    lack of QT support kills it @jarolrod maybe we can do something for the new GUI...

  14. jarolrod commented at 11:30 AM on April 1, 2025: member

    @polespinasa maybe. But, only if there's consensus to do an nft for each card.

  15. 1440000bytes commented at 12:35 PM on April 1, 2025: none

    I think we should prioritise Cashu integration, cc @callebtc IMG_8889

    It can be done along with poker. Degens would like the idea of losing money even if they win a poker round.

    We will need whitepaper version 2 that supports trusted third parties.

    20250401_180148

    Mints: https://rugmedaddy.info

  16. Prabhat1308 commented at 12:48 PM on April 1, 2025: contributor

    Concept ACK 😈

  17. ajtowns commented at 1:22 PM on April 1, 2025: contributor

    I believe this provides a single player texas-holdem style poker game, with an RPC interface, and rng based on block hash and the user's wallet, against an AI player who never folds. I don't think any funds are put at risk.

    There are no new consensus features, and there's no p2p protocol added; so I don't think there's any cross-implementation compatibility to worry about, so a BIP makes sense here, let alone one with a self-assigned number.

    (People interested in the topic might find https://bramcohen.com/p/the-chia-gaming-platform interesting)

  18. Rob1Ham commented at 1:32 PM on April 1, 2025: none

    Concept ACK - lets get it passing CI and then LGTM!

  19. luisschwab commented at 1:37 PM on April 1, 2025: contributor

    tACK, multiplayer support would be huge!

  20. delta1 commented at 1:37 PM on April 1, 2025: none

    Concept ACK I lolled

  21. jlopp commented at 1:51 PM on April 1, 2025: contributor

    Concept ACK; the market demand for this will be huge.

    Crypto casinos have proven product market fit; if we can bring the casino to Bitcoin then we'll be able to subsume much of the demand for altcoins.

  22. pinheadmz commented at 1:58 PM on April 1, 2025: member

    tested ACK

    --> bccli -regtest poker play
    [Poker]
    [Block: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206]
    
    Your Hand: Two Pair, Js and 7s (Kicker: T)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ 9       β”‚β”‚ 10      β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚    β™     β”‚β”‚    β™     β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚       9 β”‚β”‚      10 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    The Showdown: Satoshi wins! Wait for the next block to play again.
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ J       β”‚β”‚ 7       β”‚β”‚ J       β”‚β”‚ 7       β”‚β”‚ 2       β”‚
    β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚
    β”‚    β™₯    β”‚β”‚    ♦    β”‚β”‚    ♦    β”‚β”‚    β™     β”‚β”‚    ♦    β”‚
    β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚
    β”‚       J β”‚β”‚       7 β”‚β”‚       J β”‚β”‚       7 β”‚β”‚       2 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    Satoshi's Hand: Two Pair, Js and 7s (Kicker: Q)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Q       β”‚β”‚ 6       β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚    ♦    β”‚β”‚    β™₯    β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚       Q β”‚β”‚       6 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    
    
    
  23. in src/rpc/poker_rpc.cpp:70 in d4a6c4065a outdated
      65 | +
      66 | +static UniValue handlePlay(NodeContext &node) {
      67 | +    auto& poker_worker = node.poker_worker;
      68 | +
      69 | +    if (poker_worker->gameState.gameHash == uint256::ZERO) {
      70 | +        throw JSONRPCError(RPC_MISC_ERROR, "Load a wallet to play!");
    


    pinheadmz commented at 1:59 PM on April 1, 2025:

    Why? there's no betting


    stutxo commented at 2:57 PM on April 1, 2025:

    We use a bitcoin address plus the current block hash for the rng to shuffle the deck!


    stutxo commented at 3:20 PM on April 1, 2025:

    does look a bit sus tho

  24. jaonoctus commented at 2:03 PM on April 1, 2025: none

    Concept All-inCK

    17435166053146023141750574334791

  25. cbspears commented at 2:10 PM on April 1, 2025: none

    LGTM!

  26. glozow added the label Good First Review on Apr 1, 2025
  27. glozow added the label good first issue on Apr 1, 2025
  28. furszy commented at 2:21 PM on April 1, 2025: member

    Cannot take it seriously, lint job fails.

  29. mattmcegg commented at 2:23 PM on April 1, 2025: none

    lets see a flop!

  30. rsafier commented at 2:29 PM on April 1, 2025: none

    Tested MacOS 15.4 M4:

    ./build/bin/bitcoin-cli -regtest poker play
    [Poker]
    [Block: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206]
    
    Your Hand: One Pair, 6s (Kickers: A, 9, 7)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ 9       β”‚β”‚ 4       β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚    ♦    β”‚β”‚    β™₯    β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚       9 β”‚β”‚       4 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    The Showdown: Satoshi wins! Wait for the next block to play again.
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ 6       β”‚β”‚ 6       β”‚β”‚ A       β”‚β”‚ 3       β”‚β”‚ 7       β”‚
    β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚
    β”‚    β™₯    β”‚β”‚    ♦    β”‚β”‚    β™₯    β”‚β”‚    β™     β”‚β”‚    β™₯    β”‚
    β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚β”‚         β”‚
    β”‚       6 β”‚β”‚       6 β”‚β”‚       A β”‚β”‚       3 β”‚β”‚       7 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    Satoshi's Hand: One Pair, 6s (Kickers: A, K, 7)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ 4       β”‚β”‚ K       β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚    β™     β”‚β”‚    β™₯    β”‚
    β”‚         β”‚β”‚         β”‚
    β”‚       4 β”‚β”‚       K β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    
    
  31. arejula27 commented at 2:41 PM on April 1, 2025: none

    Concept ACK What about adding Balatro support, it’s time to explore fresher, more engaging gameplay that aligns with modern player expectations.

  32. sr-gi commented at 2:42 PM on April 1, 2025: member

    Approach NACK, I lost two hands :cryinghard:

  33. glozow removed the label good first issue on Apr 1, 2025
  34. glozow removed the label Good First Review on Apr 1, 2025
  35. sipa commented at 2:58 PM on April 1, 2025: member

    lack of QT support kills it @instagibbs The TUI introduced here seems awesome though. Could we have a TUI-over-RPC-over-HTTP-over-UNIXsockets for everything?

  36. stutxo commented at 3:15 PM on April 1, 2025: contributor

    Approach NACK, I lost two hands :cryinghard:

    skill issue

  37. sr-gi commented at 4:26 PM on April 1, 2025: member

    Approach NACK, I lost two hands :cryinghard:

    skill issue

    I'm pretty sure the game is rigged

    <img src="https://github.com/user-attachments/assets/70712258-ac6d-45f6-9dbf-47577692dacc" width="500">

  38. allenpiscitello commented at 4:36 PM on April 1, 2025: none

    Concept ACK

  39. add an extra line to make it 888 a2b00e009b
  40. ecurrencyhodler commented at 8:59 PM on April 1, 2025: none

    This aligns with satoshi's original vision for coupling an app with a bitcoin implementation. Concept ACK.

    https://sourceforge.net/p/bitcoin/code/1/tree//trunk/uibase.cpp

  41. TheMhv commented at 10:24 PM on April 1, 2025: none

    Concept ACK

  42. fanquake commented at 5:21 AM on April 2, 2025: member

    Good stuff.

  43. fanquake closed this on Apr 2, 2025

  44. GaloisField2718 commented at 1:12 PM on April 2, 2025: none

    Lol good April fool!


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me