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

HC: Lazy leader #4183

Merged
merged 3 commits into from Aug 11, 2023
Merged

HC: Lazy leader #4183

merged 3 commits into from Aug 11, 2023

Conversation

velzevur
Copy link
Member

Closes #3929

The work on this PR has been supported by ACF.

{error, not_leader};
ok ->
{ok, Leader}
end;
{error, What} ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this have an eventual timeout somewhere or will it carry on forever?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would guess no timeout - we don't timeout on trying to find a PoW solution either. Also the next leader is being elected by a contract and could use some block time in its calculations so if Alice is not a leader now, she could be in 10 seconds.

Copy link
Contributor

@seanhinde seanhinde left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Member

@uwiger uwiger left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -202,7 +214,7 @@ post_request(Path, Body, Host, Port, Timeout) ->
{ok, {{_, 200 = _Code, _}, _, Res}} ->
lager:debug("Req: ~p, Res: ~p with URL: ~ts", [Req, Res, Url]),
{ok, jsx:decode(list_to_binary(Res), [return_maps])};
{ok, {{_, 400, _}, _, Res}} ->
{ok, {{_ ,400, _}, _, Res}} ->
Copy link
Member

Choose a reason for hiding this comment

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

Why?

@velzevur velzevur merged commit a5991eb into master Aug 11, 2023
35 checks passed
@velzevur velzevur deleted the hc_lazy_leader_14_rebased branch August 11, 2023 11:51
@dincho dincho added kind/feature Issues or PRs related to a new feature area/hyperchains labels Nov 24, 2023
mitchelli pushed a commit that referenced this pull request Jan 22, 2024
HC Lazy leader implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hyperchains kind/feature Issues or PRs related to a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HC: post commitments on the parent chain - lazy leader
4 participants