Skip to content

Instantly share code, notes, and snippets.

View osmirnov's full-sized avatar
🚀
They said not a rocket science, right?

Oleg Smirnov osmirnov

🚀
They said not a rocket science, right?
View GitHub Profile
@osmirnov
osmirnov / coz-contrib-nov-18-2018-72.md
Created November 25, 2018 21:24
My week in CityOfZion - Nov 18, 2018 (#72)

My week in CityOfZion - Nov 18, 2018

CityOfZion/neo-sharp

Created

CityOfZion/neon-wallet

I dedicated some time to QA new wallet.

Created (Issues)

@osmirnov
osmirnov / coz-bounty-n1-fastbft.md
Last active October 20, 2021 15:30
CoZ Bounty #1: Alternative Consensus Implementations - FastBFT Submission

CoZ Bounty #1: Alternative Consensus Implementations - FastBFT Submission

I present FastBFT implementation of the consensus algorithm as a part of "CoZ Bounty #1: Alternative Consensus Implementations" program.

Why did I pick FastBFT to participate? I was not familiar with this algorithm before. I expected to see multiple submissions of HoneyBadgerBFT and decided to implement any other BFT algorithm. At the end of the day, NEO community will benefit from having of many consensus implementations in its disposal. Meanwhile, could I state this is the world first open source FastBFT implementation? 😉

Before diving deep into FastBFT I would like to talk about the current consensus algorithm used in NEO network.

Delegated Byzantine Fault Tolerance (dBFT)

Today NEO network is using Delegated Byzantine Fault Tolerance (dBFT) algorithm. The next steps are executed by replicas to achieve the consensus on incoming transa

@osmirnov
osmirnov / coz-contrib-apr-15-2018.md
Created April 17, 2018 01:55
My week in City of Zion - Apr 15, 2018
@osmirnov
osmirnov / coz-contrib-apr-8-2018.md
Created April 10, 2018 01:29
My week in City of Zion - Apr 8, 2018
@osmirnov
osmirnov / neosharp-di-design.md
Created March 29, 2018 18:46
How I would apply dependency injection pattern in NeoSharp project

NeoSharp Dependency Injection (DI) Design

In current design there is a DI folder in every project that contains Package class. This class accepts Container class as a parameter and performs the registration of dependencies. NeoSharp.Application composes of all "Packages" passing a root container to each of them sequentially. Such a straightforward approach has clear limitations.

  1. Every project is dependency management aware. It has to register its services in some container and to make an assumption about their lifecycle (Singleton, Transient, PerThread, etc.). Both of these things are bad. The former defeats Single Responsibility Principle (SRP). The project has not only the goal it was designed for but also a sub goal to register itself in the external container. The latter will bomb when multiple consumers of the same project have different requirements for services' lifecycle.

  2. Every project references SimpleInjector dependency management library and cannot be used without this. In case of the DI