FAQ: PBSS & PebbleDB

1.Background

PBSS and PebbleDB was supported since v1.3.1-beta and promoted it since v1.3.5 on BSC. Since then, lots of nodes have been upgraded to PBSS + PebbleDB mode, so far everything is good.
As we have announced before, we will mainly support PBSS + PebbleDB mode, the support for Hash or LevelDB will be limited after the end of Mar 2024.

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: Will BSC Stop Supporting Hash&LevelDB?

Yes
BSC uses PBSS&PebbleDB as the default and primary mode now, we will mainly put our limited resource on supporting PBSS + PebbleDB.
And the support for the Hash&LevelDB mode will be discontinued after September 30, 2024. Consequently, the functionality may become unavailable or cease to function properly at any time following this date.

Q2: How To Check Node’s Running Mode?

The running mode will be printed into the bsc.log on node startup. For Path&PebbleDB, here is the logs:

cat <logdir>/bsc.log |grep -E "scheme|backing database"
t=2024-08-01T01:03:29+0000  lvl=info msg="Use CLI state scheme" CLI=path
t=2024-08-01T01:03:29+0000  lvl=info msg="Using pebble as the backing database"
t=2024-08-01T01:03:29+0000  lvl=info msg="State scheme set by user" scheme=path
t=2024-08-01T01:03:29+0000  lvl=info msg="Allocated memory caches" state_scheme=path trie_clean_cache="6.78 GiB" trie_dirty_cache="256.00 MiB" snapshot_cache="3.52 GiB"

Q3: How To Try PBSS & PebbleDB?

For binary, you can try the latest stable release for PBSS + PebbleDB mode. As it is already the default mode, you don’t need extra configuration to use PBSS + PebbleDB.

To catch to the latest block:

  • Option-1: Sync from genesis, it will be PBSS + PebbleDB by default. But it is not recommended for BSC mainnet, as it could take several months to get your node synced.
  • Option-2: Sync based on snapshot: we have updated the snapshot of PBSS + PebbleDB on bsc-snapshots. Just download it and sync based on it, then your node will be PBSS + PebbleDB mode.

Q4: Can BSC Support Archive Node After PBSS?

PBSS does not support archive mode, for Archive node, you may need to run BSC-Erigon.

3.Conclusion

If you have any other questions, you may simply reply this page or fire an issue on bsc repo.

2 Likes

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.

1 Like

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?

1 Like

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

1 Like

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.

1 Like

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.

1 Like