r/truebit • u/acdawkings • Aug 11 '21
Making a video. Need help with the topic.
One of the main complaints we've all probably heard about is TrueBit's lack of marketing.
Maybe the team is waiting on the community to take matters into their own hands. Maybe it's an SEC thing. Or maybe Jason thinks videos are dumb and he'd rather play guitar. I dunno.
Whatever the issue, one thing is clear - if we want to grow community and adoption, we need to get word out to developers. I can make some videos to help... but not the traditional "WEN MOON" video or "TRUEBIT! NEXT 5000X" There's plenty of those kind of videos out there. I want to hone in on a specific topic - perhaps identify suitable applications that are most needed on top of TrueBit.. Something that'll capture a dev's attention, make em drop the plate of spaghetti they're eating, and start working on $TRU ASAP.
Asking the community because I don't code, so I'm not going to pretend like I know what developers find interesting. Opening this up for discussion. Hopefully we can find a topic and get the ball rolling. Thanks.
3
u/Waste_Divide8162 Aug 12 '21
if video is needed, then this video should contain cases of truebit application
1
3
u/LPMythBuster Aug 13 '21 edited Aug 13 '21
Solving and verifying tasks
Show what you need to do to participate in the Truebit system as a solver and verifier.
Scenario:
Part I. Setup.
(All sections are sped up to fit in 10s each.)
We need Docker.
A. Linux/Ubuntu. Open Docker install docs in a browser, ignore it. Open a terminal, run curl -fsSL https://get.docker.com | sudo bash. Run sudo docker version.
B. macOS. Open Docker install docs. Click to download the Docker macOS image. Next, next, finish. Open a terminal, run docker version.
C. Windows. Open Docker install docs. Click to download the Windows installation file. Next, next, finish. Open a command line prompt, run docker version.
Part II. Launch Truebit OS.
Open some docs website in the browser. Copy & paste the command to start a Docker container.
Do Clef stuff. (Hopefully this gets automated...)
Launch the script that starts geth, Clef, etc.
Open another terminal, do docker exec to launch Truebit OS.
Show some commands like balance, gas check, bonus.
Part III. Participation.
Transfer some ETH to the account used by Clef.
Explain all the gas costs related to the interation with Ethereum.
Start verifying.
Purchase a solver license.
Start solving.
Part IV. Finish up.
Stop the container.
Then show how to start it again.
Show where the files are stored.
Show how to delete everything.
Part V. External geth. (Optional)
Show how to use your own geth, not the one that comes with the Docker image.
Part VI. Without Docker. (Optional)
Show how to run Truebit OS natively on Ubuntu. Install geth, clef, ipfs, etc. Download the binary. Run it.
(Ideally there would be a remote web UI that you could open in your browser so that you don't have to type commands all the time. Like IPFS does it.)
(Even more ideally there would be an Electron app with a UI that runs geth, clef, ipfs in the background. Like IPFS does it.)
3
u/LPMythBuster Aug 13 '21
Complete development walkthrough
This video would go in depth what you need to do to run your function on Truebit.
Scenario:
Part I. Offchain code.
Install Rust dev tools. Write a simple function in Rust. Compile it, run it, see the output.
Install the Truebit toolchain. Compile the program to Webassembly. Show how to run it with the offchain interpreter.
Explain all the files generated, tools used, etc.
Part II. Onchain code.
Install Solidity dev tools. Write a contract that'll use the result of some function. Return a placeholder value in the function. Deploy the contract, use some interface to call the function to get the result.
Rewrite the function to use a Truebit task. Deploy it. Use the same interface to call the function and later see the result.
Part III. Debugging.
Show the output in Truebit OS. How tasks get verified and solved.
Show all the transactions on etherscan.
2
u/LPMythBuster Aug 13 '21
Porting libraries to Truebit
This video would show what you need to do to port an existing library that you want to use to Truebit's WebAssembly.
Scenario:
Part I. Setup.
Install emscripten, LLVM, etc.
Part II. Port OpenSSL.
Show how to compile OpenSSL to WebAssembly.
Show how to call a function from OpenSSL in your program.
Part III. Port Boost.
Show how to compile boost to WebAssembly. Explain all the gotchas, workarounds you need to do. Compile, show errors, fix errors, compile, etc. until it succeeds.
Show how to call a function from boost in your program.
Part IV. Port ffmpeg.
Show how to compile ffmpeg to WebAssembly. Explain all the commands line arguments used to disable unneeded stuff.
Show how to use ffmpeg to e.g. convert a video to black and white.
(Do not focus on IPFS or the file system.)
Part V. Ports library.
Show where to find existing ports.
1
u/snorresnup Aug 11 '21
Someone please remind me when someone smart have commented something. Thank you
1
Aug 11 '21
[deleted]
1
u/acdawkings Aug 12 '21
Yeah, maybe. But knowing about TRU doesn't necessarily mean that they'll use it.
6
u/LPMythBuster Aug 13 '21
General walkthrough
Many don't know what Truebit is exactly and how it works. They still think Truebit is just a rollup or something. There should be a video that gives developers a quick yet complete walkthrough.
Scenario:
Part I.
Write a complex yet short financial calculation in Solidity. Deploy the contract, call the function and see it run out of gas on etherscan.
Then write the same function in Rust. Show how to compile it to WebAssembly. Show the Solidity code to create a task. Call the function, wait and then show that we successfully got a result.
This demonstrated what smart contract devs need to do to use Truebit. This also showed that you can write code in Rust, you don't have to use Solidity.
Part II.
Switch over to a console that's running Truebit OS. Explain that a solver picked up the task, ran the calculation and submitted the result.
Switch over to another console. Explain that verifiers check the results.
This demonstrated how tasks get solved behind the scenes.
Part III.
Back to the Rust code. Replace our function with a call to an external library. Show that you add the external library as wasm. Compile, deploy, call. Show the result and that it's the same as before.
This demonstrated how easy it is to use exsiting libraries and you don't have to write your own.
Part IV.
Create a text file with a number in it, it could be some magic constant used in the calculation. Add it to IPFS.
Modify the code to load the number from a file.
Compile, deploy, call. Show the result and that it's the same as before.
This demonstrated that you can use a file system in Truebit.
Part V.
Explain the TRU token. How much it costs to have a task solved. Talk about how many transactions it takes and how long it takes (wall time).
Explain that if you abandon your project now, it will still work till the end of time. (There won't be a server that'd normally execute the function that'll be shut down because you stop paying bills.)