-
Notifications
You must be signed in to change notification settings - Fork 677
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
feat: redesign nonce cache #5602
base: develop
Are you sure you want to change the base?
Conversation
This redesign uses a proper LRU cache and is more careful about flushing the cache more efficiently.
stackslib/src/core/nonce_cache.rs
Outdated
clarity_instance | ||
.begin_test_genesis_block( | ||
&StacksBlockId::sentinel(), | ||
&StacksBlockId([0 as u8; 32]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you didn't write this and just moved this file, but the proper way to do this is
&StacksBlockId([0 as u8; 32]), | |
&StacksBlockId([0u8; 32]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in e4f0b7b.
stacks-common/src/util/lru_cache.rs
Outdated
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use std::collections::HashMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A while ago we switched to using hashbrown
in Clarity for performance reasons. It's a drop-in replacement with the same API. See #4389
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to hashbrown
in e4f0b7b.
This is the same as #5599 except built against develop.
This redesign uses a proper LRU cache and is more careful about flushing the cache more efficiently.