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
Q

Registry (Avaialable)

A

Available at runtime to all participants

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

Address Book

A

Used to manage ethereum strings of Hex.

A managed wallet.
A particular token.
A verified instance of a contract.

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

Address Book (How it works)

A

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.

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

Testing

A

Truffle is an automated testing framework to test msart contracts.

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

Ways to write a test

A

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.

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

Encryption

A

The use of a key to encode information so that it cannot be read by nodes without the corresponding decryption key.

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

Components of smart contract

A

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
Q

Testing Steps

A
  1. Writing
  2. Compiling
  3. Testing
  4. Deploying
  5. Monitoring
33
Q

Truffle

A

Development framework for smart contracts.

Simplifies development.

34
Q

Benefits of Truffle

A

Automation: automates compiling, deployment, and testing

Testing: Provides testing frameworks (Mocha/Chai)

Migration: Helps manage contract migrations.

35
Q

Gas

A

Gas is the unit that measures the computational work required to execute transactions and smart contracts on ethereum.

36
Q

Gas (How it works)

A

Each operation costs a certain amount of Gas.

Users pay gas (Ether) to incentivize miners to process transactions.

37
Q

Gas Limit and price

A

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
Q

Artifacts.required()

A

Helps JavaScript code find and interact with a specific smart contract that you’ve already compiled.

39
Q

GET

A

Retrieves data from the server

40
Q

GET Example

A

Querying the balance of a wallet

41
Q

POST

A

Sends data to the server to create a new resource

42
Q

POST Example

A

Submitting a transaction in a smart contract

43
Q

PUT

A

Updates an existing resource on the server

44
Q

PUT Example

A

Updating user data in a DApp’s backend Service

45
Q

DELETE

A

Removes a resource from the server

46
Q

DELETE Example

A

Removes the users account from the DApp’s backend

47
Q

HttpResponseMessage

A

Represents a complete HTTP response, including status, headers, and data

48
Q

HttpResponseMessage Example

A

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
Q

IHttpActionResult

A

Defines the result of an action methon in an API. Offfers more flexibility for formatting the response

50
Q

IHttpActionResult Example

A

After querying a user’s account balance, IHttpActionResult is used to return the response in a structure JSON Format

51
Q

HttpResponseResult

A

A simpler version of a response returning only the essential data (Scuess, Transaction ID etc.)

52
Q

HttpResponseResult Example

A

A DApp uses HttpResponseResult to return a 200 OK with just the transaction ID after a successfult Token Transfer

53
Q

Void

A

A request that performs an operation without returning data, commonly used in DELETE or POST requests to update or delete resources.

54
Q

Void Example

A

Instead of sending back the transaction ID, the DApp could return a 204 No Content if only confirmation of success is needed

55
Q

404

A

Not Found

Requested resource could not be found on the server

56
Q

404 Example

A

Requesting data for a non-existent smart contract

57
Q

401

A

Unauthorized

Request was unsuccessful due to invalid credentials

58
Q

401 Example

A

Requesting data from a server with an incorrect URL, or a revoked API Key

59
Q

200

A

OK

The request was sucessful and the server returned the requested data

60
Q

200 Example

A

Successfully fetching a user’s token balance from the DApp

61
Q

429

A

Too Many Requests

Client has sent too many requests to the server within a given time frame

62
Q

429 Example

A

Exceeding a client Bandwidth limit, or Daily per-user limits

63
Q

XML and JSON

A

structured data formats to transfer information between clients and servers

64
Q

XML

A

Markup language that uses tags to define elements

65
Q

XML Features

A

Self-descriptive, allowing complex data structures

Commonly Used in Older or Legacy Systems

66
Q

JSON

A

lightweight data format that uses key-value pairs

67
Q

JSON Features

A

Easier to Parse and read than XML

Default format for most modern APIs and blockchain interactions

68
Q

Cloud Regions

A

distinct geographical areas where cloud providers operate data centers

69
Q

Cloud Zones

A

The datacentre within a specific Cloud Region

70
Q

CAP

A

Consistency,
Availability,
Partition Tolerance

71
Q

What is CAP Theory

A

CAP theory states that a distributed system can achieve at most two out of three guarantees:

Consistency,
Availability,
Partition Tolerance

72
Q

Consistency

A

Every read recieves the most recent write or an error. Meaning all nodes see the same data at the same time.

73
Q

Consistency Relevance

A

Ensures all users see most up-to-date state

Difficult to achieve due to decentralized nature of DApps

74
Q

Availability

A

Every request recieves a (non-error) reponse regardless of the individual nodes state

75
Q

Availability Relevance

A

DApps must ensure high availability, meaning the system should be able to process transactions, even if some nodes are down or delayed.

76
Q

Partition Tolerance

A

System continues to operate despite arbitrary partitioning (communication breaks) in the network.

77
Q

Partition Tolerance Relevance

A

The system needs to function even when parts of the network can’t communicate with each other.