FAQ: PBSS & PebbleDB

1.Background

BSC will gradually switch to PBSS + PebbleDB as the default and main support mode, which are big changes and would bring many benefits to BSC. They are still at experimental stage and could have some impacts to node operator once enabled. This post tries to give brief introduction and answer some common questions.

1.1.About PBSS

PBSS stands for Path-Based-Storage-Scheme, which was already enabled since BSC v1.3.1-beta. It is used to optimize the MPT trie tree access, to improve its efficiency and also brings the inline state prune. There is a brief introduction on v1.3.1-beta release page

1.2.About PebbleDB

Currently, BSC uses LevelDB as its default underlying database, but the project is no longer maintained, there are many opens issues and the latest commit is more than 1 years ago. So BSC would switch to PebbleDB in long term, same as what Go-Ethereum has done.

2.FAQs

Q1:What Is The Current Status?

PBSS & PebbleDB have already been supported on BSC mainnet since v1.3.1-beta, but we officially start to promote it since v1.3.5.
It is still at experimental stage, we encourage BSC community users give it a try and give us more feedbacks.

Q2: Will BSC Stop Supporting Hash Based And LevelDB?

It is not determined yet, but likely PBSS + PebbleDB will be the suggested running mode. And we hope most of the nodes can switch to PBSS & PebbleDB before end of Feb 2024.
The HashBased snapshot will no longer be maintained by end of Mar 2024.

Q3: How To Try PBSS & PebbleDB?

We are generating the PBSS&PebbleDB snapshot, will upload to bsc-snpshots once ready.
Currently, the 2 features are still disabled by default, to use PBSS&Pebble:
1.update the config.toml:

[Eth]
StateScheme = "path"

2.add these 2 node start up flags:

// to enable PBSS
--state.scheme path
// to enable PebbleDB 
--db.engine pebble

Q4: Can BSC Support Archive Node After PBSS?

For Archive node, you may need to run BSC-Erigon.
You can still run with hash based node, but it is not recommended and the support would be limited.

1 Like

currently PBSS doesn’t support archive node now, so I think hash based state scheme is still needed for those who are running BSC Geth as archive node.

I’m running BSC as rpc nodes. When the avg number of txns grows they struggle to keep up. Will switching to PebbleDB and PBSS help in this regard?

PBSS & PebbleDB would have some performance gain, but limited, within 10%, may not solve your problem.

Hello! Am I understood correctly that there won’t be an official archive node soon? It’s strange because it means that you don’t provide an official way to work with blockchain state (receipts, balances etc.). Erigon fork doesn’t seem stable and supported officially, so I feel very concerned.

For archive node:
1.You may need to try BSC-Erigon, I think you can trust NodeReal. If you have issue with BSC-Erigon, just create an issue, they will give support.
2.Hash mode can still work, although its support could be limited, basically it still can work for quite a while.