Bitcoin is a new protocol with a potential to revolutionize financial system. Bitcoin has a complex structure, where several interacting components build a peer-to-peer currency and a payment system without relying on any trusted third party. Bitcoin is continually improved by an open source community, and various Bitcoin libraries, APIs, and alternative implementations are being developed. Nevertheless, there is no up-to-date protocol specification or architecture description since the official whitepaper was published back in 2008. In this paper, we provide an up-to-date protocol specification and architectural analysis of the Bitcoin system. We perform this analysis as the first step towards specification of the cryptocurrency reference architecture. The future reference architecture will serve as a starting architectural point for the development of new systems that leverage Bitcoin protocol in different contexts and for various purposes. We also discuss whether the current architecture satisfies the system's primary purpose, i.e., providing a pure decentralized version of the cryptocurrency.