Giter VIP home page Giter VIP logo

Comments (5)

sunnygleason avatar sunnygleason commented on July 30, 2024 1

@mvines awesome, (0) is already implemented on the custom-testnet branch:

1605217#diff-1e5251f0c8caa1a663183aa6b0bd36e3R221

I'll start a dev task to make the changes in (3) over the next few days (there
are probably a couple visualization tasks which are higher priority)

from example-tictactoe.

mvines avatar mvines commented on July 30, 2024

I'm now seeing this issue consistently after any game

from example-tictactoe.

sunnygleason avatar sunnygleason commented on July 30, 2024

@mvines looks like both programs use tick_height now instead of a client-provided timestamp.

https://github.com/solana-labs/example-tictactoe/blob/master/program-native/src/lib.rs#L179
https://github.com/solana-labs/example-tictactoe/blob/master/program-bpf/src/tictactoe/tictactoe.c#L385

This appears to have changed in this commit:

ae874e9

The Solana Rust SDK looks like it has a timestamp() function, but I couldn't find one in the BPF sdk:

https://github.com/solana-labs/solana/blob/master/sdk/src/timing.rs

Do you have a preference for how this gets fixed?

  1. very lightweight, no program change: web client keeps track of tick_height to epoch millis
  2. similarly lightweight, no program change: node "server" keeps track of tick_height to epoch millis
  3. least lightweight, program change(s): program state include epoch millis as data structure

Thank you in advance for any advice you may have!

from example-tictactoe.

mvines avatar mvines commented on July 30, 2024

(3) would be nice as a longer term fix. In the immediate term I'd be fine with option (0), just hide the recent game time from the UI though :)

from example-tictactoe.

mvines avatar mvines commented on July 30, 2024

Please revert 458adce as a part of fixing this issue

from example-tictactoe.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.