Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

devops - Using blockchain for continuous integration

I'm working on a thesis with the goal of a blockchain based approach to continuous integration. Reading this paper I noticed the strongly diverging understandings and implementations of continuous integration particularly looking at the points 'Definition of build failure and success' and 'Fault handling'. My idea is to use blockchain and smart contracts as a voting mechanism between a pull request by a developer and the build results of the CI servers. The image below is what I thought of.

blockchain based CI system

When a developer sends a pull request a transaction is proposed to the blockchain network which sends the build candidate to the CI servers. The CI servers post their outcome in the form of votes back to the blockchain network and depending on the consensuns mechanism (majority or absolute vote) the build is accepted and the branches are merged.

However I'm new to the world of blockchain and it's unclear to me how to apply consensus mechanisms like PoW or PoS and smart contracts. Maybe some of you could help me answer a few questions or give advice on how to design it.

  1. How do I approach PoW or PoS here? What exactly is being mined here? Does a transaction require a cost? Do I even need those things or can I simply use blockchain as a data structure?
  2. The obvious question with blockchain is why I would even use it in this case. From my own DevOps experience I see through all projects a lack of standards and rules and problems with role-based access control. This includes improved transparency of the system mechanics and traceability throughout the project.

This being a bachelor thesis I'm not trying to revolutionize computer science, my goal is learn more about CI and if blockchain can do any good. The topic and design of the system above is approved by my supervisor.

question from:https://stackoverflow.com/questions/65645854/using-blockchain-for-continuous-integration

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Apart from cryptocurrencies, the main cases of using blockchain platforms are:

  • creation of a trusted operating environment among participants who do not trust each other;
  • building a system of interaction without a point of failure - technical or organizational, when the elimination or malicious intent of any node does not lead to the inoperability of the system as a whole;
  • construction of a cheap distributed database.

In your case, using blockchain in the sense of a decentralized platform is imprecise and most likely ineffective. One of the main problems in building a blockchain network is determining who will be the owner of the node and why (what are his incentives for this). In your case, it is difficult to think of rational reasons why each developer (or at least a group) would want to own the nodes instead of using some centralized service. Moreover, you have a guaranteed "centralization point" - a CI server. It might be worth considering an infrastructure with multiple independent CI servers. But even here I still do not see the benefits of using a decentralized solution.

Technically, the use of a blockchain platform for voting in your case does not present any apparent difficulty when implementing almost any voting algorithm - you can use a private Ethereum, Quorum or Hyper Ledger Fabric.

Regarding your question (1), PoW or PoS are technical mechanisms for determining the blocks of the main chain of public blockchain platforms. Your smart-contracts will work on top of this protocol and, most likely, implement consensus algorithms from the BFT group (PBFT, IBFT, and so on).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...