Skip to content

Comments

feat: TryDatabaseCommit#2121

Merged
rakita merged 5 commits intobluealloy:mainfrom
prestwich:prestwich/try-commit
Mar 3, 2025
Merged

feat: TryDatabaseCommit#2121
rakita merged 5 commits intobluealloy:mainfrom
prestwich:prestwich/try-commit

Conversation

@prestwich
Copy link
Contributor

Adds a fallible version of DatabaseCommit. Idea came up while working on this PR

Basically, this would allow (e.g.) Arc<ConcurrentState<Db>> to be used concurrently for read-access across any number of EVMs (sharing memory cache resources), and then allow Commit access to the BundleState if and only if you have discarded all-but-one Arc. This would enable easier parallel simulation in rounds much easier

@prestwich
Copy link
Contributor Author

prestwich commented Feb 27, 2025

incidentally, this can't be implemented effectively in trevm, as the blanket impl<Db: DatabaseCommit> TryDatabaseCommit for Db would have a potential conflict with theimpl<Db: DatabaseCommit> TryDatabaseCommit for Arc<Db> due to the fact that revm could impl<Db> DatabaseCommit for Arc<Db> in future versions. This is disallowed by the compiler 😮‍💨

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2025

CodSpeed Performance Report

Merging #2121 will not alter performance

Comparing prestwich:prestwich/try-commit (86ee82f) with main (739ffd3)

Summary

✅ 8 untouched benchmarks

@prestwich prestwich force-pushed the prestwich/try-commit branch from 3f73971 to 754745f Compare February 28, 2025 16:57
@rakita rakita merged commit 5886b9e into bluealloy:main Mar 3, 2025
28 checks passed
This was referenced Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants