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

feat(examples): Implement commit-reveal mechanism for Shifumi game to enhance fairness #2760

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

linhpn99
Copy link
Contributor

@linhpn99 linhpn99 commented Sep 4, 2024

Description

From #2758

This PR introduces a commit-reveal mechanism for the Shifumi game, ensuring players' moves are hidden until both have committed. The off-chain hashing process is required to prevent move visibility before reveal.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🌐 tendermint v2 Issues or PRs tm2 related labels Sep 4, 2024
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.43%. Comparing base (f04ec89) to head (2bef372).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2760      +/-   ##
==========================================
- Coverage   60.44%   60.43%   -0.01%     
==========================================
  Files         563      563              
  Lines       75159    75159              
==========================================
- Hits        45427    45423       -4     
- Misses      26343    26346       +3     
- Partials     3389     3390       +1     
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (-0.86%) ⬇️
gno.land 67.21% <ø> (ø)
gnovm 64.46% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 62.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leohhhn
Copy link
Contributor

leohhhn commented Sep 5, 2024

@linhpn99 Thanks!

How does a user generate a commit? It would be great to explain this to the user, as it's integral to playing the game.

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Sep 5, 2024
@linhpn99
Copy link
Contributor Author

linhpn99 commented Sep 5, 2024

@linhpn99 Thanks!

How does a user generate a commit? It would be great to explain this to the user, as it's integral to playing the game.

yeah i update Render function to clarify how the game works
basically, it still requires hashing to be done off-chain, and I haven't yet figured out how to make it more convenient for players except for linking to a Go Playground source containing a hash function to calculate the commit

Screenshot from 2024-09-05 21-54-48

@leohhhn
Copy link
Contributor

leohhhn commented Sep 11, 2024

#2333 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: No status
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants