
Hacking With Fuel & Sway @ ETH Denver 2023
It’s no secret that I’ve been in a real groove with Rust and Rust-based domain specific languages lately. For ETH Denver this year, I had the pleasure of extensively using the Sway programming language to create a decentralized bounty board. Sway is a rust-based DSL for smart contracts using the Fuel Virtual Machine runtime. Despite some wide architectural differences between the EVM and FVM, such as having a UTXO based model, most of the expressions I find myself accustomed to were readily a...

Hacking With Fuel & Sway @ ETH Denver 2023
It’s no secret that I’ve been in a real groove with Rust and Rust-based domain specific languages lately. For ETH Denver this year, I had the pleasure of extensively using the Sway programming language to create a decentralized bounty board. Sway is a rust-based DSL for smart contracts using the Fuel Virtual Machine runtime. Despite some wide architectural differences between the EVM and FVM, such as having a UTXO based model, most of the expressions I find myself accustomed to were readily a...

Merkle Trees - Proofs
[Cover Photo by Quangpraha] Last time in part 2, we want on an adventure in discovering how we build up a Merkle tree from its children nodes all the way to the root. Now, we have the ever-so-fun task of generating the proof for the tree structure, so that we may then prove whether or not an element is contained in the set. Recall that in my code, I included a special data structure called a HashMap with the Node struct. Each node is linked to their neighbors with this mapping as one another’...

Merkle Trees - Proofs
[Cover Photo by Quangpraha] Last time in part 2, we want on an adventure in discovering how we build up a Merkle tree from its children nodes all the way to the root. Now, we have the ever-so-fun task of generating the proof for the tree structure, so that we may then prove whether or not an element is contained in the set. Recall that in my code, I included a special data structure called a HashMap with the Node struct. Each node is linked to their neighbors with this mapping as one another’...

Merkle Trees - Tree Algorithm
[cover photo by Felix Mittermeier] Last time, we discussed a high-level overview of Merkle trees including the components, how they are constructed, and a couple different context dependent ways to traverse them. This time, we are going into depth about how we make Merkle trees, featuring the rust language.Photo by PixabaySo, we know what a tree-like structure looks like and the different parts thereof. Every tree begins as a vector of Leafs. Each of these Leafs are hashed to form leaf nodes,...

Merkle Trees - Tree Algorithm
[cover photo by Felix Mittermeier] Last time, we discussed a high-level overview of Merkle trees including the components, how they are constructed, and a couple different context dependent ways to traverse them. This time, we are going into depth about how we make Merkle trees, featuring the rust language.Photo by PixabaySo, we know what a tree-like structure looks like and the different parts thereof. Every tree begins as a vector of Leafs. Each of these Leafs are hashed to form leaf nodes,...

Merkle Trees - Overview
[Cover photo by Mali Maeder] Data structures such as Merkle Trees are critical to how blockchain data integrity and make read/write times quicker.Merkle trees have a few different components: roots, nodes, and leafs. Leafs are located at the base of the structure: they contain the hashes of the original information in the dataset. They are hashed together in pairs to form the first layer of non-leaf nodes.For example, in the tree above, this bottom most layer is comprised of leafs. Leaf hash ...

Merkle Trees - Overview
[Cover photo by Mali Maeder] Data structures such as Merkle Trees are critical to how blockchain data integrity and make read/write times quicker.Merkle trees have a few different components: roots, nodes, and leafs. Leafs are located at the base of the structure: they contain the hashes of the original information in the dataset. They are hashed together in pairs to form the first layer of non-leaf nodes.For example, in the tree above, this bottom most layer is comprised of leafs. Leaf hash ...

Reentrancy Exploits: Contract States and Fallback Functions
Introduction“Ethereum is a deterministic but practically unbounded state machine, consisting of a globally accessible singleton state and a virtual machine that applies changes to that state.” (ME 39). A state machine, formally, is “nothing more than a binary relation on a set”, where elements of the set are known as states; however, it may best be understood as an “abstract model of step-by-step processes” (MCS 167). On Ethereum specifically, state is one giant data structure known as a hexa...

Reentrancy Exploits: Contract States and Fallback Functions
Introduction“Ethereum is a deterministic but practically unbounded state machine, consisting of a globally accessible singleton state and a virtual machine that applies changes to that state.” (ME 39). A state machine, formally, is “nothing more than a binary relation on a set”, where elements of the set are known as states; however, it may best be understood as an “abstract model of step-by-step processes” (MCS 167). On Ethereum specifically, state is one giant data structure known as a hexa...