Setups

Practical Byzantine Fault Tolerance (PBFT) Algorithm

  1. Phase 1 [Request]: Client, Miners, Validators, Verifiers sends a request to the Primary aggregator node.

  2. Phase 2 [Pre-Prepare]: The Primary node broadcasts a PRE-PREPARE message to all the Aggregator nodes.

  3. Phase 3 [Prepare]: The Aggregator nodes validate the PRE-PREPARE message, and upon validation, they broadcast a PREPARE message to all the Aggregator nodes.

  4. Phase 4 [Commit]: After receiving (2f) PREPARE messages from different nodes, the Aggregator nodes broadcast a COMMIT message.

  5. Phase 5 [Reply]: After receiving (2f+1) COMMIT messages from different nodes, the Aggregator nodes apply the operation and send a REPLY message to the Client, Miners, Validators, Verifiers.

  6. Phase 6 [Result Acceptance]: The Client, Miners, Validators, Verifiers accept the operation result after receiving (f+1) identical REPLY messages from different Aggregator nodes.

During our simulation, we used crypto/x509 and encoding/pem, for facilitating the digital signatures and SHA-256 for hashing algorithm.

Additional Technical Specifications

  • SHA-256 Hash: For any hashing needs, the SHA-256 algorithm is used which produces a 256-bit (32-byte) hash.

  • RSA-2048 Signature: RSA-2048 is used for signatures, meaning the size of a signature would be equal to the size of the key, i.e., 2048 bits or 256 bytes.

  • String Fields: Assuming a UTF-8 encoding which is common in Go, a string uses 1 byte per character for most common characters, although some characters can use more.

In MintAI genesis, we can analyze the approximate size of orders, validations, and challenges, depending on their respective fields. The order structure, consisting of reward, type, time, link, and a signature fields, costs approximately 312 bytes plus the size of varying fields. The Validation structure is made up of mID, score, vStake, and signature fields, costing approximately 304 bytes. The Challenge structure includes vID, cStake, and a signature fields, costing around 296 bytes. These sizes are necessary considerations when simulating the system's throughput, as they affect aspects such as ledger synchronization speeds and bandwidth requirements.

Size in bytes of orders, validations and challenges

Data StructureFieldSize (bytes)Notes

Order

reward

8

Size of float64

type

varies

Assuming 10 bytes for a string of length 10

time

8

Size of int64

link

varies

Assuming 30 bytes for a string of length 30

sig

256

Size of RSA-2048 signature

Total

~312

Plus the size of varying fields

Validation

mID

32

Size of SHA-256 hash

score

8

Size of float64

vStake

8

Size of float64

sig

256

Size of RSA-2048 signature

Total

~304

Challenge

vID

32

Size of SHA-256 hash

cStake

8

Size of float64

sig

256

Size of RSA-2048 signature

Total

~296

We can also categorize networks into three sizes: small, medium, and large. Small networks consist of up to 10 nodes, used in cases such as sample or demo networks. Medium-sized networks, with 10 to 30 nodes, represent moderately distributed systems that could span across several geographical regions or countries. Large networks, with more than 30 nodes, represent global systems such as Chainlink. For our analysis, we focus on the PBFT's synchronization time within the designed MAN structure, excluding considerations of network connection and data transfer latencies.

Last updated