solana-labs / break Goto Github PK
View Code? Open in Web Editor NEWBreak Solana Game
Home Page: https://break.solana.com
License: MIT License
Break Solana Game
Home Page: https://break.solana.com
License: MIT License
When the RPC server restarts, it binds to a new random TPU udp port. The break server is oblivious to that and doesn't realize it's sending transactions into the void when this happens.
Detect RPC restarts or periodically query cluster info to make sure tpu info is up to date
Break transactions create a new account for each transaction and these accounts bloat the ledger
Use BPF instructions!
If you load https://break-solana-staging.herokuapp.com/results directly, either by pasting into the address bar or reloading the page after playing a round, you can start a new round without hitting "Play again", but the timer never starts.
Want to run break on a testnet which doesn't have airdrops enabled
Detect PAYER_KEY
env var and use that to fund account supply when available
We want to track the full impact of the break game on the cluster over time
If short on time:
Exists on /stats
5k concurrent users
15k in one hour
100k in one day
We want to show users that they're not alone when playing Break by showing the number of concurrent players.
The break server tracks websocket clients, broadcast the client count periodically
Break solana page should exist on "break.solana.com"
layouts should be based image, attached to this story.
"Read how it works" button should exist on this screen. Clicking on the button - link should be opened in new browser tab. Link: https://solana.com/category/blog/
Solona logo should exist, clickin on the logo - open Solana.com page in new browser tab.
Solana static image should exist on this screen. This image can be animated in terms of future tasks.
"Play the game" button should exsit on this screen. Clicking on the button - Start/break screen should be displayed
https://drive.google.com/file/d/1aVKxV9Yk0P_4FBLw4-Ey2tR1v5YZbKJY/view?usp=sharing
See behavior above, maybe at a 5s timer at the top stating that you can take a breather?
Bring up to parity with the top row of screens on this figma board:
https://www.figma.com/file/cxOUHfMZSmuR9zBMfhJtec/Break-Solana-Game?node-id=8%3A302
Yes they are technically different, so it's like that we're totally wrong. But it would be a bit misleading.
Maybe just use block time in the results, like the landing view to be consistent?
This is not a correct way to calculate transaction confirmation time.
const t1 = performance.now();
const response = await this.connection.sendTransaction(transaction, this.keypair);
const t2 = performance.now();
All this is doing is broadcasting a transaction to the network. Next, the network sends the transaction to the leader node who will then process the transaction and eventually produce a block with the results of this transaction (if it succeeds).
Make use of https://solana-labs.github.io/solana-web3.js/function/index.html#static-function-sendAndConfirmRecentTransaction or https://solana-labs.github.io/solana-web3.js/class/src/connection.js~Connection.html#instance-method-confirmTransaction to get the correct transaction confirmation time
On the /stats screen I want to see:
Work the game into the CrowdIn system and hand to Austin to get translations done
Each transaction creates a rent exempt account but creating rent exempt accounts is not necessary.
Only transfer enough rent to cover a single epoch.
For iPhone X users, the "Send Transaction" button is rendered off screen. Is it possible to have users send a transaction by tapping anywhere on the screen during the 15 seconds (or just on the transaction grid)?
Otherwise, it's a bit solitaire-like. :)
Also, some kind of rankings by the transaction count would be nice to have. :)
1000's of blockhash polls every few seconds could put extra strain on the RPC node
Poll for blockhash in the server and notify clients of latest
Break is creating too many accounts. See more details here: #108
This captures the client side of the changes:
We'll need to store:
Time completed
Username
Email (make a field for this)
Referrer ID (if there was one, from the URL that created the session)
TPS updates are too choppy because they are calculated with a short time window
Use a rolling time window for TPS calculation so that TPS updates are smooth
Break client transactions create program accounts, and those transactions can be easily verified by subscribing to the program using the RPC pub sub API. If all break clients create accounts for the same program, the fan out of program subscription notifications is going to overwhelm the RPC server as well the clients themselves.
Napkin math: 1000 users * 15 tps = 15,000 tps => 15,000 notifications * 1000 users => 15M websocket messages per second. Each user getting 15k messages per second.
Sharding!
% of Solana Capacity used: (x/50000)*100
x- number of transaction generated by all users online for 1 second.
We want to show users how fast confirmation times are on Solana
https://www.figma.com/file/cxOUHfMZSmuR9zBMfhJtec/Break-Solana-Game?node-id=8%3A302
Referral link is generated at the 15 second endgame screen
Sessions started from a link with a referral ID keeps record of the referrer
Break Solana should be playable on , mobile devices and tablets.
If apps do not bind to the provided PORT, Heroku will attempt to restart a few times until it marks it as crashed.
Each new deploy of the break app creates a new program with a random pubkey. It would be nice if the program id was a vanity address and was always the same because these program instructions will be inspected on the explorer.
Message:
"Currently, all players online are creating TPS, which means they are using % of Solana capacity.
You can join us and try to break Solana: https://break.solana.com/game"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.