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

feat(contract): add amount_of_proofs in TaskCreated event #1774

Conversation

uri-99
Copy link
Contributor

@uri-99 uri-99 commented Jan 21, 2025

Add amountOfProofs to TaskCreated event in BatcherPaymentService

Description

Caution

This upgrade requires a redeploy of the explorer because the ABI changes. Without redploying the explorer, it won't be able to get the feePerProof values for created batches

This feature may be of help in the future, but at the same time I wouldn't upgrade this contract for only this fix. It may be an acceptable PR if it is redeployed with another BatcherPayments upgrade.

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@uri-99 uri-99 self-assigned this Jan 21, 2025
Copy link
Contributor

@MauroToscano MauroToscano left a comment

Choose a reason for hiding this comment

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

Do we need to v2 here ?

@JuArce
Copy link
Collaborator

JuArce commented Feb 7, 2025

Do we need to v2 here ?

I think it is useless to add V2. I will remove it

chore: update ABIs in explorer and sdk
chore: update anvil state
@JuArce
Copy link
Collaborator

JuArce commented Feb 7, 2025

I made the following changes

  • Rename TaskCreatedV2 event to TaskCreated
  • Update the ABI in explorer and aligned-sdk
  • Update anvil state

Note: This PR requires redeploy the explorer after upgrading the contract

Copy link

Changes to gas cost

Generated at commit: 386cb2262f737ae97c8973624c804d51f044d5a5, compared to commit: 306f72d2c0f03f0107f55725c2ba5fa168f39fc4

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
RegistryCoordinatorHarness blsApkRegistry +332 ❌ +116.90%
Slasher initialize +470 ❌ +103.98%
StakeRegistryHarness delegation +332 ❌ +101.84%
AlignedLayerServiceManager batchesState +688 ❌ +95.29%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
RegistryCoordinatorHarness 10,130,048 (+4,267,886) blsApkRegistry
initialize
stakeRegistry
616 (+332)
56,281,475 (+1,577,892)
682 (+332)
+116.90%
+2.88%
+94.86%
616 (+332)
56,281,475 (+1,577,892)
682 (+332)
+116.90%
+2.88%
+94.86%
616 (+332)
56,281,475 (+1,577,892)
682 (+332)
+116.90%
+2.88%
+94.86%
616 (+332)
56,281,475 (+1,577,892)
682 (+332)
+116.90%
+2.88%
+94.86%
6 (0)
6 (0)
6 (0)
Slasher 1,598,813 (+762,834) initialize 922 (+470) +103.98% 922 (+470) +103.98% 922 (+470) +103.98% 922 (+470) +103.98% 6 (0)
StakeRegistryHarness 5,139,510 (+2,005,505) delegation
initializeQuorum
658 (+332)
146,200 (+3,117)
+101.84%
+2.18%
658 (+332)
165,996 (+3,117)
+101.84%
+1.91%
658 (+332)
166,100 (+3,117)
+101.84%
+1.91%
658 (+332)
166,100 (+3,117)
+101.84%
+1.91%
6 (0)
1,152 (0)
AlignedLayerServiceManager 8,615,423 (+3,384,189) batchesState
createNewTask
disableVerifier
disabledVerifiers
enableVerifier
isVerifierDisabled
receive
setDisabledVerifiers
1,410 (+688)
57,818 (+1,735)
24,299 (+390)
514 (+131)
24,191 (+390)
856 (+275)
23,496 (+179)
24,250 (+451)
+95.29%
+3.09%
+1.63%
+34.20%
+1.64%
+47.33%
+0.77%
+1.90%
1,410 (+688)
77,676 (+1,615)
35,816 (+315)
514 (+131)
24,760 (+315)
1,522 (+275)
47,097 (+182)
35,176 (+370)
+95.29%
+2.12%
+0.89%
+34.20%
+1.29%
+22.05%
+0.39%
+1.06%
1,410 (+688)
77,898 (+1,657)
35,816 (+315)
514 (+131)
24,760 (+315)
856 (+275)
47,472 (+277)
35,176 (+370)
+95.29%
+2.17%
+0.89%
+34.20%
+1.29%
+47.33%
+0.59%
+1.06%
1,410 (+688)
78,792 (+1,798)
47,334 (+240)
514 (+131)
25,329 (+240)
2,856 (+275)
47,472 (+277)
46,103 (+290)
+95.29%
+2.34%
+0.51%
+34.20%
+0.96%
+10.65%
+0.59%
+0.63%
256 (0)
256 (0)
2 (0)
1 (0)
2 (0)
3 (0)
256 (0)
2 (0)
ProxyAdmin 757,646 (+329,348) upgrade
upgradeAndCall
39,641 (+845)
56,632,018 (+1,579,612)
+2.18%
+2.87%
39,650 (+845)
56,632,018 (+1,579,612)
+2.18%
+2.87%
39,653 (+845)
56,632,018 (+1,579,612)
+2.18%
+2.87%
39,653 (+845)
56,632,018 (+1,579,612)
+2.18%
+2.87%
24 (0)
6 (0)
AVSDirectory 3,174,782 (+1,463,555) initialize 100,637 (+2,514) +2.56% 100,637 (+2,514) +2.56% 100,637 (+2,514) +2.56% 100,637 (+2,514) +2.56% 6 (0)
ServiceManagerMock 2,632,771 (+1,054,437) initialize 73,362 (+1,409) +1.96% 73,362 (+1,409) +1.96% 73,362 (+1,409) +1.96% 73,362 (+1,409) +1.96% 6 (0)
BLSApkRegistryHarness 3,124,237 (+1,317,862) initializeQuorum
setBLSPublicKey
45,978 (+772)
90,107 (+740)
+1.71%
+0.83%
45,978 (+772)
90,107 (+740)
+1.71%
+0.83%
45,978 (+772)
90,107 (+740)
+1.71%
+0.83%
45,978 (+772)
90,107 (+740)
+1.71%
+0.83%
1,152 (0)
6 (0)
TransparentUpgradeableProxy 897,999 (+341,241) fallback 1,544 (+477) +44.70% 48,066 (+774) +1.64% 8,110 (+477) +6.25% 120,000 (+885) +0.74% 30 (0)
IndexRegistry 1,707,545 (+637,885) initializeQuorum 45,592 (+528) +1.17% 45,592 (+528) +1.17% 45,592 (+528) +1.17% 45,592 (+528) +1.17% 1,152 (0)
StrategyManagerMock 2,401,372 (+1,154,891) setAddresses 89,742 (+597) +0.67% 89,742 (+597) +0.67% 89,742 (+597) +0.67% 89,742 (+597) +0.67% 6 (0)

@MauroToscano MauroToscano added this pull request to the merge queue Feb 10, 2025
Merged via the queue into staging with commit 31019a9 Feb 10, 2025
6 checks passed
@MauroToscano MauroToscano deleted the 1761-featcontract-add-amount_of_proofs-in-taskcreated-event branch February 10, 2025 20:26
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