Blog posts 2023 7 minute read
Published: July 23, 2023
Anonymize Ethereum with Bitcoin methods Ethereum Architecture Ethereum stores state and account balance directly Smart contractsEach smart contract is identified by an Ethereum address Written in solidity Blockchain 8 minute read
Published: July 15, 2023
Ethereum Accounts 20-byte address A state -> state’ = transaction of information or value between account Contain 4 fieldsNonce: Counter that make sure the transaction can be processed once Ether balance Contract code (for contract account) Storage Type of accountsExternally owned accountsControlled by private keys Can send messages by creating and signing transaction Contract accountsControlled by contract code Code is activate when message is received Code could read/write to internal storage or create a message or contract in returnContract An autonomous agent the live inside the Ethereum environment Execute a specific code when “triggered”Transaction and message Transaction
- A sign data package that store a message to be sent from an externally owned account STARTGAS
and GASPRICE
are to prevent infinite loop by limiting the number of computation stepsgas
is dependent on the amount of computation and capacity of dataTransaction containRecipient message Signature of the sender Amount of ether to be transfer Data field(optional) STARTGAS - Maximum allowed computation steps GASPRICE - Fees pays by the sender per computational steps(gas )Messages Messages
is like transaction except it is produced by a contractMessages contain the sender, recipient, amount of ether being sent, data field(optional), STARTGAS
Ethereum state transition function Validate the transaction Calculate the transaction fee STARTGAS
* GASPRICE
Subtract the fees from the sender’s account balance and increment the sender’s nonce Transfer the transaction value from sender to recipient.If recipient don’t exist. Create a new account If it’s a contract account, run the contract’s code until completion or run out of gas If ran out of gas or the sender don’t have efficient fund. Revert all state changes except the payment of the fees . Otherwise, refund the remaining gas to the sender. Fees are send to the sender Example of transition function (Send 10eth, 2000 gas, 0.001 ether gasprice and 64 bytes of data)Data being sent:byte[0:31] = 2 byte[32:63] = “CHARLIE” 4 minute read
Published: July 08, 2023
Content [TOC]
5 minute read
Published: July 01, 2023
What is blockchain? What is a block?
Persistent, immutable and append-only data structure Block used as currency tracksUser transactions Timestamp Reference A block (besides the genesis block) is tied to it’s previous block in a cryptographic way Each block containsHeader One or more user’s transactions ![Simplified Bitcoin Blockchain]