ETH

¡Supera tus tareas y exámenes ahora con Quizwiz!

What APIs does it have?

(eth, web3, net, miner these are default), personal, shh, debug, txpool

Proof of Work

- A consensus distribution algorithm that requires an active role in mining data blocks, often consuming resources, such as electricity - The more 'work' you do or the more computational power you provide, the more coins you are rewarded with

Name ways contracts can interact

A contract can invoke, create, and inherit other contracts

What is a blockchain?

A digital ledger that consists of a system fo blocks that are cryptographically encrypted records of various transactions. It is decentralized, so ti can provide security, permanence, transparency, and immutability. Each block contains references to the previous block on the chain.

What is a smart contract?

Computer code that could be compiled from multiple languages (solidity, vyper). They live on the network and enforce rules and perform state changes.

Define byzantine fault tolerance

Consensus algorithm where messages can be sent and confirmed cryptographically

Why would you use a private network?

Data privacy, distributed database, permissions control and testing

How do you determined how much gas is used?

EVM op codes have different fixed amounts

Explain calldata

Similar to a callstack, temporary, non-modifiable, and it stores evm execution data

What is "etherbase"?

The account that receives mining awards

What node does metamask use?

infura.io

Explain memory

temporary storage that is lost once contract execution terminates. you need to use the memory keyword, otherwise it will reference memory

Higher the gas price...

the more likely a transaction is to be mined

What is the average block time in Ethereum?

~14 seconds

Most common vulnerabilities

-Private information and randomness -re-entrancy - gas limit and loops - sending and receiving ether (make sure to use checks effects pattern) -tx.origin (use msg.sender instead)

What is the conversion of Wei To Ether?

10^18 wei = 1 ETH

What do you need to recover Ethereum account?

12 word mneumonic

What is the average block size in ethereum?

2kb (but it depends)

When would you use remix?

For testing and deploying lightweight contracts

Where are transactions recorded?

Public ledger

Can you mine with geth?

Yes, via --mine option

What is web3.js?

a javascript library that provides functions to interact with nodes on the ethereum blockchain

Name kinds of solidity functions

constructor, fallback functions, constant functions, functions that modify state

What is a node?

A computer that is connected to a network that processes transactions

Explain storage in contracts

Each contract manages its own storage variables. It's a key-value datastore. More read and writes === more costly

How is a transaction fee calculated?

Gas price * gas used

What is Geth?

An Ethereum cli client

ERC20 vs ERC721

Both are standards for implementing Ethereum token contracts - 721 each token is unique

Why use truffle?

Build in smart contract compilation, linking, and deployment. Automated testing. Makes it easy to deploy to specific networks.

Where are geth client accounts stored?

In the keystore directory

What does the EVM use to run a smart contract?

It uses a contract's bytecode which is compiled from languages like solidity

What are ways to connect to a geth node?

JSON-RPC

Purpose of BigNumber library?

Javascript doesn't handle big numbers correctly

Name different ETH networks

Live Network (Main), Test Networks (Ropsten, Kovan, Rinkeby) and Private Networks. Could be public, private, or consortium.

What does ecrecover do?

Recovers a public key address from an elliptic curve signature

Define solidity

Statically typed High-level language (types are known at compilation) that compield to bytecode

What do you need to interact with a contract from a dApp?

The contracts ABI and bytecode


Conjuntos de estudio relacionados

AP Psychology (Unit 5 Progress Check)

View Set

UNIT 5: MENTAL HEALTH AND COMMUNITY ISSUES

View Set

Chapter 5: Lesson 2 Egypt & Kush

View Set

CIT226 Win Server Management Exam Chapters 1 - 3

View Set

FILIPINO - PANGUNGUSAP NA WALANG PAKSA

View Set

IB Biology HL - Unit 3: Cellular Biology

View Set