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

sozo: remove the need of world_block #2825

Open
glihm opened this issue Dec 19, 2024 · 2 comments
Open

sozo: remove the need of world_block #2825

glihm opened this issue Dec 19, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers sozo

Comments

@glihm
Copy link
Collaborator

glihm commented Dec 19, 2024

Currently, sozo needs to fetch data from the world to have compare it to the local representation of it.

However, on public networks, when too much blocks are in the network, the nodes are refusing returning data if the block range used to get events is too big.

As a temporary fix, sozo is relying on a world_block parameter:

pub world_block: Option<u64>,

And this is used in sozo here:

let from_block = if let Some(world_block) =
profile_config.env.as_ref().and_then(|e| e.world_block)
{
Some(BlockId::Number(world_block))
} else {
self.from_block.map(BlockId::Number)
};

The idea of this issue, is to remove this world_block, and instead making smaller block ranges if sozo detects the block range is too wide.
The exact limit of blocks is not benched yet, but 50k blocks could be a good start.

@glihm glihm added good first issue Good for newcomers sozo labels Dec 19, 2024
@pheobeayo
Copy link

Can I handle this task?

@glihm
Copy link
Collaborator Author

glihm commented Dec 19, 2024

Can I handle this task?

Yep, feel free to ask on the dojo discord or here if you have any question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers sozo
Projects
None yet
Development

No branches or pull requests

2 participants