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

Refactor server #5264

Merged
merged 1 commit into from May 14, 2024
Merged

Refactor server #5264

merged 1 commit into from May 14, 2024

Conversation

joschisan
Copy link
Contributor

@joschisan joschisan commented May 11, 2024

Just moving code around.

@joschisan joschisan force-pushed the refactor_server branch 18 times, most recently from 714f596 to 2fcdcf0 Compare May 12, 2024 10:49
@joschisan joschisan marked this pull request as ready for review May 12, 2024 10:51
@joschisan joschisan requested review from a team as code owners May 12, 2024 10:51
@joschisan joschisan force-pushed the refactor_server branch 5 times, most recently from 14b62a1 to a6b4e62 Compare May 12, 2024 13:17
dpc
dpc previously approved these changes May 12, 2024
@dpc dpc added this pull request to the merge queue May 12, 2024
@dpc dpc added the needs further review Merged before reaching ideal amount of code review label May 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2024
elsirion
elsirion previously approved these changes May 13, 2024
@joschisan joschisan added this pull request to the merge queue May 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 13, 2024
@joschisan joschisan added this pull request to the merge queue May 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 13, 2024
@joschisan joschisan force-pushed the refactor_server branch 11 times, most recently from 5ead912 to dcf0183 Compare May 13, 2024 22:24
Comment on lines +56 to 71
pub struct ConsensusEngine {
pub modules: ServerModuleRegistry,
pub db: Database,
pub keychain: Keychain,
pub federation_api: DynGlobalApi,
pub cfg: ServerConfig,
pub submission_receiver: Receiver<ConsensusItem>,
pub shutdown_receiver: watch::Receiver<Option<u64>>,
pub last_ci_by_peer: Arc<RwLock<BTreeMap<PeerId, u64>>>,
/// Just a string version of `cfg.local.identity` for performance
self_id_str: String,
pub self_id_str: String,
/// Just a string version of peer ids for performance
peer_id_str: Vec<String>,
connection_status_channels: Arc<RwLock<BTreeMap<PeerId, PeerConnectionStatus>>>,
task_group: TaskGroup,
pub peer_id_str: Vec<String>,
pub connection_status_channels: Arc<RwLock<BTreeMap<PeerId, PeerConnectionStatus>>>,
pub task_group: TaskGroup,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Making stuff pub is ok for now, but this is an internal-only struct and many of its fields are related leading to invariants that need to be upheld, so making everything pub could be kinda misleading (pub fields can be written to arbitrarily in a good API imo, if not there should be a setter) and we probably want to tune it down a bit.

@joschisan joschisan added this pull request to the merge queue May 14, 2024
Merged via the queue into fedimint:master with commit 5500d0a May 14, 2024
21 checks passed
@joschisan joschisan deleted the refactor_server branch May 14, 2024 13:31
@bradleystachurski
Copy link
Member

review club: @joschisan what ended up being the solution for the problem you saw in CI?

Also, it would help in the review club if there was a description.

@bradleystachurski
Copy link
Member

bradleystachurski commented May 14, 2024

review club: dpc relayed that the problem was resolved by removing the diff that caused it. We should followup with an investigation to see what we were getting the No modules found of kind dummy error for the mint tests.

Edit: more context in discord

@bradleystachurski
Copy link
Member

#5286

@bradleystachurski bradleystachurski removed the needs further review Merged before reaching ideal amount of code review label May 14, 2024
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.

None yet

4 participants