Skip to content

Add block pools - #633

Open
sebastianelsner wants to merge 3 commits into
CGRU:masterfrom
RISEFX:risefx/block-pools-upstream
Open

Add block pools#633
sebastianelsner wants to merge 3 commits into
CGRU:masterfrom
RISEFX:risefx/block-pools-upstream

Conversation

@sebastianelsner

@sebastianelsner sebastianelsner commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

We needed to be able to set / override pools on block level.

Summary

  • add block-level pools map support in BlockData (JSON, wire serialization, info/weight output)
  • apply block pools as override of job pools during run eligibility and pool-priority scoring
  • document af.Block.setPools(dict) in block documentation

We have been running this in production for about a month now.

@sebastianelsner
sebastianelsner marked this pull request as ready for review February 18, 2026 16:57
@timurhai

Copy link
Copy Markdown
Member

Hello, Sebastian! Thank you for developing!

Since you changed BlockData::v_readwrite by adding rw_IntMap(m_pools, msg);,
it becomes a new version, which is not compatible with any previous.

This number should be also incremented:
https://github.com/CGRU/cgru/blob/master/afanasy/src/include/afversion.h
This makes other version clients to exit.

And it also a new 3.5.0 version.

I'll be back to this issue some later.
I have no plans to change files from this commit in the near feature.

@sebastianelsner

Copy link
Copy Markdown
Contributor Author

I bumped the versions but no rush

@lithorus

Copy link
Copy Markdown
Member

With the recent RapidJSON changes, it might be a good idea to hold off a bit on this merge so it's easier to roll back from any potential issues.

@sebastianelsner

Copy link
Copy Markdown
Contributor Author

@lithorus did you face any issues with the new rapidjson? we did not.

@lithorus

Copy link
Copy Markdown
Member

@sebastianelsner nope. Seems to be working fine.

@timurhai

Copy link
Copy Markdown
Member

Hello! New rapidjson working fine for us too.
Soon i will create 3.4.1 release:
https://cgru.readthedocs.io/en/latest/changes_log/changes_log.html#v3-4-1

Later, i will merge this PR.
Also i want to change the way that server send logs. Now it is a simple string array.
It will be better to send a structure for each record like this:
https://cgru.readthedocs.io/en/latest/afanasy/server.html#database-schema

And it will break binary network compatibility too.
And may be we should add this to binary answer too: #634

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.

3 participants