Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execution: use read-only tx in LocalState #2681

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

canepat
Copy link
Member

@canepat canepat commented Jan 28, 2025

Both LocalState and RemoteState are implementations of the State interface aimed at providing support for call execution, i.e. transaction re-execution or simulation required by many RPC end-points.

As such, LocalState must use a read-only database transaction because:

  1. it doesn't need any read-write support (no persistent change is produced)
  2. can be instantiated multiple times concurrently to offer parallel call execution

@canepat canepat requested review from battlmonstr and lupin012 and removed request for battlmonstr January 28, 2025 13:53
@canepat canepat marked this pull request as ready for review January 28, 2025 13:54
@canepat canepat added the maintenance Some maintenance work (fix, refactor, rename, test...) label Jan 28, 2025
@canepat canepat merged commit d24f0e4 into master Jan 28, 2025
6 checks passed
@canepat canepat deleted the rocdaemon_fix_local_state_tx branch January 28, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Some maintenance work (fix, refactor, rename, test...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants