Closed programarivm closed 1 year ago
Hi there, happy learning and coding! I will try my best to try and find a way to upload to IPFS.
@programarivm, is there any IPFS platform that this organization would like to use? There doesn't seem to be a universal one (at least whatever i've researched).
@programarivm, I think we need to create accounts to access these platforms. But would it matter if I just made an account (we only need to pull from the IPFS)?
Not too sure, I guess at this moment this issue is quite experimental. It'd be nice if you could create an account, upload the file, and share the IPFS url.
Happy learning!
@programarivm I have created the account and am going to do the IPFS stuff.
Thank you @SmashedFrenzy16,
Then at some point the file will be fetched from IFPS:
Keep it up,
@programarivm, the maximum transfer limit thorugh IPFS on Infura is 5GB for free. Is this plenty of storage considering the future?
This is what Infura says:
5GB of total storage
No single file upload size restriction
5GB total data transfer down/mo
5GB total data transfer up/mo
@SmashedFrenzy16 Should be fine.
@programarivm and @CodeMaster7000, I take it that we probably don't need all of the 5GB, so I'm going to set up the IPFS now on the account.
@programarivm I have successfully pinned the JSON file for the game posted at the top of this issue using Infura IPFS (pinning means uploading in IPFS terms)!
I also modified the JSON at the top of the issue to move in the closing curly bracket, to match the data/annotations/games.json formatting.
Thank you @SmashedFrenzy16 for setting up Infura on your side. Can the IPFS link be shared for public access?
@programarivm I have a dedicated gateway subdomain from infura for the IPFS API project, which is the following: https://chesslablabgames.infura-ipfs.io
@programarivm if that doesn't work, I can share an invite to collaboration on the API key (that isn't public and only intended for specific people and requires and email to send the invite), or I could send the API key and the secret key securely somehow (but this is risky - the first option of an invite seems better).
@programarivm, if the public want to have some access to the IPFS if nothing works, there is an API key (since there is also a secret, this one is probably fine for public use). But we can always add files and retrieve files from the IPFS, and if deemed necessary, I can share the project with you so that you can also get uploading rights.
@programarivm, if you have found that this process can be simplified, then that would be great!
If I'm not very much mistaken, I thought a CID would have been created.
See:
This should be okay to close this issue.
Happy learning,
I'll try and find the CID and send it here (I presume it is just the file hash by what I've read).
@programarivm I think this is the CID:
QmSjSFQYJ547DnUZqQhXRob37eUwxQotbtwbwz9gis7Ebt
The game can now be fetched from this URL.
https://ipfs.io/ipfs/QmSjSFQYJ547DnUZqQhXRob37eUwxQotbtwbwz9gis7Ebt
{
"Event": "Steinitz - Zukertort World Championship Match",
"Site": "New Orleans, LA USA",
"Date": "1886",
"White": "Johannes Zukertort",
"Black": "Wilhelm Steinitz",
"WhiteElo": "?",
"BlackElo": "?",
"Result": "0-1",
"ECO": "D50",
"movetext": "{ Adapted notes, originally by Robert James Fischer from a television interview. } 1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Be7 5.Nf3 O-O 6.c5 { is a mistake already; instead it should be played e3, naturally. } 6...b6 7.b4 bxc5 8.dxc5 a5 9.a3 d4 { is a fantastic move; it's the winning move. The pawn can't be taken with the knight because of axb4. } 10.Bxf6 gxf6 11.Na4 e5 { because the center is easily winning. Black's kingside weakness is nothing. } 12.b5 Be6 { with the idea of dominating the game with a powerful mobile center. } 13.g3 c6 14.bxc6 Nxc6 15.Bg2 Rb8 { threatening Bb3. } 16.Qc1 d3 17.e3 e4 18.Nd2 f5 19.O-O Re8 { is a very modern move; a quiet positional move. The rook is doing nothing now, but later... } 20.f3 { to break up the center, it's the only chance for White. } 20...Nd4 21.exd4 Qxd4+ 22.Kh1 e3 (22... Qxa4 { allows Black to easily regain material. }) 23.Nc3 Bf6 24.Ndb1 d2 25.Qc2 Bb3 26.Qxf5 d1=Q 27.Nxd1 Bxd1 28.Nc3 e2 29.Raxd1 Qxc3 { and White resigns. The center has prevailed. } 0-1"
}
@programarivm that's great! Should we now make a program to fetch the games from IPFS?
🙂 Not too sure about how to query the data in the interplanetary file system.
Let's upload the very first chess game in JSON format into IPFS! Any of the games in data/annotations/games.json should be okay. Let's start with the following one.
See https://github.com/orgs/chesslablab/discussions/349
Keep it up,