[ Sonic 노잼글 들고왔습니다 ] Sonic docs를 뒤적뒤적거리다가 Database Storage 라는 카태고리를 보게되는 zin. 한번 아라보자! Database Storage Sonic은 블록체인의 현재 상태를 데이터베이스에 저장합니다. 여기에는 계정 정보, 가상 머신 코드, 스마트 컨트랙트 저장소 등이 포함됩니다. 이 과정에서 live pruning 이라는 기능을 사용해 오래된 데이터를 자동으로 삭제합니다. 덕분에 블록체인이 커져도 validator가 저장해야 하는 데이터 용량을 크게 줄일 수 있습니다. 기존에는 pruning을 하려면 검증자 노드가 잠시 꺼져야 했습니다. 하지만 Sonic은 노드를 끄지 않고도 실시간으로 데이터를 정리할 수 있어, 네트워크 운영을 중단하지 않고도 디스크 공간과 비용을 절약할 수 있습니다. live pruning은 데이터베이스를 두 가지로 나누어 관리합니다. 1. LiveDB: 최신 블록의 상태만 저장 2.ArchiveDB: 과거 블록의 모든 상태 저장 검증자는 LiveDB만 사용해 운영 부담을 최소화하고, 과거 데이터가 필요할 때는 ArchiveDB를 가진 아카이브 노드를 통해 불러올 수 있습니다. 또한 Sonic의 데이터베이스는 트리 구조나 계층 구조를 활용해 검색을 빠르게 처리합니다. 기존 블록체인에서 자주 쓰이던 LevelDB 같은 범용 데이터베이스 대신 Sonic은 자체 최적화된 저장 방식을 사용해 속도와 효율성을 높였습니다. Ethereum과 Sonic의 차이 Ethereum 블록체인 상태를 MPT에 저장합니다. 요즘은 주요 클라이언트가 자동 pruning 지원 자동 pruning: 디스크 임계값 도달 시 300-500GB 자동 절약 그러나 여전히 검증자는 2-4TB 저장공간이 필요합니다. 아카이브 노드는 17TB의 방대한 데이터를 보관해야 합니다. Sonic LiveDB와 ArchiveDB로 분리된 구조를 사용합니다. 검증자는 최신 데이터(LiveDB)만 저장하면 되기 때문에...

5.92K
26
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.