r/EmuDev•
CryptoTrade_com

Seeking devs for TRON VM debugger

Hi, someone recommended to post here about a project I'm looking to do, thinking people here should have the right skills/knowledge I could use.

I'm looking to make a bytecode level debugger for the Solidity language (TRON version) running on the TRON Virtual Machine (TVM) but also on Ethereum. The primary use case for this is security auditing smart contracts.

Background

What is a smart contract?

A smart contract is a computer program stored on a blockchain that runs in transactions and is designed to handle transfer of funds/tokens between parties according to the business logic (contract) it implements.

How does the TRON/Ethereum Virtual Machine work?

The TVM and EVM are stack based bytecode virtual machines that process 256-bit words, with an added 'memory', which disappears between smart contract calls, and 'storage', a key-value store that is persisted forever on the blockchain. Each VM instruction consumes varying amounts of 'gas' (on Ethereum) or 'energy' (on TRON) to execute, depending on its complexity or storage requirements.

Each smart contract is initialized by running constructor bytecode on the VM which prepares the program bytecode in memory, then the contract is assigned an address used to identify it on the blockchain forever (unless it is self destructed). A few low addresses represent so called 'precompiled contracts' that perform specialized functions such as elliptic curve cryptography and don't actually run on the VM. After a smart contract is created, publicly accessible functions within the contract can be called according to the ABI (which is published in the case of TRON) and along with a call an amount of funds can optionally be attached to be consumed by the contract. The design of the TVM/EVM allows smart contracts to call each other using funds they possess, using a variety of mechanisms affecting how the call is performed (e.g. whether it uses callee or caller's storage).

A summary of the bytecodes for the EVM can be found here. The TVM has additional instructions used for the transfer of TRC10 tokens (alternatives to the main TRX cryptocurrency of the blockchain). There are also extra instructions not found there, known as the Constantinople feature set.

What is Solidity?

Solidity is the current language used to program and compile smart contracts. It is fairly specialized and has a built in assembler for advanced coding.

What am I looking for?

I am looking for people who are able to provide any assistance on this project, including giving advice on how best to go about putting together a highly usable debugger, managing the project, and full blown getting stuck in with the development.

Why would you want to get involved?

I believe this project will give you great experience in blockchain and Distributed Ledger Technology. Also, I am willing to pay 100TRX per hour to work on this project. (I know, it's not much at current prices... they used to be worth 30 cents each!)

What is the tech stack?

I am looking to do this project in C++ and Qt, and I want the VM implementation to be clean implemented (the actual TVM implementation is in Java). Apart from that I'm open to suggestions.

Any questions?

I'm sure you have loads... Please ask away!

Posted May 14, 2019, 11:04 AM UTC

06
Loading comments…