Connect with us

News

Impostazione di un ambiente di sviluppo per Blockchain

Chain Feed Staff

Published

on

Impostazione di un ambiente di sviluppo per Blockchain

1. Introduzione

Blockchain sta guadagnando popolarità e si sta sviluppando oggi grazie alla sua promessa di innovazione e decentralizzazione. Sebbene possa sembrare affascinante dall’esterno, immergersi senza un ambiente ben configurato è altrettanto scoraggiante. Ma non preoccuparti: ci pensiamo noi!! Questo articolo si addentra nella nicchia della blockchain, fornendo guide dettagliate e approfondimenti su misura per gli interessi e le esigenze degli sviluppatori di blockchain. Preparati a esplorare il mondo della blockchain con questo entusiasmante viaggio!!

2. Scegliere gli strumenti giusti

Durante la configurazione del tuo ambiente, è essenziale scegliere gli strumenti giusti in base ai tuoi interessi e requisiti. Di seguito sono riportati gli strumenti e gli editor che puoi esplorare.

Sistema operativo:

È possibile sviluppare applicazioni blockchain su qualsiasi sistema operativo, ma macOS e Linux sono preferibili per una migliore compatibilità e supporto.

Linux: Linux è gratuito e open source e offre flessibilità e personalizzazione. Ha un ampio supporto della comunità e risorse ricche. Ci sono distribuzioni popolari di Linux che sono ampiamente utilizzate. Una è Ubuntu, che è ideale per i principianti, e le altre sono Fedora e Debian. La maggior parte dei progetti di strumenti blockchain sono realizzati con Linux al centro.

Mac OS: MacOS è simile a Linux; è basato su Unix e ha somiglianze nell’esperienza degli strumenti della riga di comando e nell’ambiente di sviluppo. L’integrazione di hardware e software è perfetta. Inoltre, ha un ottimo supporto nativo, come Homebrew, Xcode e Docker.

Finestre: Puoi comunque usare Windows con WSL (Windows Subsystem for Linux), questo ti consente di eseguire Linux insieme a Windows. Questo ti dà il meglio di entrambi i mondi, familiarità con Windows e i potenti strumenti di Linux.

Tabella delle differenze tra OS/Mac/Linux

1.Editor di codice/IDE:

Un buon editor di codice o IDE può renderti molto più produttivo. Ecco alcune opzioni a cui pensare:

  • Codice VSC: È piuttosto leggero e ha fantastici componenti aggiuntivi per diversi linguaggi di programmazione e framework blockchain.
  • IDEA di IntelliJ: Questo è potente e molto utile se si ha a che fare con progetti blockchain Java.
  • Testo sublime: È veloce e puoi modificarlo molto. È fantastico se ti piace mantenere le cose semplici.

2.Sistemi di controllo delle versioni:

Il controllo delle versioni è estremamente importante per qualsiasi progetto in cui si stia creando qualcosa. Git, insieme a siti Web come GitHub o GitLab, ti aiuta a gestire bene il tuo codice, a lavorare con altre persone e a tenere d’occhio cosa cambia. Questi strumenti semplificano la gestione della tua base di codice, la collaborazione con altri e il rimanere aggiornati su tutti gli aggiornamenti.

3. Installazione del software essenziale

Linguaggi di programmazione

Ecco i passaggi di installazione per i linguaggi comuni utilizzati nello sviluppo blockchain

JavaScript/TypeScript:

Pitone:

Andare:

Ruggine:

Portare:

Docker aiuta a creare ambienti di sviluppo coerenti.

  • Passaggi di installazione per Docker.

4. Framework e strumenti per lo sviluppo di blockchain

Il General Setup comprende vari strumenti e librerie che supportano la blockchain indipendentemente dalla blockchain specifica. Ci sono strumenti come Truffle e Hardhat che forniscono un ambiente di sviluppo completo.

  1. Hyperledger Fabric: uno speciale sistema blockchain pensato per le grandi aziende.
  2. Tendermint: uno strumento blockchain veloce che supporta i metodi Byzantine Fault Tolerant (BFT) per concordare le cose.

Containerizzazione e Virtualizzazione:

Docker aiuta a mantenere la configurazione del tuo lavoro uguale su computer diversi. Puoi creare contenitori Docker con tutte le dipendenze di cui hai bisogno, il che semplifica la configurazione e la rimozione delle aree di lavoro.

5. Impostazione di reti blockchain locali

Ecco alcuni strumenti generali utili per gestire ed eseguire la blockchain locale:

