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

LidoOracleNew, ValidatorExitBus: initial rough version of hash consensus #485

Merged
merged 7 commits into from
Jan 11, 2023

Conversation

arwer13
Copy link
Contributor

@arwer13 arwer13 commented Jan 10, 2023

Initial untidy version of hash consensus, with further data report in single tx. Its purpose is to provide tooling with capability to test agains "two-phaseness".

It will be reimplemented/updated by further solid PR.

NB: gas consumption of reporting keys to eject (call to ValidatorExitBus.handleReportData) is:

1: 121465 per key (121465 total)
3: 33941.666666666664 per key (101825 total)
10: 16263.9 per key (162639 total)
40: 10604.475 per key (424179 total)
100: 9519.35 per key (951935 total)

(see test "Calculate gas usages")

Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

🚀 Blazingly fast

Though, have some questions 👀 :

contracts/0.8.9/ValidatorExitBus.sol Outdated Show resolved Hide resolved
contracts/0.8.9/ValidatorExitBus.sol Outdated Show resolved Hide resolved
@arwer13
Copy link
Contributor Author

arwer13 commented Jan 11, 2023

Current gas consumption of ValidatorExitBus.handleReportData:

1: 102572 per key (102572 total)
10: 13908.9 per key (139089 total)
100: 9133.84 per key (913384 total)
500: 9046.998 per key (4523499 total)

and without emit ConsensusDataDelivered(…):

1: 97440 per key (97440 total)
10: 11227.8 per key (112278 total)
100: 6703.09 per key (670309 total)
500: 6457.42 per key (3228710 total)

Copy link
Member

@folkyatina folkyatina left a comment

Choose a reason for hiding this comment

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

Looks fine for our needs.
There is some places that can be rewritten for clarity , but it is not worth it since we'll rewrite it anyway.

Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

It's good enough for testnets 👍

@arwer13 arwer13 merged commit 86d68d2 into feature/shapella-upgrade Jan 11, 2023
@arwer13 arwer13 deleted the feature/hash-consensus branch January 11, 2023 16:21
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