XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Replace dependencies on aged_containers #3337

Open scottschurr opened 4 years ago

scottschurr commented 4 years ago

Issue Description

The collection of aged_containers (see src/ripple/beast/container) are STL-like containers that track the relative age of their contents. The aged_containers are specific to rippled, which means that they are maintained locally. The fact that they are STL-like carries with it all of the associated complexity.

The amount of complexity and maintenance risk that the aged_containers carries is not justified by the role they fill in the rippled code base. We should find std:: (preferable) or boost:: replacements for all uses of the aged_containers in the rippled code base, even if that means incurring some performance penalties. Once all uses of the aged_containers have been replaced, then we should remove the aged_container source code.

nbougalis commented 4 years ago

Alternatively, we should consider whether submitting them for inclusion in Boost makes sense. I know that this would require extra effort on our part, unless someone else is willing to adopt them and push them through Boost review.

scottschurr commented 4 years ago

If Mr. V wants to adopt them I'd be fine with that. But I doubt anyone on this team wants to adopt them thoroughly enough to get them through the Boost review process. I tried doing that once years ago with a small utility that I wrote (and was not accepted). The Boost review process can be brutal.

intelliot commented 1 year ago

@scottschurr do you still think this is worth doing?

scottschurr commented 1 year ago

Yes, removing the aged_containers from the code base is still very much worth doing. They are very complicated. They have already broken a couple of times as we have moved from one C++ Standard to the next. Fortunately @HowardHinnant was able to figure out fixes. They should be replaced with standard boost (or other library) functionality that someone (other than XRP Ledger developers) is maintaining.

The aged_containers are technical debt at its finest.

scottschurr commented 1 year ago

Case in point: https://github.com/XRPLF/rippled/pull/4486

intelliot commented 1 year ago