Docker Compose: Docker Compose è utilizzato per definire ed eseguire applicazioni Docker multi-contenitore. Utilizza un file docker-compose.yml. Ecco i passaggi di installazione per lo stesso:

Kubernetes: un sistema open source per automatizzare la distribuzione, il ridimensionamento e la gestione di applicazioni containerizzate. Ecco i passaggi di installazione per Kubernetes:

File Yaml:

Distribuisci:

La configurazione del nodo locale è utile per testare la tua applicazione in un ambiente controllato. Ecco i passaggi per la configurazione:

Le macchine virtuali ti aiutano a sperimentare con le tue applicazioni senza influenzare l’ambiente locale. Aggiunge anche un ulteriore livello di astrazione.

6. Sviluppo di contratti intelligenti

Lingue comuni:

  • Gli smart contract sono generalmente scritti in Solidity e Rust:
  • Solidity: ecco come puoi installare Solidity:
npm install -g solc
solc –versione

Ruggine:

rustup target aggiungi wasm32-sconosciuto-sconosciuto

Compilatori e linter:

I compilatori e i linter sono gli strumenti utilizzati per scrivere smart contract di alta qualità. I ​​compilatori ti aiutano a compilare il codice in modo da poterlo distribuire ulteriormente sulla blockchain.

Ecco i passaggi per compilare un contratto:

1. Solidità:

solc –bin –abi –optimize -o build/ IlTuoContratto.sol
Crea un file .solhint.json

{
“estende”: “solhint:consigliato”,

“regole”: {

“rientro”: [“error”, 4],

“citazioni”: [“error”, “double”] }}

2. Ruggine:

Installa Clippy: componente rustup aggiungi clippy

Crea un file Clipy.toml[clippy]warnings_as_errors = vero

Scrivere contratti intelligenti

Durante la scrittura di uno smart contract dovresti tenere a mente le linee guida e le best practice da seguire:

  • Assicurati che il tuo codice sia modulare e riutilizzabile
  • Eseguire audit di sicurezza
  • Garantire l’efficienza del gas per ridurre i costi di transazione
  • Eseguire test approfonditi
  • Documenta correttamente il tuo codice
  • Utilizzare le librerie SafeMath
  • Controllare sempre i valori di ritorno e gli errori
  • Evita di codificare i valori nel tuo contratto
  • Segui uno stile di codifica coerente
  • Implementare meccanismi di controllo degli accessi
  • Aggiornare regolarmente le dipendenze
  • Utilizzare gli eventi per la registrazione
  • Utilizzare le librerie standard.
  • Utilizzare portafogli multifirma
  • Avere un piano di manutenzione a lungo termine del contratto.

7. Test e debug

Framework di test:

  • Il testing è il pilastro finale e più forte di qualsiasi sviluppo. Mocha e Chai sono essenziali per testare i contratti in JavaScript. Mocha è un framework di test e Chai è una libreria di asserzioni, entrambi all’unisono per aiutare nell’esecuzione dei test e nella scrittura di asserzioni di test. Waffle è un framework di test che si integra perfettamente con Hardhat. Fornisce capacità di test avanzate e ha asserzioni complete.

Strumenti di debug:

  • Il debugging consiste nel trovare i bug e correggerli nel tuo codice. Alcuni strumenti aiutano in questo. Strumenti come Remix, GDB sono usati per il debug.

Test continuo:

Testare tutto il tempo è estremamente importante quando si crea software oggigiorno. Garantisce che il codice venga controllato e convalidato ripetutamente dalle macchine. Quando si utilizzano strumenti che aiutano con Continuous Integration (CI) e Continuous Deployment (CD), è possibile impostare un sistema che esegue test da solo ogni volta che qualcuno modifica il codice. Ciò aiuta a trovare problemi e mantiene il codice valido.

8. Strumenti di distribuzione

Strategie di distribuzione generali:

  • Ecco alcune strategie generali di distribuzione:
  1. Distribuzione locale: La distribuzione viene eseguita localmente e in modo controllato utilizzando strumenti come Ganache e Docker.
  2. Distribuzione della rete di prova: Questo viene fatto per testare l’applicazione in un ambiente reale, senza risorse reali.
  3. Distribuzione della rete principale: Questo è un passaggio cruciale in cui si esegue il deployment sulla rete principale in cui si verificano asset e transazioni reali. Questo deployment richiede test approfonditi prima di essere distribuito.
  4. Distribuzione automatizzata: Utilizzare pipeline CI/CD per l’implementazione di automazione e ripetizione.

Scripting e automazione:

