I'm a Master Student in Computing Science and currently investigating the Bitcoin source code on the Software Patterns that are used. Part of the assignment is to ask the community to guide us.

I would like to ask you if you know any Software Pattern in the source code. In order to give you a view of our scope, below is a list of Patterns covered (Design Patterns and Architectural Patterns).

Thanks in advance,


Object Oriented Design Patterns:

  • Factory Pattern
  • Adapter Pattern
  • Composite Pattern
  • Facade Pattern
  • Proxy Pattern
  • Observer Pattern

Architectural Patterns:

  • Layered Decomposition Pattern
  • Pipes And Filters Pattern
  • Data Repository Pattern
  • Model View Controller Pattern
  • Client Server Pattern
  • Peer to Peer Pattern
  • Publish Subscribe Pattern
  • Broker Pattern
  • Message Queue Pattern

1 Answer 1


i don't think you can find many Object Oriented Design Patterns in the btc-source-code. but there is one example i know:

the blockchain itself is like a composite pattern: you have a general type called Block. two types inherits Block: MinedBlock inherits from Block and GenesisBlock inherits from Block. A MinedBlock has one attribute of the type Block called PreviousBlock. (here you can also find the singleton pattern: you need exactly one GenesisBlock-object.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.