Skip to content

Commit

Permalink
Merge branch 'main' into feat/zk-sharedkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Jan 27, 2025
2 parents a87071a + f9f3f18 commit dac60fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions contracts/contracts/validator-registry/VanillaRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ contract VanillaRegistry is IVanillaRegistry, VanillaRegistryStorage,
uint256 _slashingPayoutPeriodBlocks,
address _owner
) external initializer {
__Pausable_init();
_setMinStake(_minStake);
_setSlashOracle(_slashOracle);
_setUnstakePeriodBlocks(_unstakePeriodBlocks);
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/openzeppelin-upgrades
Submodule openzeppelin-upgrades updated 42 files
+1 −1 .github/workflows/checks.yml
+1 −1 LICENSE
+1 −1 docs/antora.yml
+3 −1 docs/modules/ROOT/pages/api-core.adoc
+14 −2 docs/modules/ROOT/pages/api-hardhat-upgrades.adoc
+30 −2 docs/modules/ROOT/pages/foundry/pages/foundry-upgrades.adoc
+14 −0 packages/core/CHANGELOG.md
+625 −0 packages/core/contracts/test/ValidationsInitializer.sol
+4 −0 packages/core/contracts/test/cli/excludes/AbstractUUPS.sol
+3 −3 packages/core/package.json
+6 −2 packages/core/src/cli/cli.test.ts.md
+ packages/core/src/cli/cli.test.ts.snap
+4 −4 packages/core/src/cli/validate.ts
+1 −1 packages/core/src/index.ts
+5 −6 packages/core/src/utils/make-namespaced.test.ts
+54 −51 packages/core/src/utils/make-namespaced.ts
+0 −23 packages/core/src/utils/slang/trivia.ts
+224 −0 packages/core/src/validate-initializers.test.ts
+40 −15 packages/core/src/validate/overrides.ts
+24 −2 packages/core/src/validate/report.ts
+38 −2 packages/core/src/validate/run.ts
+316 −0 packages/core/src/validate/run/initializer.ts
+17 −0 packages/plugin-hardhat/CHANGELOG.md
+30 −0 packages/plugin-hardhat/contracts/AccessManagedProxy.sol
+24 −0 packages/plugin-hardhat/contracts/CustomBeaconProxy.sol
+5 −5 packages/plugin-hardhat/package.json
+6 −8 packages/plugin-hardhat/src/defender/deploy.ts
+15 −10 packages/plugin-hardhat/src/deploy-beacon-proxy.ts
+19 −12 packages/plugin-hardhat/src/deploy-contract.ts
+17 −10 packages/plugin-hardhat/src/deploy-proxy.ts
+10 −8 packages/plugin-hardhat/src/index.ts
+3 −0 packages/plugin-hardhat/src/type-extensions.ts
+11 −6 packages/plugin-hardhat/src/upgrade-proxy.ts
+5 −4 packages/plugin-hardhat/src/utils/contract-instance.ts
+7 −3 packages/plugin-hardhat/src/utils/deploy.ts
+23 −2 packages/plugin-hardhat/src/utils/options.ts
+56 −0 packages/plugin-hardhat/test/beacon-custom-beacon-proxy.js
+24 −0 packages/plugin-hardhat/test/defender-deploy.js
+53 −0 packages/plugin-hardhat/test/uups-custom-proxy.js
+1 −1 submodules/openzeppelin-foundry-upgrades
+2 −2 tsconfig.base.json
+985 −89 yarn.lock
6 changes: 0 additions & 6 deletions contracts/test/core/OracleTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -813,12 +813,6 @@ contract OracleTest is Test {
bidSignature = abi.encodePacked(r, s, v);

bytes32 commitmentDigest = preconfManager.getPreConfHash(
// txnHash,
// revertingTxHashes,
// bid,
// blockNumber,
// decayStartTimestamp,
// decayEndTimestamp,
bidHash,
bidSignature,
zkproof
Expand Down
9 changes: 2 additions & 7 deletions p2p/pkg/preconfirmation/encryptor/encryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,9 @@ func computePreConfStructHash(c *preconfpb.PreConfirmation, sharedKey *bn254.G1A
}
signatureHash := crypto.Keccak256Hash(c.Bid.Signature)

bidderPK, err := p2pcrypto.BN254PublicKeyFromBytes(c.Bid.NikePublicKey)
if err != nil {
return common.Hash{}, err
}

var sharedKeyXBigInt, sharedKeyYBigInt big.Int
bidderPK.X.BigInt(&sharedKeyXBigInt)
bidderPK.Y.BigInt(&sharedKeyYBigInt)
sharedKey.X.BigInt(&sharedKeyXBigInt)
sharedKey.Y.BigInt(&sharedKeyYBigInt)

preConfStructType, err := abi.NewType("tuple", "", []abi.ArgumentMarshaling{
{Name: "EIP712CommitmentTypeHash", Type: "bytes32"},
Expand Down

0 comments on commit dac60fe

Please sign in to comment.