Fantom-foundation / Aida

Aida is a block-processing testing infrastructure for EVM-compatible chains.
GNU Lesser General Public License v3.0
4 stars 12 forks source link

Fix inquirer data race #1090

Closed cabrador closed 4 months ago

cabrador commented 4 months ago

Description

This PR fixes data-race inside ArchiveInquirer. This bug was caused by incorrectly passing a carmenStateDB containing txCtx which is used by both carmenHeadState and carmenHistoricState. Now only instance of the database itself is passed and new carmenStateDB instance is created hence each archive-inquiry receives own txCtx.

Fixes #1088

Type of change

cabrador commented 4 months ago

Is there a test within Aida that would have detected this when being run with a race detector? Should such a test run be included in the Aida tests promoting developer branch commits to main?

We had an internal discussion earlier about introducing race detection. I will bring this up again on our meeting today.