Ecco come scrivere script per l’automazione:

Script per elmetto:

Utilizzo dei servizi cloud:

L’implementazione di nodi blockchain e smart contract tramite servizi cloud fornisce semplicità, affidabilità e scalabilità. Possiamo utilizzare i seguenti servizi cloud:

Servizi Web di Amazon:

  • AWS è un servizio cloud gestito da Amazon, utile per la configurazione di istanze EC2 per l’esecuzione di nodi. Possiamo distribuire contratti intelligenti utilizzando AWS lambda per l’esecuzione senza server.

Azzurro

Azure Blockchain Service ti aiuta a gestire le reti blockchain. Puoi usare Azure Functions o Azure DevOps per mettere in azione la tua blockchain e mantenerla aggiornata.

GCP

Kubernetes Engine (GKE) o Compute Engine di Google Cloud ti consente di configurare nodi blockchain. Google Cloud Functions e Cloud Build semplificano la configurazione della tua blockchain.

9. Connessione a reti esterne

1. Configurazione: Passaggi per la configurazione delle connessioni:

  • Configurazione di rete: imposta le configurazioni di rete in base alle tue esigenze. Ecco un esempio di Ethereum:
File Json:
{
“reti”: { “rete principale”: {

“url”: “https://mainnet.infura.io/v3/IL-TUO-ID-PROGETTO”,

“conti”: [“0xYOUR_PRIVATE_KEY”]

} }}

  • Variabili d’ambiente: utilizzare file .env e librerie come dotenv per gestire le variabili d’ambiente e archiviare in modo sicuro le informazioni di sicurezza e le chiavi private.

2. API e librerie:

  • L’utilizzo di API e librerie per interagire con reti esterne semplifica l’interazione. Ecco alcune API comunemente utilizzate:
Eteri.js

const { ethers } = require(“eteri”);const provider = new ethers.providers.InfuraProvider(“fattoria”,

“IL-TUO-ID-PROGETTO”);

Polka.jsconst
{ ApiPromise, WsProvider } = require(‘@polkadot/api’);

