Total Flashcards

1
Q

REST

A

Representation State Transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

REST Use Case

A

Used in DApps for retrieving blockchain data

Triggering smart contract actions form front end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SOAP

A

Simple Object Access Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SOAP Use Case

A

Less common in modern apps but still used in legacy systems requireing strict message security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

RPC

A

Remote Procedure Call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Local Use Case

A

Often used for communication between software components on the same machine, like desktop applications accessing system resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

RPC Use Case

A

Common in DApps to interact with smart contracts on blockchain nodes, facilitating communication across distributed systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

API Acronym

A

Application Programming Interface (API)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

API Purpose

A

APIs enable decentralised applications (DApps) to interact with blockchains and off-chain systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Advantages of API’s

A

Modularity
Scalability
Reusability
Security
Interoperability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How API’s work

A

Act as intermediaries between clients (e.g., frontend apps) and servers. Clients send requests in a predefined format; APIs process these and return responses, often in JSON or XML, enabling seamless data exchange between systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Modularity

A

Allow modular development by separating backend and frontend components, enabling faster, independent development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Scalability

A

APIs make it easier to scale applications by allowing microservices to interact seamlessly, improving performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Reusability

A

APIs enable code reuse, allowing developers to use existing functionality without building from scratch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Security

A

APIs often include authentication and authorization, ensuring secure access to data and services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Interoperability

A

APIs facilitate communication between different platforms, devices, or services, allowing integration across systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Whats is Blockchain

A

distributed database that maintains a growing list of ordered records called blocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How are Blocks linked

A

Uisng cryptography. Each block contains a hash of the previous block, a timestamp, and transaction data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Smart Contract

A

Self-Executing contract with terms directly written into code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Smart Contract (Automation?)

A

Automatically enforces rules and conditions once pre-defined criteria are met

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Key Features

A

Automation: Transactions occur based on pre-defined rules.
Immutable: Once deployed, can’t be altered
Decentralised: Contracts run on a blockchain, eliminating intermediaries
Transparetn and Secure: Data is visible but tamper proof, due to the blockchain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Workflow

A

1: Written in solidity and deployed in ethereum
2: Listens for external events
3: Wehn conditions are met. Contract automatically executes its functions
4: Result is recorded on blockchain, ensuring transparency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Registry

A

when a contract is promoted to an environment it is installed in the smart contract registry that is shared between all participants

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Registry (Contains)

A

bytecode,
ABI,
developer Docs,
critical information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Registry (Avaialable)
Available at runtime to all participants
26
Address Book
Used to manage ethereum strings of Hex. A managed wallet. A particular token. A verified instance of a contract.
27
Address Book (How it works)
when a new instance of a contract is detected it is added to the book with a link to the contract. all instances of a contract are listed and a REST API for each os auto-generated. REST API can be used from any node.
28
Testing
Truffle is an automated testing framework to test msart contracts.
29
Ways to write a test
Javascript and Typescript: for testing contracts from the outside world Solidity: for testing your contracts in advanced bare-to-the-metal scenarios. All files in ./test directory Truffle will only run .js, .ts, .es, .es6, .jsx, and .sol.
30
Encryption
The use of a key to encode information so that it cannot be read by nodes without the corresponding decryption key.
31
Components of smart contract
Pragma directive: solidity compiler version. Contract Definition: Basic buildign block State variables: variables Functions: Blocks of code defining the operations and logic Modifiers: custom conditions used to modify behaviour of functions Events: logging mechanisms Fallback and Receive: Special functions to handle Ether transfers Data Types: Defines the type of variables
32
Testing Steps
1. Writing 2. Compiling 3. Testing 4. Deploying 5. Monitoring
33
Truffle
Development framework for smart contracts. Simplifies development.
34
Benefits of Truffle
Automation: automates compiling, deployment, and testing Testing: Provides testing frameworks (Mocha/Chai) Migration: Helps manage contract migrations.
35
Gas
Gas is the unit that measures the computational work required to execute transactions and smart contracts on ethereum.
36
Gas (How it works)
Each operation costs a certain amount of Gas. Users pay gas (Ether) to incentivize miners to process transactions.
37
Gas Limit and price
Limit: the amount of gas a user is willing to spend Price: the amount a user is willing to pay in ether for each unit of Gas
38
Artifacts.required()
Helps JavaScript code find and interact with a specific smart contract that you’ve already compiled.
39
GET
Retrieves data from the server
40
GET Example
Querying the balance of a wallet
41
POST
Sends data to the server to create a new resource
42
POST Example
Submitting a transaction in a smart contract
43
PUT
Updates an existing resource on the server
44
PUT Example
Updating user data in a DApp's backend Service
45
DELETE
Removes a resource from the server
46
DELETE Example
Removes the users account from the DApp's backend
47
HttpResponseMessage
Represents a complete HTTP response, including status, headers, and data
48
HttpResponseMessage Example
After a user calls a function on a smart contract to trasfer token, the DApps API returns an HttpResponseMessage with a 200 status and transacation hash
49
IHttpActionResult
Defines the result of an action methon in an API. Offfers more flexibility for formatting the response
50
IHttpActionResult Example
After querying a user's account balance, IHttpActionResult is used to return the response in a structure JSON Format
51
HttpResponseResult
A simpler version of a response returning only the essential data (Scuess, Transaction ID etc.)
52
HttpResponseResult Example
A DApp uses HttpResponseResult to return a 200 OK with just the transaction ID after a successfult Token Transfer
53
Void
A request that performs an operation without returning data, commonly used in DELETE or POST requests to update or delete resources.
54
Void Example
Instead of sending back the transaction ID, the DApp could return a 204 No Content if only confirmation of success is needed
55
404
Not Found Requested resource could not be found on the server
56
404 Example
Requesting data for a non-existent smart contract
57
401
Unauthorized Request was unsuccessful due to invalid credentials
58
401 Example
Requesting data from a server with an incorrect URL, or a revoked API Key
59
200
OK The request was sucessful and the server returned the requested data
60
200 Example
Successfully fetching a user's token balance from the DApp
61
429
Too Many Requests Client has sent too many requests to the server within a given time frame
62
429 Example
Exceeding a client Bandwidth limit, or Daily per-user limits
63
XML and JSON
structured data formats to transfer information between clients and servers
64
XML
Markup language that uses tags to define elements
65
XML Features
Self-descriptive, allowing complex data structures Commonly Used in Older or Legacy Systems
66
JSON
lightweight data format that uses key-value pairs
67
JSON Features
Easier to Parse and read than XML Default format for most modern APIs and blockchain interactions
68
Cloud Regions
distinct geographical areas where cloud providers operate data centers
69
Cloud Zones
The datacentre within a specific Cloud Region
70
CAP
Consistency, Availability, Partition Tolerance
71
What is CAP Theory
CAP theory states that a distributed system can achieve at most two out of three guarantees: Consistency, Availability, Partition Tolerance
72
Consistency
Every read recieves the most recent write or an error. Meaning all nodes see the same data at the same time.
73
Consistency Relevance
Ensures all users see most up-to-date state Difficult to achieve due to decentralized nature of DApps
74
Availability
Every request recieves a (non-error) reponse regardless of the individual nodes state
75
Availability Relevance
DApps must ensure high availability, meaning the system should be able to process transactions, even if some nodes are down or delayed.
76
Partition Tolerance
System continues to operate despite arbitrary partitioning (communication breaks) in the network.
77
Partition Tolerance Relevance
The system needs to function even when parts of the network can't communicate with each other.