Skip to content

Conversation

@dmtrskv
Copy link
Contributor

@dmtrskv dmtrskv commented Jun 25, 2025

A lot of usages of state accessor require only blocks, so we can introduce a simpler block accessor.
The state accessor is modified in another PR: #958

Block: block,
ConfigAccessor: configAccessor,
StateAccessor: api.accessor,
BlockAccessor: execution.NewBlockAccessor(32), // todo: use shared accessor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be fixed in state accessor PR

func (b *BlockHashByNumberAccessor) Get(tx db.RoTx, shardId types.ShardId, num types.BlockNumber) (common.Hash, error) {
key := shardAndBlockId{shardId, num}
// todo: use cache
// currently, the block can be somehow updated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem is reproduced in #981
Not caching here is no problem for now

@dmtrskv dmtrskv marked this pull request as ready for review June 25, 2025 17:23
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