const provider = new WsProvider(‘wss://rpc.polkadot.io’);

const api = await ApiPromise.create({ provider });

Web3.js per ethereum:

const Web3 = require(‘web3’);

const web3 = new Web3(‘https://mainnet.infura.io/v3/ID-TUO-PROGETTO’);

Integrazione del portafoglio:

  • L’integrazione del wallet consente agli utenti di interagire con la blockchain tramite transazioni e interazioni. Ecco i passaggi per l’integrazione del wallet:

Metamaschera:

const provider = new ethers.providers.Web3Provider(window.ethereum);

Portafoglio Connect:

const WalletConnectProvider = require(“@walletconnect/web3-provider”);

const provider = new WalletConnectProvider({ infuraId: “IL-TUO-INFURA-ID” });

10. Integrazione e distribuzione continua (CI/CD)

Strumenti CI/CD generali:

  • Azioni GitHub: GitHub Actions consente di impostare CI/CD per blockchain.


Interfaccia a riga di comando di Travis:

Circle CLI: CircleCI è un altro modo per fare CI/CD che funziona bene con i progetti blockchain. CircleCI offre opzioni avanzate per far sì che la distribuzione avvenga in autonomia.

Test e distribuzione automatizzati:

  • La scrittura di flussi di lavoro per test e distribuzioni automatizzati garantisce la coerenza del codice e favorisce iterazioni rapide.
Prova:
test del casco npx

Distribuzione:
distribuzione del casco npx

11. Strumenti di sicurezza

La sicurezza è al centro del mondo blockchain, pertanto è essenziale garantire i migliori strumenti di sicurezza.
Pratiche di sicurezza generali:

  • Eseguire revisioni regolari del codice
  • Avere controlli di accesso precisi per le funzioni pubbliche e private
  • Effettuare controlli regolari

Strumenti di analisi statica:

  • Gli strumenti di analisi statica sono utili per identificare le vulnerabilità del nostro codice e correggerle. Alcuni strumenti utilizzati per lo stesso scopo sono Mythril e Slither.

Verifiche regolari:

Eseguire audit esterni e interni regolari e risolvere i problemi che si presentano prima che i contratti vengano sfruttati.

12. Buone pratiche

Struttura delle cartelle:

  • Mantenere una struttura delle cartelle corretta e pulita per un accesso organizzato e un ambiente ordinato nel progetto.

variabili ambientali

  • Utilizzare i file env e le librerie dotenv
  • Utilizzare strumenti di gestione dei segreti come AWS Secret Manager o Azure Key Vault.

Documentazione:

La documentazione del codice è importante tanto quanto la scrittura del codice stesso.

  • Mantieni un file README appropriato in modo che altri possano comprendere il tuo progetto
  • Aggiungere commenti nel codice ove necessario
  • Utilizzare le API wiki o di documentazione del progetto.

13. Conclusion

Possiamo concludere dicendo che impostare l’ambiente giusto è più importante della semplice creazione di applicazioni blockchain. L’impostazione dell’ambiente ha una checklist per selezionare gli strumenti giusti per configurare reti locali e distribuire contratti intelligenti. Seguendo i passaggi e le strategie menzionati in questo articolo puoi creare applicazioni efficienti, robuste e sicure. Imparare continuamente e modificare le cose per adattarle alle tue esigenze ti aiuterà a migliorare la tua configurazione e a crescere con essa, tenendoti al passo con i nuovi progressi nella tecnologia blockchain. Buona codifica!!

Fuente

We are the editorial team of Chain Feed Staff, where seriousness meets clarity in cryptocurrency analysis. With a robust team of finance and blockchain technology experts, we are dedicated to meticulously exploring complex crypto markets with detailed assessments and an unbiased approach. Our mission is to democratize access to knowledge of emerging financial technologies, ensuring they are understandable and accessible to all. In every article on Chain Feed Staff, we strive to provide content that not only educates, but also empowers our readers, facilitating their integration into the financial digital age.

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Información básica sobre protección de datos Ver más

  • Responsable: Miguel Mamador.
  • Finalidad:  Moderar los comentarios.
  • Legitimación:  Por consentimiento del interesado.
  • Destinatarios y encargados de tratamiento:  No se ceden o comunican datos a terceros para prestar este servicio. El Titular ha contratado los servicios de alojamiento web a Banahosting que actúa como encargado de tratamiento.
  • Derechos: Acceder, rectificar y suprimir los datos.
  • Información Adicional: Puede consultar la información detallada en la Política de Privacidad.

News

An enhanced consensus algorithm for blockchain

Chain Feed Staff

Published

on

An enhanced consensus algorithm for blockchain

The introduction of the link and reputation evaluation concepts aims to improve the stability and security of the consensus mechanism, decrease the likelihood of malicious nodes joining the consensus, and increase the reliability of the selected consensus nodes.

The link model structure based on joint action

Through the LINK between nodes, all the LINK nodes engage in consistent activities during the operation of the consensus mechanism. The reputation evaluation mechanism evaluates the trustworthiness of nodes based on their historical activity status throughout the entire blockchain. The essence of LINK is to drive inactive nodes to participate in system activities through active nodes. During the stage of selecting leader nodes, nodes are selected through self-recommendation, and the reputation evaluation of candidate nodes and their LINK nodes must be qualified. The top 5 nodes of the total nodes are elected as leader nodes through voting, and the nodes in their LINK status are candidate nodes. In the event that the leader node goes down, the responsibility of the leader node is transferred to the nodes in its LINK through the view-change. The LINK connection algorithm used in this study is shown in Table 2, where LINKm is the linked group and LINKP is the percentage of linked nodes.

Table 2 LINK connection algorithm.

Node type

This paper presents a classification of nodes in a blockchain system based on their functionalities. The nodes are divided into three categories: leader nodes (LNs), follower nodes (FNs), and general nodes (Ns). The leader nodes (LNs) are responsible for producing blocks and are elected through voting by general nodes. The follower nodes (FNs) are nodes that are linked to leader nodes (LNs) through the LINK mechanism and are responsible for validating blocks. General nodes (N) have the ability to broadcast and disseminate information, participate in elections, and vote. The primary purpose of the LINK mechanism is to act in combination. When nodes are in the LINK, there is a distinction between the master and slave nodes, and there is a limit to the number of nodes in the LINK group (NP = {n1, nf1, nf2 ……,nfn}). As the largest proportion of nodes in the system, general nodes (N) have the right to vote and be elected. In contrast, leader nodes (LNs) and follower nodes (FNs) do not possess this right. This rule reduces the likelihood of a single node dominating the block. When the system needs to change its fundamental settings due to an increase in the number of nodes or transaction volume, a specific number of current leader nodes and candidate nodes need to vote for a reset. Subsequently, general nodes need to vote to confirm this. When both confirmations are successful, the new basic settings are used in the next cycle of the system process. This dual confirmation setting ensures the fairness of the blockchain to a considerable extent. It also ensures that the majority holds the ultimate decision-making power, thereby avoiding the phenomenon of a small number of nodes completely controlling the system.

After the completion of a governance cycle, the blockchain network will conduct a fresh election for the leader and follower nodes. As only general nodes possess the privilege to participate in the election process, the previous consortium of leader and follower nodes will lose their authorization. In the current cycle, they will solely retain broadcasting and receiving permissions for block information, while their corresponding incentives will also decrease. A diagram illustrating the node status can be found in Fig. 1.

Figure 1

Election method

The election method adopts the node self-nomination mode. If a node wants to participate in an election, it must form a node group with one master and three slaves. One master node group and three slave node groups are inferred based on experience in this paper; these groups can balance efficiency and security and are suitable for other project collaborations. The successfully elected node joins the leader node set, and its slave nodes enter the follower node set. Considering the network situation, the maximum threshold for producing a block is set to 1 s. If the block fails to be successfully generated within the specified time, it is regarded as a disconnected state, and its reputation score is deducted. The node is skipped, and in severe cases, a view transformation is performed, switching from the master node to the slave node and inheriting its leader’s rights in the next round of block generation. Although the nodes that become leaders are high-reputation nodes, they still have the possibility of misconduct. If a node engages in misconduct, its activity will be immediately stopped, its comprehensive reputation score will be lowered, it will be disqualified from participating in the next election, and its equity will be reduced by 30%. The election process is shown in Fig. 2.

Figure 2figure 2

Incentives and penalties

To balance the rewards between leader nodes and ordinary nodes and prevent a large income gap, two incentive/penalty methods will be employed. First, as the number of network nodes and transaction volume increase, more active nodes with significant stakes emerge. After a prolonged period of running the blockchain, there will inevitably be significant class distinctions, and ordinary nodes will not be able to win in the election without special circumstances. To address this issue, this paper proposes that rewards be reduced for nodes with stakes exceeding a certain threshold, with the reduction rate increasing linearly until it reaches zero. Second, in the event that a leader or follower node violates the consensus process, such as by producing a block out of order or being unresponsive for an extended period, penalties will be imposed. The violation handling process is illustrated in Fig. 3.

Figure 3figure 3

Violation handling process.

Comprehensive reputation evaluation and election mechanism based on historical transactions

This paper reveals that the core of the DPoS consensus mechanism is the election process. If a blockchain is to run stably for a long time, it is essential to consider a reasonable election method. This paper proposes a comprehensive reputation evaluation election mechanism based on historical records. The mechanism considers the performance indicators of nodes in three dimensions: production rate, tokens, and validity. Additionally, their historical records are considered, particularly whether or not the nodes have engaged in malicious behavior. For example, nodes that have ever been malicious will receive low scores during the election process unless their overall quality is exceptionally high and they have considerable support from other nodes. Only in this case can such a node be eligible for election or become a leader node. The comprehensive reputation score is the node’s self-evaluation score, and the committee size does not affect the computational complexity.

Moreover, the comprehensive reputation evaluation proposed in this paper not only is a threshold required for node election but also converts the evaluation into corresponding votes based on the number of voters. Therefore, the election is related not only to the benefits obtained by the node but also to its comprehensive evaluation and the number of voters. If two nodes receive the same vote, the node with a higher comprehensive reputation is given priority in the ranking. For example, in an election where node A and node B each receive 1000 votes, node A’s number of stake votes is 800, its comprehensive reputation score is 50, and only four nodes vote for it. Node B’s number of stake votes is 600, its comprehensive reputation score is 80, and it receives votes from five nodes. In this situation, if only one leader node position remains, B will be selected as the leader node. Displayed in descending order of priority as comprehensive credit rating, number of voters, and stake votes, this approach aims to solve the problem of node misconduct at its root by democratizing the process and subjecting leader nodes to constraints, thereby safeguarding the fundamental interests of the vast majority of nodes.

Comprehensive reputation evaluation

This paper argues that the election process of the DPoS consensus mechanism is too simplistic, as it considers only the number of election votes that a node receives. This approach fails to comprehensively reflect the node’s actual capabilities and does not consider the voters’ election preferences. As a result, nodes with a significant stake often win and become leader nodes. To address this issue, the comprehensive reputation evaluation score is normalized considering various attributes of the nodes. The scoring results are shown in Table 3.

Table 3 Comprehensive reputation evaluation.

Since some of the evaluation indicators in Table 3 are continuous while others are discrete, different normalization methods need to be employed to obtain corresponding scores for different indicators. The continuous indicators include the number of transactions/people, wealth balance, network latency, network jitter, and network bandwidth, while the discrete indicators include the number of violations, the number of successful elections, and the number of votes. The value range of the indicator “number of transactions/people” is (0,1), and the value range of the other indicators is (0, + ∞). The equation for calculating the “number of transactions/people” is set as shown in Eq. (1).

$$A_{1} = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {{\text{G}} = 0} \hfill \\ {\frac{{\text{N}}}{{\text{G}}}*10,} \hfill & {{\text{G}} > 0} \hfill \\ \end{array} } \right.$$

(1)

where N represents the number of transactional nodes and G represents the number of transactions. It reflects the degree of connection between the node and other nodes. Generally, nodes that transact with many others are safer than those with a large number of transactions with only a few nodes. The limit value of each item, denoted by x, is determined based on the situation and falls within the specified range, as shown in Eq. (2). The wealth balance and network bandwidth indicators use the same function to set their respective values.

$${A}_{i}=20*\left(\frac{1}{1+{e}^{-{a}_{i}x}}-0.5\right)$$

(2)

where x indicates the value of this item and expresses the limit value.

In Eq. (3), x represents the limited value of this indicator. The lower the network latency and network jitter are, the higher the score will be.

The last indicators, which are the number of violations, the number of elections, and the number of votes, are discrete values and are assigned different scores according to their respective ranges. The scores corresponding to each count are shown in Table 4.

$$A_{3} = \left\{ {\begin{array}{*{20}l} {10*\cos \frac{\pi }{200}x,} \hfill & {0 \le x \le 100} \hfill \\ {0,} \hfill & {x > 100} \hfill \\ \end{array} } \right.$$

(3)

Table 4 Score conversion.

The reputation evaluation mechanism proposed in this paper comprehensively considers three aspects of nodes, wealth level, node performance, and stability, to calculate their scores. Moreover, the scores obtain the present data based on historical records. Each node is set as an M × N dimensional matrix, where M represents M times the reputation evaluation score and N represents N dimensions of reputation evaluation (M < = N), as shown in Eq. (4).

$${\text{N}} = \left( {\begin{array}{*{20}c} {a_{11} } & \cdots & {a_{1n} } \\ \vdots & \ddots & \vdots \\ {a_{m1} } & \cdots & {a_{mn} } \\ \end{array} } \right)$$

(4)

The comprehensive reputation rating is a combined concept related to three dimensions. The rating is set after rating each aspect of the node. The weight w and the matrix l are not fixed. They are also transformed into matrix states as the position of the node in the system changes. The result of the rating is set as the output using Eq. (5).

$$\text{T}=\text{lN}{w}^{T}=\left({l}_{1}\dots {\text{l}}_{\text{m}}\right)\left(\begin{array}{ccc}{a}_{11}& \cdots & {a}_{1n}\\ \vdots & \ddots & \vdots \\ {a}_{m1}& \cdots & {a}_{mn}\end{array}\right){\left({w}_{1}\dots {w}_{n}\right)}^{T}$$

(5)

Here, T represents the comprehensive reputation score, and l and w represent the correlation coefficient. Because l is a matrix of order 1*M, M is the number of times in historical records, and M <  = N is set, the number of dimensions of l is uncertain. Set the term l above to add up to 1, which is l1 + l2 + …… + ln = 1; w is also a one-dimensional matrix whose dimension is N*1, and its purpose is to act as a weight; within a certain period of time, w is a fixed matrix, and w will not change until the system changes the basic settings.

Assume that a node conducts its first comprehensive reputation rating, with no previous transaction volume, violations, elections or vote. The initial wealth of the node is 10, the latency is 50 ms, the jitter is 100 ms, and the network bandwidth is 100 M. According to the equation, the node’s comprehensive reputation rating is 41.55. This score is relatively good at the beginning and gradually increases as the patient participates in system activities continuously.

Voting calculation method

To ensure the security and stability of the blockchain system, this paper combines the comprehensive reputation score with voting and randomly sorts the blocks, as shown in Eqs. (36).

$$Z=\sum_{i=1}^{n}{X}_{i}+nT$$

(6)

where Z represents the final election score, Xi represents the voting rights earned by the node, n is the number of nodes that vote for this node, and T is the comprehensive reputation score.

The voting process is divided into stake votes and reputation votes. The more reputation scores and voters there are, the more total votes that are obtained. In the early stages of blockchain operation, nodes have relatively few stakes, so the impact of reputation votes is greater than that of equity votes. This is aimed at selecting the most suitable node as the leader node in the early stage. As an operation progresses, the role of equity votes becomes increasingly important, and corresponding mechanisms need to be established to regulate it. The election vote algorithm used in this paper is shown in Table 5.

Table 5 Election vote counting algorithm.

This paper argues that the election process utilized by the original DPoS consensus mechanism is overly simplistic, as it relies solely on the vote count to select the node that will oversee the entire blockchain. This approach cannot ensure the security and stability of the voting process, and if a malicious node behaves improperly during an election, it can pose a significant threat to the stability and security of the system as well as the safety of other nodes’ assets. Therefore, this paper proposes a different approach to the election process of the DPoS consensus mechanism by increasing the complexity of the process. We set up a threshold and optimized the vote-counting process to enhance the security and stability of the election. The specific performance of the proposed method was verified through experiments.

The election cycle in this paper can be customized, but it requires the agreement of the blockchain committee and general nodes. The election cycle includes four steps: node self-recommendation, calculating the comprehensive reputation score, voting, and replacing the new leader. Election is conducted only among general nodes without affecting the production or verification processes of leader nodes or follower nodes. Nodes start voting for preferred nodes. If they have no preference, they can use the LINK mechanism to collaborate with other nodes and gain additional rewards.

View changes

During the consensus process, conducting a large number of updates is not in line with the system’s interests, as the leader node (LN) and follower node (FN) on each node have already been established. Therefore, it is crucial to handle problematic nodes accurately when issues arise with either the LN or FN. For instance, when a node fails to perform its duties for an extended period or frequently fails to produce or verify blocks within the specified time range due to latency, the system will precisely handle them. For leader nodes, if they engage in malicious behavior such as producing blocks out of order, the behavior is recorded, and their identity as a leader node is downgraded to a follower node. The follower node inherits the leader node’s position, and the nature of their work is transformed as they swap their responsibilities of producing and verifying blocks with their original work. This type of behavior will not significantly affect the operation of the blockchain system. Instead of waiting until the end of the current committee round to punish malicious nodes, dynamic punishment is imposed on the nodes that affect the operation of the blockchain system to maintain system security. The view change operation is illustrated in Fig. 4.

Figure 4figure 4

In traditional PBFT, view changes are performed according to the view change protocol by changing the view number V to the next view number V + 1. During this process, nodes only receive view change messages and no other messages from other nodes. In this paper, the leader node group (LN) and follower node group (FN) are selected through an election of the LINK group. The node with LINKi[0] is added to the LN leader node group, while the other three LINK groups’ follower nodes join the FN follower node group since it is a configuration pattern of one master and three slaves. The view change in this paper requires only rearranging the node order within the LINK group to easily remove malicious nodes. Afterward, the change is broadcast to other committee nodes, and during the view transition, the LINK group does not receive block production or verification commands from the committee for stability reasons until the transition is completed.

Fuente

Continue Reading

News

The Hype Around Blockchain Mortgage Has Died Down, But This CEO Still Believes

Chain Feed Staff

Published

on

The Hype Around Blockchain Mortgage Has Died Down, But This CEO Still Believes

LiquidFi Founder Ian Ferreira Sees Huge Potential in Blockchain Despite Hype around technology is dead.

“Blockchain technology has been a buzzword for a long time, and it shouldn’t be,” Ferriera said. “It should be a technology that lives in the background, but it makes everything much more efficient, much more transparent, and ultimately it saves costs for everyone. That’s the goal.”

Before founding his firm, Ferriera was a portfolio manager at a hedge fund, a job that ended up revealing “interesting intricacies” related to the mortgage industry.

Being a mortgage trader opened Ferriera’s eyes to a lot of the operational and infrastructure problems that needed to be solved in the mortgage-backed securities industry, he said. That later led to the birth of LiquidFi.

“The point of what we do is to get raw data attached to a resource [a loan] on a blockchain so that it’s provable. You reduce that trust problem because you have the data, you have the document associated with that data,” said the LiquidFi CEO.

Ferriera spoke with National Mortgage News about the value of blockchain technology, why blockchain hype has fizzled out, and why it shouldn’t.



Fuente

Continue Reading

News

New bill pushes Department of Veterans Affairs to examine how blockchain can improve its work

Chain Feed Staff

Published

on

New bill pushes Department of Veterans Affairs to examine how blockchain can improve its work

The Department of Veterans Affairs would have to evaluate how blockchain technology could be used to improve benefits and services offered to veterans, according to a legislative proposal introduced Tuesday.

The bill, sponsored by Rep. Nancy Mace, R-S.C., would direct the VA to “conduct a comprehensive study of the feasibility, potential benefits, and risks associated with using distributed ledger technology in various programs and services.”

Distributed ledger technology, including blockchain, is used to protect and track information by storing data across multiple computers and keeping a record of its use.

According to the text of the legislation, which Mace’s office shared exclusively with Nextgov/FCW ahead of its publication, blockchain “could significantly improve benefits allocation, insurance program management, and recordkeeping within the Department of Veterans Affairs.”

“We need to bring the federal government into the 21st century,” Mace said in a statement. “This bill will open the door to research on improving outdated systems that fail our veterans because we owe it to them to use every tool at our disposal to improve their lives.”

Within one year of the law taking effect, the Department of Veterans Affairs will be required to submit a report to the House and Senate Veterans Affairs committees detailing its findings, as well as the benefits and risks identified in using the technology.

The mandatory review is expected to include information on how the department’s use of blockchain could improve the way benefits decisions are administered, improve the management and security of veterans’ personal data, streamline the insurance claims process, and “increase transparency and accountability in service delivery.”

The Department of Veterans Affairs has been studying the potential benefits of using distributed ledger technology, with the department emission a request for information in November 2021 seeking input from contractors on how blockchain could be leveraged, in part, to streamline its supply chains and “secure data sharing between institutions.”

The VA’s National Institute of Artificial Intelligence has also valued the use of blockchain, with three of the use cases tested during the 2021 AI tech sprint focused on examining its capabilities.

Mace previously introduced a May bill that would direct Customs and Border Protection to create a public blockchain platform to store and share data collected at U.S. borders.

Lawmakers also proposed additional measures that would push the Department of Veterans Affairs to consider adopting other modernized technologies to improve veteran services.

Rep. David Valadao, R-Calif., introduced legislation in June that would have directed the department to report to lawmakers on how it plans to expand the use of “certain automation tools” to process veterans’ claims. The House of Representatives Subcommittee on Disability Assistance and Memorial Affairs gave a favorable hearing on the congressman’s bill during a Markup of July 23.



Fuente

Continue Reading

News

California DMV Uses Blockchain to Fight Auto Title Fraud

Chain Feed Staff

Published

on

California DMV Uses Blockchain to Fight Auto Title Fraud

TDR’s Three Takeaways: California DMV Uses Blockchain to Fight Fraud

  1. California DMV uses blockchain technology to manage 42 million auto titles.
  2. The initiative aims to improve safety and reduce car title fraud.
  3. The immutable nature of blockchain ensures accurate and tamper-proof records.

The California Department of Motor Vehicles (DMV) is implementing blockchain technology to manage and secure 42 million auto titles. This innovative move aims to address and reduce the persistent problem of auto title fraud, a problem that costs consumers and the industry millions of dollars each year. By moving to a blockchain-based system, the DMV is taking advantage of the technology’s key feature: immutability.

Blockchain, a decentralized ledger technology, ensures that once a car title is registered, it cannot be altered or tampered with. This creates a highly secure and transparent system, significantly reducing the risk of fraudulent activity. Every transaction and update made to a car title is permanently recorded on the blockchain, providing a complete and immutable history of the vehicle’s ownership and status.

As first reported by Reuters, the DMV’s adoption of blockchain isn’t just about preventing fraud. It’s also aimed at streamlining the auto title process, making it more efficient and intuitive. Traditional auto title processing involves a lot of paperwork and manual verification, which can be time-consuming and prone to human error. Blockchain technology automates and digitizes this process, reducing the need for physical documents and minimizing the chances of errors.

Additionally, blockchain enables faster verification and transfer of car titles. For example, when a car is sold, the transfer of ownership can be done almost instantly on the blockchain, compared to days or even weeks in the conventional system. This speed and efficiency can benefit both the DMV and the vehicle owners.

The California DMV’s move is part of a broader trend of government agencies exploring blockchain technology to improve their services. By adopting this technology, the DMV is setting a precedent for other states and industries to follow, showcasing blockchain’s potential to improve safety and efficiency in public services.

Want to stay up to date on Cannabis, AI, Small Cap and Crypto? Subscribe to our Daily Baked in Newsletter!



Fuente

Continue Reading

Trending

Copyright © 2024 CHAINFEED.INFO. All rights reserved. This website provides educational content and highlights that investing involves risks. It is essential to conduct thorough research before investing and to be prepared to assume potential losses. Be sure to fully understand the risks involved before making investment decisions. Important: We do not provide financial or investment advice. All content is presented for educational purposes only.