Skip to content

Conversation

@eladiosch
Copy link
Contributor

Adapted skipProvisioning and provisionNode flows to remove secure signer

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
mainnet-contracts/src/PufferModule.sol 91.07% <ø> (ø)
mainnet-contracts/src/PufferProtocol.sol 93.77% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eladiosch eladiosch requested a review from ksatyarth2 December 9, 2025 08:30
bytes memory withdrawalCredentials = getWithdrawalCredentials($.validators[moduleName][index].module);

bytes32 depositDataRoot =
LibBeaconchainContract.getDepositDataRoot(validatorPubKey, validatorSignature, withdrawalCredentials);
Copy link
Contributor

Choose a reason for hiding this comment

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

if we are removing GUARDIAN_MODULE.validateProvisionNode() and such other validations on-chain, we can validate basics BLS signature by creating a library BLSSignatureVerifier and have basic logics to verify such as validateBLSSignatureFormat verifyDepositDataRoot. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm which kind of validations will it have? Right now we only check the BLS pubkey lenght. What checks would we do on the signature? The DepositDataRoot is built in the LibBeaconchainContract, so no need to verify that part

Copy link
Contributor

Choose a reason for hiding this comment

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

basic format validations such as BLS public key format - check that pubkey is not all zeros. withdrawal credential length. we can think if we need that. and moving all these checks to that library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, in the next PR I'm moving verification logic to a library so PufferProtocol is not so clogged with verification logic. I'll look into additional checks to add there. If there's nothing else regarding this PR we can merge it and will do this in the remove GuardianModule PR

Comment on lines +272 to +283
// Transfer 32 ETH to this contract from the Puffer Vault
PUFFER_VAULT.transferETH(address(this), 32 ether);

emit SuccessfullyProvisioned(validatorPubKey, index, moduleName);

// Increase lockedETH on Puffer Oracle
PUFFER_ORACLE.provisionNode();

// Deposit into the Beacon Chain Deposit Contract directly
BEACON_DEPOSIT_CONTRACT.deposit{ value: 32 ether }(
validatorPubKey, withdrawalCredentials, validatorSignature, depositDataRoot
);
Copy link
Contributor

Choose a reason for hiding this comment

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

wait. why this flow? this looks no-restaking flow but with incorrect withdrawal credentials.
for restaking flow the ETH should move to module and then call callStake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, it's not needed to do the flow from the EigenPod, we can deposit directly to the beacon deposit contract. The withdrawal credentials point to the EigenPod, so it is restaking

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