Dapple is Pretty Neat -...
Transcript of Dapple is Pretty Neat -...
![Page 1: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/1.jpg)
Dapple is Pretty NeatLet me show you!
![Page 2: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/2.jpg)
What?• It’s an EVM Dev Multitool
• Collection of utilities centered around common data model
![Page 3: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/3.jpg)
Key Innovations• `Dappfile`: package/dapp descriptor format
• Chain Forks (local)
• EVM extensions
![Page 4: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/4.jpg)
• `Dappfile`: package/dapp descriptor format
• Shared global runtime environment blurs line between code packages and deployed code-objects
Key Innovations
![Page 5: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/5.jpg)
![Page 6: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/6.jpg)
Key Innovations• Chain Forks (local)
![Page 7: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/7.jpg)
Key Innovations• Chain Forks (local)
![Page 8: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/8.jpg)
• EVM extensions
• Break the rules… privately
Key Innovations
![Page 9: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/9.jpg)
The Workflow
![Page 10: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/10.jpg)
1) Find some Dependencies• Hint hint: github.com/nexusdev/dappsys
• Auth, proxy actors, tokens, governance, datastores, utils…
• Contract system building blocks
• Top candidate for formal verification!
![Page 11: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/11.jpg)
2) Build/Link (yawn)• Problem: Solidity has no namespaces
• maker-core has objects from 4 different dappsys versions
• Solution: Custom Linker
![Page 12: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/12.jpg)
3) Test• Dapple perspective: Primary consumer of a contract
is other contracts
• Magic `Test` contract, harness knows test definition conventions
![Page 13: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/13.jpg)
3) Test
![Page 14: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/14.jpg)
3) Test
setUp testSomething
testSomethingElse
![Page 15: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/15.jpg)
• Now add chain forking: Test against live chain
3) Test
setUp testSomething
testSomethingElse
![Page 16: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/16.jpg)
• Now add chain forking: Test against live chain
3) Test
![Page 17: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/17.jpg)
• Now add chain forking: Test against live chain
3) Test
![Page 18: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/18.jpg)
• Magic `Script` contract
• Hijacks `CREATE` and `CALL` opcodes - makes a cross-chain transaction instead of message call and blocks execution until confirmed
• combine with chain forking to simulate deployments and perform consistency checks on result of live system
4) Deploy: Wallet-side Scripting
![Page 19: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/19.jpg)
“nikolai: Please confirm proposal 66 ASAP, it is a critical bugfix!”
4) Deploy: Wallet-side Scripting
![Page 20: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/20.jpg)
4) Deploy: Wallet-side Scripting
![Page 21: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/21.jpg)
4) Deploy: Wallet-side ScriptingNotice the hoisted `env` object
![Page 22: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/22.jpg)
Rinse and Repeat
5) Publish your Dappfile
![Page 23: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/23.jpg)
Sneak Peek• On-chain registry and power user block explorer
• dapphub.io
• GUI for chain forks, dry runs, simulations, etc
![Page 24: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/24.jpg)
Sneak Peek• More wallet-side EVM extensions:
• Thin clients - DIY sharding
• Consensus in VM
• System calls: Private Sidechains bridge old web and EVM proofs
![Page 25: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/25.jpg)
Sneak Peek
![Page 26: Dapple is Pretty Neat - EthFansupyun-assets.ethfans.org/uploads/doc/file/442223cf02194effb75f27d30… · • Magic `Test` contract, harness knows test definition conventions. 3)](https://reader035.fdocuments.in/reader035/viewer/2022071220/605adb9fff11c6044b0f8666/html5/thumbnails/26.jpg)
Thank you!
nexusdev.us
github.com/nexusdev/dapple
github.com/nexusdev/dappsys