Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Darcher to analyze its working #74

Open
saarshah opened this issue Jul 11, 2023 · 4 comments
Open

How to use Darcher to analyze its working #74

saarshah opened this issue Jul 11, 2023 · 4 comments

Comments

@saarshah
Copy link

First I appreciate your effort toward the research community by providing such a wonderful tool. I am interested to use it and analyze its working. Is there any guidance (step by step) available so that such tool could be used easily.

@Troublor
Copy link
Owner

Hi, thanks for reaching out. DArcher is a research prototype and may be immature in many ways. If you would like to check how DArcher works, you can use our provided Virtual Machine image (follow the instruction here). The image has an already-set environment that all experiments in our paper can be reproduced.

If you would like to make DArcher work for other DApps. You can refer to the scripts of running DArcher on experiment subjects.
https://github.com/Troublor/darcher/blob/master/packages/darcher-examples/scripts/experiment.ts

To break down the details, there are several components in DArcher. I hope my explanations below can help you understand how DArcher is implemented:

  • ĐArcher Go Ethereum: The modified Ethereum node that can run a blockchain network consisting of two nodes and simulate the blockchain mining and reorg. You can follow the docker-compose to start ĐArcher Go Ethereum. It exposes Ethereum JSON-RPC endpoint for DApp to connect.
  • ĐArcher Crawljax: The modified Crawljax, which is a tool that randomly explores the functionalities of Web applications as test cases. We modify it so that crawljax works when the DApp sends transactions. This is because Crawljax needs to opt-out to the browser extension - MetaMask to sign and submit the transaction so that the DApp testing can proceed. To make it work, we also modify the MetaMask extension here to make MetaMask can be controlled by crawljax.
  • dbmonitor and dbmonitor-browser: They are the component responsible to fetch DApp's off-chain from either MongoDB (using dbmonitor) or browser's internal IndexedDB (using dbmonitor-browser, a chrome browser extension).
  • analyzer: this is the main controller of DArcher, responsible for running crawljax to explore DApp, controlling ĐArcher Go Ethereum to change the lifecycle of the submitted transactions, fetch DApp's off-chain state via dbmonitor, checking the DApp testing oracle we proposed in the paper during transactions going through their lifecycles.

PS: Blockchain community is evolving very fast. It is likely that many of our modified software (ĐArcher Go Ethereum and the MetaMask browser extension) do not work in modern DApps.

@saarshah
Copy link
Author

Thanks for your detailed answer. I will check and let you update, if there is still a problem in using your tool.

@saarshah
Copy link
Author

saarshah commented Jul 19, 2023

I have downloaded the Darcher Image and try to use it in Virtual Box as per given instructions, But I am facing following error

"The shared folder 'troublor' could not be set up: Shared folder path '/home/troublor' is not absolute.
The shared folder setup will not be complete. It is recommended to power down the virtual machine and fix the shared folder settings while the machine is not running." 

and when I ignore this above error, Ubuntu Machine could not started and show this error Oh no something went wrong. A problem has occurred and system can't recovered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@saarshah @Troublor and others