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

Convert tic-tac-toe demo program to use the stamps concept #1786

Closed
mvines opened this issue Nov 12, 2018 · 1 comment
Closed

Convert tic-tac-toe demo program to use the stamps concept #1786

mvines opened this issue Nov 12, 2018 · 1 comment
Assignees

Comments

@mvines
Copy link
Member

mvines commented Nov 12, 2018

Before a user can play tic-tac-toe they need platform tokens to drive the game. At the moment this means an airdrop, in the future it means obtaining tokens from another user, an exchange, or ___? Avoiding this barrier for programs that are willing to fund the user for the purposes of interacting with them is highly desirable.

#1754 is an attempt to solve this problem.

Let's try to implement this approach or something like it for tic-tac-toe. Evidence of success would be that the user no longer needs an airdrop to play the game.
.

@mvines mvines added this to the v0.11 Tabletops milestone Nov 12, 2018
@mvines mvines self-assigned this Nov 12, 2018
@mvines mvines mentioned this issue Nov 12, 2018
@mvines
Copy link
Member Author

mvines commented Nov 28, 2018

Done, see solana-labs/example-tictactoe@d9faee6

The player funding works as follows:

  1. The player passes their public key to the dashboard server
  2. Dashboard server constructs a transaction that atomically (a) assigns the player's account to the tic-tac-toe program, and (b) transfers 1 token to the player's account. Dashboard server signs the transaction with its secret key and returns the transaction to the player
  3. The player also signs the transaction with their secret key and submits it. Once confirmed the player now has 1 token that can only be used by them to initiate a new tic-tac-toe game or join the existing game advertised on the dashboard.
  4. Every time the player spends their 1 token to advance their game, the dashboard transfers 1 additional token to the player's account for their next move.

Confession: I cheated slightly, in that the client actually has access to the dashboard account's secret key for player funding. See https://github.com/solana-labs/example-tictactoe/blob/d9faee6118489f50e28c71703e85b09682c3e680/src/program/tic-tac-toe-dashboard.js#L144-L167. This shortcut was taken simply to avoid building out a bunch more client/server plumbing that would make the demo even more complex but does not change the underlying player funding mechanism in any way.

@mvines mvines closed this as completed Nov 28, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this issue Aug 29, 2021
)

Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.11.0 to 1.13.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Changelog](https://github.com/solana-labs/solana-web3.js/blob/master/.releaserc.json)
- [Commits](solana-labs/solana-web3.js@v1.11.0...v1.13.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ryoqun pushed a commit to ryoqun/solana that referenced this issue Jun 19, 2024
steviez pushed a commit to steviez/solana that referenced this issue Jul 1, 2024
willhickey pushed a commit that referenced this issue Jul 10, 2024
* v1.18: Use updated branch for curve25519-dalek

RUSTSEC-2024-0344 was announced so update to a branch that contains the
commits that were created in response to the advisory.

We must do this manually as the v1.18 branch is built against
curve25519-dalek 3.2.1; this is not the latest major release and the
maintainers have chosen not to push changes to their older release
branches

* ci: ignore curve25519-dalek audit temporarily (#1786)

ci: ignore curve25519-dalek audit

* Review feedback - more specific link to the "why" information

---------

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
ruuda pushed a commit to ChorusOne/solana that referenced this issue Jul 15, 2024
* v1.18: Use updated branch for curve25519-dalek

RUSTSEC-2024-0344 was announced so update to a branch that contains the
commits that were created in response to the advisory.

We must do this manually as the v1.18 branch is built against
curve25519-dalek 3.2.1; this is not the latest major release and the
maintainers have chosen not to push changes to their older release
branches

* ci: ignore curve25519-dalek audit temporarily (solana-labs#1786)

ci: ignore curve25519-dalek audit

* Review feedback - more specific link to the "why" information

---------

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant