@aztec-foundation/l1-artifacts 6.0.0-rc.2 → 6.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/AttesterExitExtLibAbi.d.ts +12 -48
- package/dest/AttesterExitExtLibAbi.d.ts.map +1 -1
- package/dest/AttesterExitExtLibAbi.js +16 -64
- package/dest/AttesterExitExtLibAbi.js.map +1 -1
- package/dest/AttesterExitExtLibBytecode.d.ts +1 -1
- package/dest/AttesterExitExtLibBytecode.js +1 -1
- package/dest/CoinIssuerAbi.d.ts +12 -48
- package/dest/CoinIssuerAbi.d.ts.map +1 -1
- package/dest/CoinIssuerAbi.js +16 -64
- package/dest/CoinIssuerAbi.js.map +1 -1
- package/dest/DateGatedRelayerAbi.d.ts +12 -48
- package/dest/DateGatedRelayerAbi.d.ts.map +1 -1
- package/dest/DateGatedRelayerAbi.js +16 -64
- package/dest/DateGatedRelayerAbi.js.map +1 -1
- package/dest/EmpireBaseAbi.d.ts +12 -48
- package/dest/EmpireBaseAbi.d.ts.map +1 -1
- package/dest/EmpireBaseAbi.js +16 -64
- package/dest/EmpireBaseAbi.js.map +1 -1
- package/dest/EpochProofExtLibAbi.d.ts +12 -48
- package/dest/EpochProofExtLibAbi.d.ts.map +1 -1
- package/dest/EpochProofExtLibAbi.js +16 -64
- package/dest/EpochProofExtLibAbi.js.map +1 -1
- package/dest/EpochProofExtLibBytecode.d.ts +1 -1
- package/dest/EpochProofExtLibBytecode.d.ts.map +1 -1
- package/dest/EpochProofExtLibBytecode.js +1 -1
- package/dest/EpochProofExtLibBytecode.js.map +1 -1
- package/dest/ErrorsAbi.d.ts +12 -48
- package/dest/ErrorsAbi.d.ts.map +1 -1
- package/dest/ErrorsAbi.js +16 -64
- package/dest/ErrorsAbi.js.map +1 -1
- package/dest/EscapeHatchAbi.d.ts +12 -48
- package/dest/EscapeHatchAbi.d.ts.map +1 -1
- package/dest/EscapeHatchAbi.js +16 -64
- package/dest/EscapeHatchAbi.js.map +1 -1
- package/dest/EscapeHatchBytecode.d.ts +1 -1
- package/dest/EscapeHatchBytecode.js +1 -1
- package/dest/EscapeHatchStorage.d.ts +2 -2
- package/dest/EscapeHatchStorage.js +2 -2
- package/dest/FeeAssetHandlerAbi.d.ts +12 -48
- package/dest/FeeAssetHandlerAbi.d.ts.map +1 -1
- package/dest/FeeAssetHandlerAbi.js +16 -64
- package/dest/FeeAssetHandlerAbi.js.map +1 -1
- package/dest/FeeJuicePortalAbi.d.ts +12 -48
- package/dest/FeeJuicePortalAbi.d.ts.map +1 -1
- package/dest/FeeJuicePortalAbi.js +16 -64
- package/dest/FeeJuicePortalAbi.js.map +1 -1
- package/dest/FeeJuicePortalBytecode.d.ts +1 -1
- package/dest/FeeJuicePortalBytecode.js +1 -1
- package/dest/GSEAbi.d.ts +12 -48
- package/dest/GSEAbi.d.ts.map +1 -1
- package/dest/GSEAbi.js +16 -64
- package/dest/GSEAbi.js.map +1 -1
- package/dest/GovernanceAbi.d.ts +12 -48
- package/dest/GovernanceAbi.d.ts.map +1 -1
- package/dest/GovernanceAbi.js +16 -64
- package/dest/GovernanceAbi.js.map +1 -1
- package/dest/GovernanceProposerAbi.d.ts +12 -48
- package/dest/GovernanceProposerAbi.d.ts.map +1 -1
- package/dest/GovernanceProposerAbi.js +16 -64
- package/dest/GovernanceProposerAbi.js.map +1 -1
- package/dest/HonkVerifierAbi.d.ts +12 -48
- package/dest/HonkVerifierAbi.d.ts.map +1 -1
- package/dest/HonkVerifierAbi.js +16 -64
- package/dest/HonkVerifierAbi.js.map +1 -1
- package/dest/IERC20Abi.d.ts +12 -48
- package/dest/IERC20Abi.d.ts.map +1 -1
- package/dest/IERC20Abi.js +16 -64
- package/dest/IERC20Abi.js.map +1 -1
- package/dest/ISequencerRewardCalculatorAbi.d.ts +2607 -0
- package/dest/ISequencerRewardCalculatorAbi.d.ts.map +1 -0
- package/dest/ISequencerRewardCalculatorAbi.js +3473 -0
- package/dest/ISequencerRewardCalculatorAbi.js.map +1 -0
- package/dest/ISequencerRewardCalculatorBytecode.d.ts +9 -0
- package/dest/ISequencerRewardCalculatorBytecode.d.ts.map +1 -0
- package/dest/ISequencerRewardCalculatorBytecode.js +9 -0
- package/dest/ISequencerRewardCalculatorBytecode.js.map +1 -0
- package/dest/IVerifierAbi.d.ts +12 -48
- package/dest/IVerifierAbi.d.ts.map +1 -1
- package/dest/IVerifierAbi.js +16 -64
- package/dest/IVerifierAbi.js.map +1 -1
- package/dest/InboxAbi.d.ts +12 -48
- package/dest/InboxAbi.d.ts.map +1 -1
- package/dest/InboxAbi.js +16 -64
- package/dest/InboxAbi.js.map +1 -1
- package/dest/InboxBytecode.d.ts +1 -1
- package/dest/InboxBytecode.js +1 -1
- package/dest/MockVerifierAbi.d.ts +12 -48
- package/dest/MockVerifierAbi.d.ts.map +1 -1
- package/dest/MockVerifierAbi.js +16 -64
- package/dest/MockVerifierAbi.js.map +1 -1
- package/dest/MockZKPassportVerifierAbi.d.ts +12 -48
- package/dest/MockZKPassportVerifierAbi.d.ts.map +1 -1
- package/dest/MockZKPassportVerifierAbi.js +16 -64
- package/dest/MockZKPassportVerifierAbi.js.map +1 -1
- package/dest/MultiAdderAbi.d.ts +12 -48
- package/dest/MultiAdderAbi.d.ts.map +1 -1
- package/dest/MultiAdderAbi.js +16 -64
- package/dest/MultiAdderAbi.js.map +1 -1
- package/dest/MultiAdderBytecode.d.ts +1 -1
- package/dest/MultiAdderBytecode.js +1 -1
- package/dest/NewGovernanceProposerPayloadAbi.d.ts +12 -48
- package/dest/NewGovernanceProposerPayloadAbi.d.ts.map +1 -1
- package/dest/NewGovernanceProposerPayloadAbi.js +16 -64
- package/dest/NewGovernanceProposerPayloadAbi.js.map +1 -1
- package/dest/OutboxAbi.d.ts +12 -48
- package/dest/OutboxAbi.d.ts.map +1 -1
- package/dest/OutboxAbi.js +16 -64
- package/dest/OutboxAbi.js.map +1 -1
- package/dest/OutboxBytecode.d.ts +1 -1
- package/dest/OutboxBytecode.js +1 -1
- package/dest/RegisterNewRollupVersionPayloadAbi.d.ts +12 -48
- package/dest/RegisterNewRollupVersionPayloadAbi.d.ts.map +1 -1
- package/dest/RegisterNewRollupVersionPayloadAbi.js +16 -64
- package/dest/RegisterNewRollupVersionPayloadAbi.js.map +1 -1
- package/dest/RegisterNewRollupVersionPayloadBytecode.d.ts +1 -1
- package/dest/RegisterNewRollupVersionPayloadBytecode.js +1 -1
- package/dest/RegistryAbi.d.ts +12 -48
- package/dest/RegistryAbi.d.ts.map +1 -1
- package/dest/RegistryAbi.js +16 -64
- package/dest/RegistryAbi.js.map +1 -1
- package/dest/RewardDistributorAbi.d.ts +12 -48
- package/dest/RewardDistributorAbi.d.ts.map +1 -1
- package/dest/RewardDistributorAbi.js +16 -64
- package/dest/RewardDistributorAbi.js.map +1 -1
- package/dest/RewardExtLibAbi.d.ts +59 -48
- package/dest/RewardExtLibAbi.d.ts.map +1 -1
- package/dest/RewardExtLibAbi.js +77 -64
- package/dest/RewardExtLibAbi.js.map +1 -1
- package/dest/RewardExtLibBytecode.d.ts +1 -1
- package/dest/RewardExtLibBytecode.d.ts.map +1 -1
- package/dest/RewardExtLibBytecode.js +1 -1
- package/dest/RewardExtLibBytecode.js.map +1 -1
- package/dest/RollupAbi.d.ts +72 -79
- package/dest/RollupAbi.d.ts.map +1 -1
- package/dest/RollupAbi.js +93 -104
- package/dest/RollupAbi.js.map +1 -1
- package/dest/RollupBytecode.d.ts +91 -82
- package/dest/RollupBytecode.d.ts.map +1 -1
- package/dest/RollupBytecode.js +94 -82
- package/dest/RollupBytecode.js.map +1 -1
- package/dest/RollupOperationsExtLibAbi.d.ts +12 -48
- package/dest/RollupOperationsExtLibAbi.d.ts.map +1 -1
- package/dest/RollupOperationsExtLibAbi.js +16 -64
- package/dest/RollupOperationsExtLibAbi.js.map +1 -1
- package/dest/RollupOperationsExtLibBytecode.d.ts +1 -1
- package/dest/RollupOperationsExtLibBytecode.d.ts.map +1 -1
- package/dest/RollupOperationsExtLibBytecode.js +1 -1
- package/dest/RollupOperationsExtLibBytecode.js.map +1 -1
- package/dest/RollupStorage.d.ts +2 -2
- package/dest/RollupStorage.js +2 -2
- package/dest/SlasherAbi.d.ts +12 -48
- package/dest/SlasherAbi.d.ts.map +1 -1
- package/dest/SlasherAbi.js +16 -64
- package/dest/SlasherAbi.js.map +1 -1
- package/dest/SlasherDeploymentExtLibAbi.d.ts +12 -48
- package/dest/SlasherDeploymentExtLibAbi.d.ts.map +1 -1
- package/dest/SlasherDeploymentExtLibAbi.js +16 -64
- package/dest/SlasherDeploymentExtLibAbi.js.map +1 -1
- package/dest/SlasherDeploymentExtLibBytecode.d.ts +1 -1
- package/dest/SlasherDeploymentExtLibBytecode.d.ts.map +1 -1
- package/dest/SlasherDeploymentExtLibBytecode.js +1 -1
- package/dest/SlasherDeploymentExtLibBytecode.js.map +1 -1
- package/dest/SlashingProposerAbi.d.ts +12 -48
- package/dest/SlashingProposerAbi.d.ts.map +1 -1
- package/dest/SlashingProposerAbi.js +16 -64
- package/dest/SlashingProposerAbi.js.map +1 -1
- package/dest/SlashingProposerBytecode.d.ts +1 -1
- package/dest/SlashingProposerBytecode.js +1 -1
- package/dest/StakingAssetHandlerAbi.d.ts +12 -48
- package/dest/StakingAssetHandlerAbi.d.ts.map +1 -1
- package/dest/StakingAssetHandlerAbi.js +16 -64
- package/dest/StakingAssetHandlerAbi.js.map +1 -1
- package/dest/TestERC20Abi.d.ts +12 -48
- package/dest/TestERC20Abi.d.ts.map +1 -1
- package/dest/TestERC20Abi.js +16 -64
- package/dest/TestERC20Abi.js.map +1 -1
- package/dest/TokenPortalAbi.d.ts +12 -48
- package/dest/TokenPortalAbi.d.ts.map +1 -1
- package/dest/TokenPortalAbi.js +16 -64
- package/dest/TokenPortalAbi.js.map +1 -1
- package/dest/TokenPortalBytecode.d.ts +1 -1
- package/dest/TokenPortalBytecode.js +1 -1
- package/dest/UniswapPortalAbi.d.ts +12 -48
- package/dest/UniswapPortalAbi.d.ts.map +1 -1
- package/dest/UniswapPortalAbi.js +16 -64
- package/dest/UniswapPortalAbi.js.map +1 -1
- package/dest/UniswapPortalBytecode.d.ts +1 -1
- package/dest/UniswapPortalBytecode.js +1 -1
- package/dest/ValidatorOperationsExtLibAbi.d.ts +12 -48
- package/dest/ValidatorOperationsExtLibAbi.d.ts.map +1 -1
- package/dest/ValidatorOperationsExtLibAbi.js +16 -64
- package/dest/ValidatorOperationsExtLibAbi.js.map +1 -1
- package/dest/ValidatorOperationsExtLibBytecode.d.ts +1 -1
- package/dest/ValidatorOperationsExtLibBytecode.d.ts.map +1 -1
- package/dest/ValidatorOperationsExtLibBytecode.js +1 -1
- package/dest/ValidatorOperationsExtLibBytecode.js.map +1 -1
- package/dest/ValidatorSelectionLibAbi.d.ts +12 -48
- package/dest/ValidatorSelectionLibAbi.d.ts.map +1 -1
- package/dest/ValidatorSelectionLibAbi.js +16 -64
- package/dest/ValidatorSelectionLibAbi.js.map +1 -1
- package/dest/ValidatorSelectionLibBytecode.d.ts +1 -1
- package/dest/ValidatorSelectionLibBytecode.js +1 -1
- package/dest/checksum.d.ts +1 -1
- package/dest/checksum.js +1 -1
- package/dest/index.d.ts +2 -0
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -0
- package/dest/index.js.map +1 -1
- package/l1-contracts/cache/solidity-files-cache.json +1 -1
- package/l1-contracts/foundry.toml +1 -1
- package/l1-contracts/out/AddressSnapshotLib.sol/AddressSnapshotLib.json +1 -1
- package/l1-contracts/out/AttestationLib.sol/AttestationLib.json +1 -1
- package/l1-contracts/out/AttesterExitExtLib.sol/AttesterExitExtLib.json +1 -1
- package/l1-contracts/out/BN254Lib.sol/BN254Lib.json +1 -1
- package/l1-contracts/out/Ballot.sol/BallotLib.json +1 -1
- package/l1-contracts/out/BlobLib.sol/BlobLib.json +1 -1
- package/l1-contracts/out/Bn254LibWrapper.sol/Bn254LibWrapper.json +1 -1
- package/l1-contracts/out/CheckpointLog.sol/CompressedTempCheckpointLogLib.json +1 -1
- package/l1-contracts/out/CheckpointedUintLib.sol/CheckpointedUintLib.json +1 -1
- package/l1-contracts/out/CoinIssuer.sol/CoinIssuer.json +1 -1
- package/l1-contracts/out/CompressedTimeMath.sol/CompressedTimeMath.json +1 -1
- package/l1-contracts/out/Configuration.sol/CompressedConfigurationLib.json +1 -1
- package/l1-contracts/out/ConfigurationLib.sol/ConfigurationLib.json +1 -1
- package/l1-contracts/out/ConstantsGen.sol/Constants.json +1 -1
- package/l1-contracts/out/CoordinationSignatureLib.sol/CoordinationSignatureLib.json +1 -1
- package/l1-contracts/out/DataStructures.sol/DataStructures.json +1 -1
- package/l1-contracts/out/DateGatedRelayer.sol/DateGatedRelayer.json +1 -1
- package/l1-contracts/out/DeployAztecL1Contracts.s.sol/DeployAztecL1Contracts.json +1 -1
- package/l1-contracts/out/DeployRollupForUpgrade.s.sol/DeployRollupForUpgrade.json +1 -1
- package/l1-contracts/out/DeployRollupLib.sol/DeployRollupLib.json +1 -1
- package/l1-contracts/out/DeploymentConfiguration.sol/DeploymentConfiguration.json +1 -1
- package/l1-contracts/out/DeploymentConfiguration.sol/IDeploymentConfiguration.json +1 -1
- package/l1-contracts/out/DepositDelegationLib.sol/DepositDelegationLib.json +1 -1
- package/l1-contracts/out/EmpireBase.sol/EmpireBase.json +1 -1
- package/l1-contracts/out/EpochProofExtLib.sol/EpochProofExtLib.json +1 -1
- package/l1-contracts/out/EpochProofLib.sol/EpochProofLib.json +1 -1
- package/l1-contracts/out/Errors.sol/Errors.json +1 -1
- package/l1-contracts/out/EscapeHatch.sol/EscapeHatch.json +1 -1
- package/l1-contracts/out/FeeAssetHandler.sol/FeeAssetHandler.json +1 -1
- package/l1-contracts/out/FeeAssetHandler.sol/IFeeAssetHandler.json +1 -1
- package/l1-contracts/out/FeeConfig.sol/FeeConfigLib.json +1 -1
- package/l1-contracts/out/FeeConfig.sol/PriceLib.json +1 -1
- package/l1-contracts/out/FeeJuicePortal.sol/FeeJuicePortal.json +1 -1
- package/l1-contracts/out/FeeLib.sol/FeeLib.json +1 -1
- package/l1-contracts/out/FeeStructs.sol/FeeHeaderLib.json +1 -1
- package/l1-contracts/out/FeeStructs.sol/FeeStructsLib.json +1 -1
- package/l1-contracts/out/FieldLib.sol/FieldLib.json +1 -1
- package/l1-contracts/out/FlushRewarder.sol/FlushRewarder.json +1 -1
- package/l1-contracts/out/GSE.sol/GSE.json +1 -1
- package/l1-contracts/out/GSE.sol/GSECore.json +1 -1
- package/l1-contracts/out/GSE.sol/IGSE.json +1 -1
- package/l1-contracts/out/GSE.sol/IGSECore.json +1 -1
- package/l1-contracts/out/GSEPayload.sol/GSEPayload.json +1 -1
- package/l1-contracts/out/Governance.sol/Governance.json +1 -1
- package/l1-contracts/out/GovernanceProposer.sol/GovernanceProposer.json +1 -1
- package/l1-contracts/out/Hash.sol/Hash.json +1 -1
- package/l1-contracts/out/HonkVerifier.sol/HonkVerifier.json +1 -1
- package/l1-contracts/out/IBn254LibWrapper.sol/IBn254LibWrapper.json +1 -1
- package/l1-contracts/out/ICoinIssuer.sol/ICoinIssuer.json +1 -1
- package/l1-contracts/out/IDateGatedRelayer.sol/IDateGatedRelayer.json +1 -1
- package/l1-contracts/out/IEmpire.sol/IEmperor.json +1 -1
- package/l1-contracts/out/IEmpire.sol/IEmpire.json +1 -1
- package/l1-contracts/out/IFeeJuicePortal.sol/IFeeJuicePortal.json +1 -1
- package/l1-contracts/out/IFlushRewarder.sol/IFlushRewarder.json +1 -1
- package/l1-contracts/out/IGovernance.sol/IGovernance.json +1 -1
- package/l1-contracts/out/IGovernanceProposer.sol/IGovernanceProposer.json +1 -1
- package/l1-contracts/out/IInbox.sol/IInbox.json +1 -1
- package/l1-contracts/out/IInstance.sol/IInstance.json +1 -1
- package/l1-contracts/out/IMintableERC20.sol/IMintableERC20.json +1 -1
- package/l1-contracts/out/IOutbox.sol/IOutbox.json +1 -1
- package/l1-contracts/out/IPayload.sol/IPayload.json +1 -1
- package/l1-contracts/out/IProposerPayload.sol/IProposerPayload.json +1 -1
- package/l1-contracts/out/IRegistry.sol/IHaveVersion.json +1 -1
- package/l1-contracts/out/IRegistry.sol/IRegistry.json +1 -1
- package/l1-contracts/out/IRewardDistributor.sol/IRewardDistributor.json +1 -1
- package/l1-contracts/out/IRollup.sol/IRollup.json +1 -1
- package/l1-contracts/out/IRollup.sol/IRollupCore.json +1 -1
- package/l1-contracts/out/IRootRegistry.sol/IRootRegistry.json +1 -1
- package/l1-contracts/out/ISequencerRewardCalculator.sol/ISequencerRewardCalculator.json +1 -0
- package/l1-contracts/out/ISlasher.sol/ISlasher.json +1 -1
- package/l1-contracts/out/IStaking.sol/IStaking.json +1 -1
- package/l1-contracts/out/IStaking.sol/IStakingCore.json +1 -1
- package/l1-contracts/out/IValidatorSelection.sol/IValidatorSelection.json +1 -1
- package/l1-contracts/out/IValidatorSelection.sol/IValidatorSelectionCore.json +1 -1
- package/l1-contracts/out/IVerifier.sol/IVerifier.json +1 -1
- package/l1-contracts/out/Inbox.sol/Inbox.json +1 -1
- package/l1-contracts/out/InputsExtractor.sol/InputsExtractor.json +1 -1
- package/l1-contracts/out/InvalidateLib.sol/InvalidateLib.json +1 -1
- package/l1-contracts/out/MerkleLib.sol/MerkleLib.json +1 -1
- package/l1-contracts/out/MockERC20.sol/MockERC20.json +1 -1
- package/l1-contracts/out/MockERC721.sol/MockERC721.json +1 -1
- package/l1-contracts/out/MockFeeJuicePortal.sol/MockFeeJuicePortal.json +1 -1
- package/l1-contracts/out/MockVerifier.sol/MockVerifier.json +1 -1
- package/l1-contracts/out/MockZKPassportVerifier.sol/IZKPassportVerifier.json +1 -1
- package/l1-contracts/out/MockZKPassportVerifier.sol/MockZKPassportVerifier.json +1 -1
- package/l1-contracts/out/MultiAdder.sol/IMultiAdder.json +1 -1
- package/l1-contracts/out/MultiAdder.sol/MultiAdder.json +1 -1
- package/l1-contracts/out/Outbox.sol/Outbox.json +1 -1
- package/l1-contracts/out/OuterCount8.sol/HonkVerifier.json +1 -1
- package/l1-contracts/out/Proposal.sol/CompressedProposalLib.json +1 -1
- package/l1-contracts/out/ProposalLib.sol/ProposalLib.json +1 -1
- package/l1-contracts/out/ProposeLib.sol/ProposeLib.json +1 -1
- package/l1-contracts/out/ProposedHeaderLib.sol/ProposedHeaderLib.json +1 -1
- package/l1-contracts/out/RegisterNewRollupVersionPayload.sol/RegisterNewRollupVersionPayload.json +1 -1
- package/l1-contracts/out/Registry.sol/Registry.json +1 -1
- package/l1-contracts/out/RewardBooster.sol/IBooster.json +1 -1
- package/l1-contracts/out/RewardBooster.sol/IBoosterCore.json +1 -1
- package/l1-contracts/out/RewardBooster.sol/RewardBooster.json +1 -1
- package/l1-contracts/out/RewardDistributor.sol/RewardDistributor.json +1 -1
- package/l1-contracts/out/RewardExtLib.sol/RewardExtLib.json +1 -1
- package/l1-contracts/out/RewardLib.sol/BpsLib.json +1 -1
- package/l1-contracts/out/RewardLib.sol/RewardLib.json +1 -1
- package/l1-contracts/out/Rollup.sol/Rollup.json +1 -1
- package/l1-contracts/out/RollupConfiguration.sol/IRollupConfiguration.json +1 -1
- package/l1-contracts/out/RollupConfiguration.sol/RollupConfiguration.json +1 -1
- package/l1-contracts/out/RollupCore.sol/RollupCore.json +1 -1
- package/l1-contracts/out/RollupOperationsExtLib.sol/RollupOperationsExtLib.json +1 -1
- package/l1-contracts/out/STFLib.sol/STFLib.json +1 -1
- package/l1-contracts/out/SampleLib.sol/SampleLib.json +1 -1
- package/l1-contracts/out/SequencerRewardCalculatorLib.sol/SequencerRewardCalculatorLib.json +1 -0
- package/l1-contracts/out/SignatureLib.sol/SignatureLib.json +1 -1
- package/l1-contracts/out/SlashPayload.sol/SlashPayload.json +1 -1
- package/l1-contracts/out/SlashPayloadCloneable.sol/SlashPayloadCloneable.json +1 -1
- package/l1-contracts/out/SlashPayloadLib.sol/SlashPayloadLib.json +1 -1
- package/l1-contracts/out/SlashRoundLib.sol/CompressedSlashRoundMath.json +1 -1
- package/l1-contracts/out/Slasher.sol/Slasher.json +1 -1
- package/l1-contracts/out/SlasherDeploymentExtLib.sol/SlasherDeploymentExtLib.json +1 -1
- package/l1-contracts/out/SlashingProposer.sol/SlashingProposer.json +1 -1
- package/l1-contracts/out/StakingAssetHandler.sol/IStakingAssetHandler.json +1 -1
- package/l1-contracts/out/StakingAssetHandler.sol/StakingAssetHandler.json +1 -1
- package/l1-contracts/out/StakingLib.sol/StakingLib.json +1 -1
- package/l1-contracts/out/StakingQueue.sol/StakingQueueLib.json +1 -1
- package/l1-contracts/out/StakingQueueConfig.sol/StakingQueueConfigLib.json +1 -1
- package/l1-contracts/out/StdError.sol/stdError.json +1 -1
- package/l1-contracts/out/TestERC20.sol/TestERC20.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/CallAssetPayload.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/CallRevertingPayload.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/EmptyPayload.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/FakeRollup.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/RevertingCall.json +1 -1
- package/l1-contracts/out/TestPayloads.sol/UpgradePayload.json +1 -1
- package/l1-contracts/out/TimeLib.sol/TimeLib.json +1 -1
- package/l1-contracts/out/Tips.sol/ChainTipsLib.json +1 -1
- package/l1-contracts/out/ValidatorOperationsExtLib.sol/ValidatorOperationsExtLib.json +1 -1
- package/l1-contracts/out/ValidatorSelectionLib.sol/ValidatorSelectionLib.json +1 -1
- package/l1-contracts/out/ZKPassportHelper.sol/ZKPassportHelper.json +1 -1
- package/l1-contracts/out/ZKPassportRootVerifier.sol/ZKPassportRootVerifier.json +1 -1
- package/l1-contracts/out/ZKPassportSubVerifier.sol/ZKPassportSubVerifier.json +1 -1
- package/l1-contracts/out/build-info/4cb7b5442b848dcc.json +1 -0
- package/l1-contracts/out/generated/HonkVerifier.sol/HonkVerifier.json +1 -1
- package/l1-contracts/out/libraries/Errors.sol/Errors.json +1 -1
- package/l1-contracts/out/rollup/BlobLib.sol/BlobLib.json +1 -1
- package/l1-contracts/out/src/ZKPassportHelper.sol/ZKPassportHelper.json +1 -1
- package/l1-contracts/out/src/ZKPassportRootVerifier.sol/ZKPassportRootVerifier.json +1 -1
- package/l1-contracts/out/src/ZKPassportSubVerifier.sol/ZKPassportSubVerifier.json +1 -1
- package/l1-contracts/script/deploy/RollupConfiguration.sol +5 -19
- package/l1-contracts/scripts/network-defaults.json +1 -2
- package/l1-contracts/src/core/Rollup.sol +18 -12
- package/l1-contracts/src/core/RollupCore.sol +14 -27
- package/l1-contracts/src/core/interfaces/IRollup.sol +7 -11
- package/l1-contracts/src/core/interfaces/ISequencerRewardCalculator.sol +39 -0
- package/l1-contracts/src/core/interfaces/IValidatorSelection.sol +0 -2
- package/l1-contracts/src/core/libraries/Errors.sol +3 -6
- package/l1-contracts/src/core/libraries/rollup/BlobLib.sol +16 -6
- package/l1-contracts/src/core/libraries/rollup/EpochProofExtLib.sol +2 -7
- package/l1-contracts/src/core/libraries/rollup/EpochProofLib.sol +4 -12
- package/l1-contracts/src/core/libraries/rollup/RewardExtLib.sol +30 -12
- package/l1-contracts/src/core/libraries/rollup/RewardLib.sol +187 -250
- package/l1-contracts/src/core/libraries/rollup/SequencerRewardCalculatorLib.sol +110 -0
- package/l1-contracts/src/core/libraries/rollup/ValidatorSelectionLib.sol +2 -4
- package/package.json +1 -1
- package/l1-contracts/out/RewardLib.sol/IATP.json +0 -1
- package/l1-contracts/out/RewardLib.sol/IATPStaker.json +0 -1
- package/l1-contracts/out/build-info/f88e638ee47a1ead.json +0 -1
|
@@ -6,12 +6,11 @@ import {RollupConfig, SubmitEpochRootProofArgs} from "@aztec/core/interfaces/IRo
|
|
|
6
6
|
import {CompressedFeeHeader, FeeHeaderLib} from "@aztec/core/libraries/compressed-data/fees/FeeStructs.sol";
|
|
7
7
|
import {Errors} from "@aztec/core/libraries/Errors.sol";
|
|
8
8
|
import {ProposedHeader} from "@aztec/core/libraries/rollup/ProposedHeaderLib.sol";
|
|
9
|
-
import {
|
|
9
|
+
import {SequencerRewardCalculatorLib} from "@aztec/core/libraries/rollup/SequencerRewardCalculatorLib.sol";
|
|
10
10
|
import {STFLib} from "@aztec/core/libraries/rollup/STFLib.sol";
|
|
11
11
|
import {ValidatorSelectionLib} from "@aztec/core/libraries/rollup/ValidatorSelectionLib.sol";
|
|
12
12
|
import {Epoch, Timestamp, TimeLib} from "@aztec/core/libraries/TimeLib.sol";
|
|
13
13
|
import {IBoosterCore} from "@aztec/core/reward-boost/RewardBooster.sol";
|
|
14
|
-
import {GSE} from "@aztec/governance/GSE.sol";
|
|
15
14
|
import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol";
|
|
16
15
|
import {IERC20} from "@oz/token/ERC20/IERC20.sol";
|
|
17
16
|
import {SafeERC20} from "@oz/token/ERC20/utils/SafeERC20.sol";
|
|
@@ -21,31 +20,21 @@ import {BitMaps} from "@oz/utils/structs/BitMaps.sol";
|
|
|
21
20
|
|
|
22
21
|
type Bps is uint32;
|
|
23
22
|
|
|
24
|
-
/**
|
|
25
|
-
* @notice The subset of an Aztec Token Position (ATP) staker contract that the reward computation relies on.
|
|
26
|
-
* @dev ATP stakers register themselves as the GSE withdrawer when they deposit, so the withdrawer of an ATP-backed
|
|
27
|
-
* validator is the staker, not the ATP. The staker only exposes the ATP it belongs to.
|
|
28
|
-
*/
|
|
29
|
-
interface IATPStaker {
|
|
30
|
-
function getATP() external view returns (address);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @notice The subset of an Aztec Token Position (ATP) contract that the reward computation relies on.
|
|
35
|
-
*/
|
|
36
|
-
interface IATP {
|
|
37
|
-
function getRegistry() external view returns (address);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
23
|
library BpsLib {
|
|
41
24
|
function mul(uint256 _a, Bps _b) internal pure returns (uint256) {
|
|
42
25
|
return _a * uint256(Bps.unwrap(_b)) / 10_000;
|
|
43
26
|
}
|
|
44
27
|
}
|
|
45
28
|
|
|
29
|
+
struct ProverRegistration {
|
|
30
|
+
uint248 shares;
|
|
31
|
+
bool fullEpoch; // Set to true when the registration was submitted after the epoch is closed, with a proof of the
|
|
32
|
+
// full epoch. Used for activity score bumping
|
|
33
|
+
}
|
|
34
|
+
|
|
46
35
|
struct SubEpochRewards {
|
|
47
36
|
uint256 summedShares;
|
|
48
|
-
mapping(address prover =>
|
|
37
|
+
mapping(address prover => ProverRegistration) registrations;
|
|
49
38
|
}
|
|
50
39
|
|
|
51
40
|
struct EpochRewards {
|
|
@@ -54,13 +43,6 @@ struct EpochRewards {
|
|
|
54
43
|
mapping(uint256 length => SubEpochRewards) subEpoch;
|
|
55
44
|
}
|
|
56
45
|
|
|
57
|
-
uint256 constant MAX_REGISTRY_REWARD_OVERRIDES = 2;
|
|
58
|
-
|
|
59
|
-
struct RegistryRewardOverride {
|
|
60
|
-
address registry;
|
|
61
|
-
uint96 sequencerReward;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
46
|
struct RewardConfig {
|
|
65
47
|
IRewardDistributor rewardDistributor;
|
|
66
48
|
Bps sequencerBps;
|
|
@@ -82,6 +64,8 @@ struct RewardStorage {
|
|
|
82
64
|
mapping(address prover => BitMaps.BitMap claimed) proverClaimed;
|
|
83
65
|
RewardConfig config;
|
|
84
66
|
address protocolFeeRecipient;
|
|
67
|
+
// ISequencerRewardCalculator; zero means every checkpoint receives the default sequencer reward.
|
|
68
|
+
address sequencerRewardCalculator;
|
|
85
69
|
}
|
|
86
70
|
|
|
87
71
|
struct Values {
|
|
@@ -90,20 +74,17 @@ struct Values {
|
|
|
90
74
|
uint256 protocolFee;
|
|
91
75
|
uint256 proverFee;
|
|
92
76
|
uint256 sequencerFee;
|
|
77
|
+
// Default path: every newly proven checkpoint receives this reward.
|
|
78
|
+
uint256 sequencerCheckpointReward;
|
|
79
|
+
// Calculator path: one reward per newly proven checkpoint; empty on the default path.
|
|
93
80
|
uint256[] sequencerCheckpointRewards;
|
|
94
81
|
uint256 manaUsed;
|
|
95
82
|
}
|
|
96
83
|
|
|
97
|
-
struct SequencerRewardContext {
|
|
98
|
-
uint256[] proposerRewards;
|
|
99
|
-
uint256 cachedProposers;
|
|
100
|
-
GSE gse;
|
|
101
|
-
RegistryRewardOverride[MAX_REGISTRY_REWARD_OVERRIDES] registryRewardOverrides;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
84
|
struct Totals {
|
|
105
85
|
uint256 feesToClaim;
|
|
106
86
|
uint256 totalProtocolFee;
|
|
87
|
+
uint256 proverRewards;
|
|
107
88
|
}
|
|
108
89
|
|
|
109
90
|
library RewardLib {
|
|
@@ -116,8 +97,6 @@ library RewardLib {
|
|
|
116
97
|
|
|
117
98
|
bytes32 private constant REWARD_STORAGE_POSITION = keccak256("aztec.reward.storage");
|
|
118
99
|
|
|
119
|
-
uint256 private constant REGISTRY_PROBE_GAS_LIMIT = 50_000;
|
|
120
|
-
|
|
121
100
|
/// @notice One-shot writer used during rollup construction. Writes every field of
|
|
122
101
|
/// {RewardConfig}, including the immutable `rewardDistributor` and `booster`.
|
|
123
102
|
/// @dev Must only be reachable from the constructor path. Post-deployment updates go through
|
|
@@ -130,6 +109,17 @@ library RewardLib {
|
|
|
130
109
|
rewardStorage.protocolFeeRecipient = address(bytes20("CUAUHXICALLI"));
|
|
131
110
|
}
|
|
132
111
|
|
|
112
|
+
/// @notice Writes the sequencer reward calculator. The zero address disables it.
|
|
113
|
+
/// @dev No validation: an address that does not implement the calculator fails the response checks and pays the
|
|
114
|
+
/// default, exactly like no calculator.
|
|
115
|
+
/// @param _calculator The new calculator, or zero for none
|
|
116
|
+
/// @return oldCalculator The calculator in effect before this call
|
|
117
|
+
function setSequencerRewardCalculator(address _calculator) internal returns (address oldCalculator) {
|
|
118
|
+
RewardStorage storage rewardStorage = getStorage();
|
|
119
|
+
oldCalculator = rewardStorage.sequencerRewardCalculator;
|
|
120
|
+
rewardStorage.sequencerRewardCalculator = _calculator;
|
|
121
|
+
}
|
|
122
|
+
|
|
133
123
|
/// @notice Owner-gated post-deployment writer for the protocol fee recipient.
|
|
134
124
|
/// @param _recipient The new recipient of the protocol fee tranche
|
|
135
125
|
/// @return oldRecipient The recipient in effect before this call
|
|
@@ -182,7 +172,7 @@ library RewardLib {
|
|
|
182
172
|
|
|
183
173
|
EpochRewards storage e = rewardStorage.epochRewards[_epochs[i]];
|
|
184
174
|
SubEpochRewards storage se = e.subEpoch[e.longestProvenLength];
|
|
185
|
-
uint256 shares = se.
|
|
175
|
+
uint256 shares = se.registrations[_prover].shares;
|
|
186
176
|
if (shares > 0) {
|
|
187
177
|
accumulatedRewards += (shares * e.rewards / se.summedShares);
|
|
188
178
|
}
|
|
@@ -195,13 +185,22 @@ library RewardLib {
|
|
|
195
185
|
return accumulatedRewards;
|
|
196
186
|
}
|
|
197
187
|
|
|
188
|
+
/**
|
|
189
|
+
* @notice Records the prover's shares and, if the proof extends the longest proven prefix of the epoch, pays the
|
|
190
|
+
* checkpoint rewards and fees of the newly covered checkpoints.
|
|
191
|
+
* @param _args The epoch proof submission arguments
|
|
192
|
+
* @param _endEpoch The epoch being proven
|
|
193
|
+
* @param _config The rollup's deployment-time configuration
|
|
194
|
+
* @param _fullEpochProof Whether the proof covers the whole epoch, which updates the prover's activity score
|
|
195
|
+
* @param _committee The committee the proof's attestations were verified against, in committee order; empty for
|
|
196
|
+
* escape-hatch epochs and zero-size committees, which skip the sequencer reward calculator
|
|
197
|
+
*/
|
|
198
198
|
function handleRewardsAndFees(
|
|
199
199
|
SubmitEpochRootProofArgs calldata _args,
|
|
200
200
|
Epoch _endEpoch,
|
|
201
201
|
RollupConfig memory _config,
|
|
202
202
|
bool _fullEpochProof,
|
|
203
|
-
address[] memory _committee
|
|
204
|
-
RegistryRewardOverride[MAX_REGISTRY_REWARD_OVERRIDES] memory _registryRewardOverrides
|
|
203
|
+
address[] memory _committee
|
|
205
204
|
) internal {
|
|
206
205
|
RewardStorage storage rewardStorage = getStorage();
|
|
207
206
|
|
|
@@ -212,7 +211,16 @@ library RewardLib {
|
|
|
212
211
|
SubEpochRewards storage $sr = $er.subEpoch[length];
|
|
213
212
|
address prover = _args.args.proverId;
|
|
214
213
|
|
|
215
|
-
|
|
214
|
+
ProverRegistration memory previousRegistration = $sr.registrations[prover];
|
|
215
|
+
// There is a point in updating in 2 cases:
|
|
216
|
+
// 1. This is the first time we are submitting, so shares are at 0
|
|
217
|
+
// 2. A prover is submitting the same proof a second time after an epoch closed so they would get their activity
|
|
218
|
+
// score bump. If the second check wasn't there, it would theoretically be possible (but unlikely) to block a
|
|
219
|
+
// prover from increasing their activity score by submitting a proof for the epoch while it is ongoing
|
|
220
|
+
require(
|
|
221
|
+
previousRegistration.shares == 0 || (!previousRegistration.fullEpoch && _fullEpochProof),
|
|
222
|
+
Errors.Rollup__ProverHaveAlreadySubmitted(prover, _endEpoch)
|
|
223
|
+
);
|
|
216
224
|
// The prover is only marked active if they have provided a full epoch proof
|
|
217
225
|
uint256 shares = _fullEpochProof
|
|
218
226
|
? rewardStorage.config.booster.updateAndGetShares(prover)
|
|
@@ -225,77 +233,24 @@ library RewardLib {
|
|
|
225
233
|
// back if a misbehaving booster ever crosses this layer.
|
|
226
234
|
require(shares > 0, Errors.RewardLib__ZeroShares(prover));
|
|
227
235
|
|
|
228
|
-
$sr.
|
|
229
|
-
$sr.summedShares
|
|
236
|
+
$sr.registrations[prover] = ProverRegistration({shares: shares.toUint248(), fullEpoch: _fullEpochProof});
|
|
237
|
+
$sr.summedShares = $sr.summedShares - previousRegistration.shares + shares;
|
|
230
238
|
}
|
|
231
239
|
|
|
232
|
-
|
|
240
|
+
uint256 provenLength = $er.longestProvenLength;
|
|
241
|
+
if (length > provenLength) {
|
|
233
242
|
Values memory v;
|
|
243
|
+
Totals memory t;
|
|
234
244
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
uint256 checkpointReward = getCheckpointReward();
|
|
238
|
-
uint256 defaultSequencerRewardPerCheckpoint = BpsLib.mul(checkpointReward, rewardStorage.config.sequencerBps);
|
|
239
|
-
|
|
240
|
-
(uint256 desiredSequencerRewardsTotal, uint256[] memory sequencerCheckpointRewards) = computeDesiredSequencerRewards(
|
|
241
|
-
_args,
|
|
242
|
-
_endEpoch,
|
|
243
|
-
_committee,
|
|
244
|
-
_registryRewardOverrides,
|
|
245
|
-
$er.longestProvenLength,
|
|
246
|
-
defaultSequencerRewardPerCheckpoint
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
v.sequencerCheckpointRewards = sequencerCheckpointRewards;
|
|
250
|
-
|
|
251
|
-
uint256 proverRewardPerCheckpoint = checkpointReward - defaultSequencerRewardPerCheckpoint;
|
|
252
|
-
uint256 checkpointRewardsDesired = proverRewardPerCheckpoint * added + desiredSequencerRewardsTotal;
|
|
253
|
-
uint256 maximumCheckpointRewards = added * checkpointReward;
|
|
254
|
-
|
|
255
|
-
require(
|
|
256
|
-
checkpointRewardsDesired <= maximumCheckpointRewards,
|
|
257
|
-
Errors.RewardLib__CheckpointRewardsAboveMaximum(checkpointRewardsDesired, maximumCheckpointRewards)
|
|
258
|
-
);
|
|
259
|
-
|
|
260
|
-
uint256 checkpointRewardsAvailable = 0;
|
|
261
|
-
|
|
262
|
-
if (checkpointRewardsDesired > 0) {
|
|
263
|
-
// Cache the reward distributor contract
|
|
264
|
-
IRewardDistributor distributor = rewardStorage.config.rewardDistributor;
|
|
265
|
-
|
|
266
|
-
uint256 amountToClaim = Math.min(checkpointRewardsDesired, distributor.availableTo(address(this)));
|
|
267
|
-
|
|
268
|
-
if (amountToClaim > 0) {
|
|
269
|
-
distributor.claim(address(this), amountToClaim);
|
|
270
|
-
checkpointRewardsAvailable = amountToClaim;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
uint256 sequencerCheckpointRewardTotal = desiredSequencerRewardsTotal;
|
|
275
|
-
if (checkpointRewardsAvailable < checkpointRewardsDesired) {
|
|
276
|
-
sequencerCheckpointRewardTotal = 0;
|
|
277
|
-
for (uint256 i = $er.longestProvenLength; i < length; i++) {
|
|
278
|
-
uint256 index = i - $er.longestProvenLength;
|
|
279
|
-
sequencerCheckpointRewards[index] =
|
|
280
|
-
Math.mulDiv(v.sequencerCheckpointRewards[index], checkpointRewardsAvailable, checkpointRewardsDesired);
|
|
281
|
-
sequencerCheckpointRewardTotal += v.sequencerCheckpointRewards[index];
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
uint256 proverCheckpointRewards = checkpointRewardsAvailable - sequencerCheckpointRewardTotal;
|
|
286
|
-
if (proverCheckpointRewards > 0) {
|
|
287
|
-
$er.rewards += proverCheckpointRewards.toUint128();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
245
|
+
t.proverRewards =
|
|
246
|
+
distributeCheckpointRewards(_args, _endEpoch, _committee, provenLength, length - provenLength, v);
|
|
290
247
|
|
|
291
|
-
|
|
292
|
-
for (uint256 i = $er.longestProvenLength; i < length; i++) {
|
|
248
|
+
for (uint256 i = provenLength; i < length; i++) {
|
|
293
249
|
{
|
|
294
250
|
ProposedHeader calldata header = _args.headers[i - _args.provenCheckpointFees.length];
|
|
295
251
|
v.fee = header.accumulatedFees;
|
|
296
252
|
v.sequencer = header.coinbase;
|
|
297
253
|
}
|
|
298
|
-
uint256 index = i - $er.longestProvenLength;
|
|
299
254
|
CompressedFeeHeader feeHeader = STFLib.getFeeHeader(_args.start + i);
|
|
300
255
|
|
|
301
256
|
v.manaUsed = feeHeader.getManaUsed();
|
|
@@ -306,20 +261,24 @@ library RewardLib {
|
|
|
306
261
|
|
|
307
262
|
// Compute the proving fee in the fee asset
|
|
308
263
|
v.proverFee = Math.min(v.manaUsed * feeHeader.getProverCost(), v.fee - v.protocolFee);
|
|
309
|
-
|
|
310
|
-
$er.rewards += v.proverFee.toUint128();
|
|
311
|
-
}
|
|
264
|
+
t.proverRewards += v.proverFee;
|
|
312
265
|
|
|
313
266
|
v.sequencerFee = v.fee - v.protocolFee - v.proverFee;
|
|
314
267
|
|
|
315
268
|
{
|
|
316
|
-
uint256 toSequencer =
|
|
269
|
+
uint256 toSequencer =
|
|
270
|
+
(v.sequencerCheckpointRewards.length > 0
|
|
271
|
+
? v.sequencerCheckpointRewards[i - provenLength]
|
|
272
|
+
: v.sequencerCheckpointReward) + v.sequencerFee;
|
|
317
273
|
if (toSequencer > 0) {
|
|
318
274
|
rewardStorage.sequencerRewards[v.sequencer] += toSequencer;
|
|
319
275
|
}
|
|
320
276
|
}
|
|
321
277
|
}
|
|
322
278
|
|
|
279
|
+
if (t.proverRewards > 0) {
|
|
280
|
+
$er.rewards += t.proverRewards.toUint128();
|
|
281
|
+
}
|
|
323
282
|
$er.longestProvenLength = length.toUint128();
|
|
324
283
|
|
|
325
284
|
if (t.feesToClaim > 0) {
|
|
@@ -349,7 +308,11 @@ library RewardLib {
|
|
|
349
308
|
}
|
|
350
309
|
|
|
351
310
|
function getHasSubmitted(Epoch _epoch, uint256 _length, address _prover) internal view returns (bool) {
|
|
352
|
-
return getStorage().epochRewards[_epoch].subEpoch[_length].
|
|
311
|
+
return getStorage().epochRewards[_epoch].subEpoch[_length].registrations[_prover].shares > 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function getHasSubmittedFullEpoch(Epoch _epoch, uint256 _length, address _prover) internal view returns (bool) {
|
|
315
|
+
return getStorage().epochRewards[_epoch].subEpoch[_length].registrations[_prover].fullEpoch;
|
|
353
316
|
}
|
|
354
317
|
|
|
355
318
|
function getHasClaimed(address _prover, Epoch _epoch) internal view returns (bool) {
|
|
@@ -364,6 +327,10 @@ library RewardLib {
|
|
|
364
327
|
return getStorage().protocolFeeRecipient;
|
|
365
328
|
}
|
|
366
329
|
|
|
330
|
+
function getSequencerRewardCalculator() internal view returns (address) {
|
|
331
|
+
return getStorage().sequencerRewardCalculator;
|
|
332
|
+
}
|
|
333
|
+
|
|
367
334
|
function getSpecificProverRewardsForEpoch(Epoch _epoch, address _prover) internal view returns (uint256) {
|
|
368
335
|
RewardStorage storage rewardStorage = getStorage();
|
|
369
336
|
|
|
@@ -376,89 +343,11 @@ library RewardLib {
|
|
|
376
343
|
|
|
377
344
|
// Only if prover has shares will he get a reward. Also avoid a 0-div
|
|
378
345
|
// in case of no shares at all.
|
|
379
|
-
if (se.
|
|
346
|
+
if (se.registrations[_prover].shares == 0) {
|
|
380
347
|
return 0;
|
|
381
348
|
}
|
|
382
349
|
|
|
383
|
-
return (se.
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* @notice Resolves the ATP registry that an attester's withdrawer belongs to.
|
|
388
|
-
* @dev ATP-backed validators register their staker contract as the GSE withdrawer. The staker exposes the ATP it
|
|
389
|
-
* belongs to, and the ATP exposes the registry it was created from, so the lookup is
|
|
390
|
-
* `withdrawer.getATP()` followed by `atp.getRegistry()`. Both hops are probed defensively so that arbitrary
|
|
391
|
-
* withdrawer contracts cannot make the reward computation revert or burn unbounded gas.
|
|
392
|
-
* @param _withdrawer The withdrawer registered in the GSE for the attester.
|
|
393
|
-
* @return responded Whether both hops returned a well-formed address.
|
|
394
|
-
* @return registry The registry the withdrawer's ATP belongs to, or zero when the lookup did not resolve.
|
|
395
|
-
*/
|
|
396
|
-
function tryGetRegistry(address _withdrawer) internal view returns (bool responded, address registry) {
|
|
397
|
-
(bool atpResponded, address atp) = tryGetAddress(_withdrawer, IATPStaker.getATP.selector);
|
|
398
|
-
if (!atpResponded || atp == address(0)) {
|
|
399
|
-
return (false, address(0));
|
|
400
|
-
}
|
|
401
|
-
return tryGetAddress(atp, IATP.getRegistry.selector);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* @notice Probes `_target` with a zero-argument view call that is expected to return a single address.
|
|
406
|
-
* @dev Runs with a fixed gas cap and requires exactly 32 bytes of return data holding a clean address, so a
|
|
407
|
-
* misbehaving target can only make the probe fail, never revert the caller or consume unbounded gas.
|
|
408
|
-
* @param _target The contract to probe. Accounts without code are treated as not responding.
|
|
409
|
-
* @param _selector The selector of the zero-argument getter to call.
|
|
410
|
-
* @return responded Whether the call succeeded and returned a well-formed address.
|
|
411
|
-
* @return result The returned address, or zero when the probe failed.
|
|
412
|
-
*/
|
|
413
|
-
function tryGetAddress(address _target, bytes4 _selector) internal view returns (bool responded, address result) {
|
|
414
|
-
if (_target.code.length == 0) {
|
|
415
|
-
return (false, address(0));
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
uint256 selector = uint32(_selector);
|
|
419
|
-
|
|
420
|
-
assembly ("memory-safe") {
|
|
421
|
-
mstore(0x00, shl(224, selector))
|
|
422
|
-
let callSucceeded := staticcall(REGISTRY_PROBE_GAS_LIMIT, _target, 0x00, 0x04, 0x20, 0x20)
|
|
423
|
-
let word := mload(0x20)
|
|
424
|
-
responded := and(and(callSucceeded, eq(returndatasize(), 0x20)), iszero(shr(160, word)))
|
|
425
|
-
result := 0
|
|
426
|
-
if responded {
|
|
427
|
-
result := and(word, sub(shl(160, 1), 1))
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
function validateRegistryRewardOverrides(
|
|
433
|
-
RegistryRewardOverride[MAX_REGISTRY_REWARD_OVERRIDES] memory _overrides,
|
|
434
|
-
RewardConfig memory _rewardConfig
|
|
435
|
-
) internal pure {
|
|
436
|
-
uint256 defaultSequencerReward = BpsLib.mul(_rewardConfig.checkpointReward, _rewardConfig.sequencerBps);
|
|
437
|
-
|
|
438
|
-
for (uint256 i = 0; i < MAX_REGISTRY_REWARD_OVERRIDES; i++) {
|
|
439
|
-
RegistryRewardOverride memory current = _overrides[i];
|
|
440
|
-
if (current.registry == address(0)) {
|
|
441
|
-
require(
|
|
442
|
-
current.sequencerReward == 0,
|
|
443
|
-
Errors.RewardLib__InvalidRegistryRewardOverride(current.registry, current.sequencerReward)
|
|
444
|
-
);
|
|
445
|
-
continue;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
require(
|
|
449
|
-
current.sequencerReward <= defaultSequencerReward,
|
|
450
|
-
Errors.RewardLib__RegistryRewardOverrideAboveDefault(
|
|
451
|
-
current.registry, current.sequencerReward, defaultSequencerReward
|
|
452
|
-
)
|
|
453
|
-
);
|
|
454
|
-
|
|
455
|
-
for (uint256 j = 0; j < i; j++) {
|
|
456
|
-
require(
|
|
457
|
-
_overrides[j].registry != current.registry,
|
|
458
|
-
Errors.RewardLib__DuplicateRegistryRewardOverride(current.registry)
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
350
|
+
return (se.registrations[_prover].shares * er.rewards / se.summedShares);
|
|
462
351
|
}
|
|
463
352
|
|
|
464
353
|
function getStorage() internal pure returns (RewardStorage storage storageStruct) {
|
|
@@ -468,86 +357,134 @@ library RewardLib {
|
|
|
468
357
|
}
|
|
469
358
|
}
|
|
470
359
|
|
|
471
|
-
|
|
360
|
+
/**
|
|
361
|
+
* @notice Claims the checkpoint rewards of `_added` newly proven checkpoints and splits them between the
|
|
362
|
+
* sequencers and the prover pool.
|
|
363
|
+
*
|
|
364
|
+
* @dev Without an accepted calculator response (no committee, no calculator, or a failed or malformed call) this
|
|
365
|
+
* is the default split, identical to a rollup without a calculator: claim up to `_added * checkpointReward`,
|
|
366
|
+
* give the sequencers `sequencerBps` of what was claimed split evenly per checkpoint (written to
|
|
367
|
+
* `_v.sequencerCheckpointReward`), and give the prover pool the remainder including the rounding dust.
|
|
368
|
+
*
|
|
369
|
+
* With an accepted response, checkpoint `i` is owed `rewards[i]` and the prover share stays
|
|
370
|
+
* `checkpointReward - defaultReward` per checkpoint, so only `Σ rewards + _added * proverShare` is claimed and
|
|
371
|
+
* whatever a below-default reward leaves unpaid stays in the distributor. If the distributor holds less, each
|
|
372
|
+
* sequencer reward is scaled by `available / desired` and the prover pool receives the remainder, which keeps
|
|
373
|
+
* the proportional outcome of the default split. The per-checkpoint rewards are written to
|
|
374
|
+
* `_v.sequencerCheckpointRewards`, which stays empty on the default path.
|
|
375
|
+
*
|
|
376
|
+
* @return proverRewards The checkpoint rewards that go to the prover pool
|
|
377
|
+
*/
|
|
378
|
+
function distributeCheckpointRewards(
|
|
472
379
|
SubmitEpochRootProofArgs calldata _args,
|
|
473
380
|
Epoch _endEpoch,
|
|
474
381
|
address[] memory _committee,
|
|
475
|
-
|
|
476
|
-
uint256
|
|
477
|
-
|
|
478
|
-
) private
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
382
|
+
uint256 _provenLength,
|
|
383
|
+
uint256 _added,
|
|
384
|
+
Values memory _v
|
|
385
|
+
) private returns (uint256 proverRewards) {
|
|
386
|
+
RewardStorage storage rewardStorage = getStorage();
|
|
387
|
+
uint256 checkpointReward = rewardStorage.config.checkpointReward;
|
|
388
|
+
Bps sequencerBps = rewardStorage.config.sequencerBps;
|
|
389
|
+
|
|
390
|
+
uint256 sequencerTotal;
|
|
391
|
+
uint256 desired;
|
|
392
|
+
// Escape-hatch epochs and zero-size committees have no proposers to pass, so they never reach the calculator.
|
|
393
|
+
if (_committee.length > 0 && rewardStorage.sequencerRewardCalculator != address(0)) {
|
|
394
|
+
uint256 defaultReward = BpsLib.mul(checkpointReward, sequencerBps);
|
|
395
|
+
sequencerTotal = callSequencerRewardCalculator(
|
|
396
|
+
_args, _endEpoch, _committee, _provenLength, _added, defaultReward, checkpointReward, _v
|
|
489
397
|
);
|
|
398
|
+
desired = (checkpointReward - defaultReward) * _added + sequencerTotal;
|
|
490
399
|
}
|
|
491
400
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
);
|
|
503
|
-
uint256 proposerMask = uint256(1) << proposerIndex;
|
|
504
|
-
if (context.cachedProposers & proposerMask == 0) {
|
|
505
|
-
context.proposerRewards[proposerIndex] = getDesiredSequencerRewardForProposer(
|
|
506
|
-
_committee[proposerIndex], context, _defaultSequencerRewardPerCheckpoint
|
|
507
|
-
);
|
|
508
|
-
context.cachedProposers |= proposerMask;
|
|
401
|
+
// An accepted response has one entry per newly proven checkpoint, and `_added` is at least one.
|
|
402
|
+
if (_v.sequencerCheckpointRewards.length > 0) {
|
|
403
|
+
uint256 available = claimCheckpointRewards(desired);
|
|
404
|
+
if (available < desired) {
|
|
405
|
+
uint256[] memory sequencerRewards = _v.sequencerCheckpointRewards;
|
|
406
|
+
sequencerTotal = 0;
|
|
407
|
+
for (uint256 i = 0; i < _added; i++) {
|
|
408
|
+
sequencerRewards[i] = Math.mulDiv(sequencerRewards[i], available, desired);
|
|
409
|
+
sequencerTotal += sequencerRewards[i];
|
|
410
|
+
}
|
|
509
411
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
412
|
+
proverRewards = available - sequencerTotal;
|
|
413
|
+
} else {
|
|
414
|
+
uint256 available = claimCheckpointRewards(_added * checkpointReward);
|
|
415
|
+
sequencerTotal = BpsLib.mul(available, sequencerBps);
|
|
416
|
+
_v.sequencerCheckpointReward = sequencerTotal / _added;
|
|
417
|
+
uint256 dust = sequencerTotal - (_v.sequencerCheckpointReward * _added);
|
|
418
|
+
proverRewards = available - sequencerTotal + dust;
|
|
514
419
|
}
|
|
515
|
-
|
|
516
|
-
return (desiredSequencerRewardsTotal, desiredSequencerCheckpointRewards);
|
|
517
420
|
}
|
|
518
421
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
) private
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
for (uint256 i = 0; i < MAX_REGISTRY_REWARD_OVERRIDES; i++) {
|
|
531
|
-
RegistryRewardOverride memory current = _context.registryRewardOverrides[i];
|
|
532
|
-
if (current.registry == registry) {
|
|
533
|
-
return Math.min(_defaultSequencerRewardPerCheckpoint, current.sequencerReward);
|
|
422
|
+
/**
|
|
423
|
+
* @notice Claims up to `_desired` from the reward distributor
|
|
424
|
+
* @return available The amount claimed: `_desired`, or what the distributor holds for this rollup if less
|
|
425
|
+
*/
|
|
426
|
+
function claimCheckpointRewards(uint256 _desired) private returns (uint256 available) {
|
|
427
|
+
if (_desired > 0) {
|
|
428
|
+
IRewardDistributor distributor = getStorage().config.rewardDistributor;
|
|
429
|
+
available = Math.min(_desired, distributor.availableTo(address(this)));
|
|
430
|
+
if (available > 0) {
|
|
431
|
+
distributor.claim(address(this), available);
|
|
534
432
|
}
|
|
535
433
|
}
|
|
536
|
-
|
|
537
|
-
return _defaultSequencerRewardPerCheckpoint;
|
|
538
434
|
}
|
|
539
435
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
436
|
+
/**
|
|
437
|
+
* @notice Asks the sequencer reward calculator for the reward of each newly proven checkpoint
|
|
438
|
+
* @dev On an accepted response, writes the rewards to `_v.sequencerCheckpointRewards` and returns their sum. On any
|
|
439
|
+
* failure, leaves `_v.sequencerCheckpointRewards` empty so the caller falls back to the default path.
|
|
440
|
+
* @return total The sum of the accepted rewards, or zero
|
|
441
|
+
*/
|
|
442
|
+
function callSequencerRewardCalculator(
|
|
443
|
+
SubmitEpochRootProofArgs calldata _args,
|
|
444
|
+
Epoch _endEpoch,
|
|
445
|
+
address[] memory _committee,
|
|
446
|
+
uint256 _provenLength,
|
|
447
|
+
uint256 _added,
|
|
448
|
+
uint256 _defaultReward,
|
|
449
|
+
uint256 _checkpointReward,
|
|
450
|
+
Values memory _v
|
|
451
|
+
) private view returns (uint256 total) {
|
|
452
|
+
(bool accepted, uint256[] memory rewards, uint256 sum) = SequencerRewardCalculatorLib.tryGetSequencerRewards(
|
|
453
|
+
getStorage().sequencerRewardCalculator,
|
|
454
|
+
_endEpoch,
|
|
455
|
+
getProposers(_args, _endEpoch, _committee, _provenLength, _added),
|
|
456
|
+
_defaultReward,
|
|
457
|
+
_checkpointReward
|
|
458
|
+
);
|
|
459
|
+
if (accepted) {
|
|
460
|
+
_v.sequencerCheckpointRewards = rewards;
|
|
461
|
+
total = sum;
|
|
549
462
|
}
|
|
463
|
+
}
|
|
550
464
|
|
|
551
|
-
|
|
465
|
+
/**
|
|
466
|
+
* @notice Derives the proposer of each newly proven checkpoint from the committee the proof verified
|
|
467
|
+
* @dev Mirrors the proposer selection at propose time: `computeProposerIndex(epoch, slot, sampleSeed, size)`. The
|
|
468
|
+
* headers of every rewarded checkpoint are present and were bound to the stored header hashes by the proof.
|
|
469
|
+
* @return proposers One committee member per newly proven checkpoint, in checkpoint order
|
|
470
|
+
*/
|
|
471
|
+
function getProposers(
|
|
472
|
+
SubmitEpochRootProofArgs calldata _args,
|
|
473
|
+
Epoch _endEpoch,
|
|
474
|
+
address[] memory _committee,
|
|
475
|
+
uint256 _provenLength,
|
|
476
|
+
uint256 _added
|
|
477
|
+
) private view returns (address[] memory proposers) {
|
|
478
|
+
proposers = new address[](_added);
|
|
479
|
+
uint256 seed = ValidatorSelectionLib.getSampleSeed(_endEpoch);
|
|
480
|
+
uint256 committeeSize = _committee.length;
|
|
481
|
+
uint256 firstHeader = _provenLength - _args.provenCheckpointFees.length;
|
|
482
|
+
for (uint256 i = 0; i < _added; i++) {
|
|
483
|
+
proposers[i] = _committee[
|
|
484
|
+
ValidatorSelectionLib.computeProposerIndex(
|
|
485
|
+
_endEpoch, _args.headers[firstHeader + i].slotNumber, seed, committeeSize
|
|
486
|
+
)
|
|
487
|
+
];
|
|
488
|
+
}
|
|
552
489
|
}
|
|
553
490
|
}
|