Skip to content

Conversation

@shaspitz
Copy link
Contributor

Closes #10

  • Makes all contracts OwnableUpgradable
  • Removes Create2, as it isn't compatible with upgradable contract deployment, and will be replaced by ENS + create3 #45
  • Standardizes all contracts to use solidity 0.8.20
  • Changes Preconfirmations.sol to be named PreConfCommitmentStore.go (matching the contract name itself) as was required for new method of deployment
  • Hardcodes two common values for constructAndStoreCommitment in OracleTest.sol to avoid stack overflow errors

@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from a212d6a to 0d24b6d Compare May 14, 2024 19:46
@shaspitz shaspitz marked this pull request as ready for review May 14, 2024 19:46
uint64 bid,
uint64 blockNumber,
string memory txnHash,
uint64 decayStartTimestamp,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was neccessary to avoid the following error:

forge clean && forge test --via-ir
[⠊] Compiling...
[⠔] Compiling 81 files with Solc 0.8.23
[⠘] Solc 0.8.23 finished in 34.96s
Error:
Compiler run failed:
Error: Yul exception:Cannot swap Variable var_decayStartTimestamp with Variable _9: too deep in the stack by 2 slots in [ RET var_txnHash_64919_mpos var_decayStartTimestamp var_decayEndTimestamp var_blockNumber var_decayStartTimestamp var_bid var_provider var_signerPk expr_64966_mpos expr_64939_address var_dispatchTimestamp expr_64939_address var_blockNumber var_bid var_txnHash_64919_mpos expr_64983_mpos expr_64980_mpos expr var_decayEndTimestamp _9 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
YulException: Cannot swap Variable var_decayStartTimestamp with Variable _9: too deep in the stack by 2 slots in [ RET var_txnHash_64919_mpos var_decayStartTimestamp var_decayEndTimestamp var_blockNumber var_decayStartTimestamp var_bid var_provider var_signerPk expr_64966_mpos expr_64939_address var_dispatchTimestamp expr_64939_address var_blockNumber var_bid var_txnHash_64919_mpos expr_64983_mpos expr_64980_mpos expr var_decayEndTimestamp _9 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.

@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from 0d24b6d to 75fa6d1 Compare May 14, 2024 19:52
@shaspitz shaspitz requested review from Mikelle, ckartik and mrekucci May 14, 2024 20:02
@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from 75fa6d1 to 272fcd1 Compare May 15, 2024 18:32
Copy link
Contributor

@Mikelle Mikelle left a comment

Choose a reason for hiding this comment

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

left over some nits, but overall looks good to me!

shaspitz added 4 commits May 16, 2024 22:53
commit d866728
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Wed May 1 16:37:29 2024 -0700

    fix: deploy scripts + new contract addrs

commit dfc629e
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Wed May 1 13:09:33 2024 -0700

    fix: rm stale todo and standardize solidity version

commit c65f440
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Wed May 1 01:30:44 2024 -0700

    feat: update abis

commit beb8dd2
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Wed May 1 01:25:51 2024 -0700

    fix: expect revert w/o string for whitelist

commit 5a5edd6
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Wed May 1 01:18:49 2024 -0700

    fix: remove inherited initializer

commit 60a3341
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Tue Apr 30 19:05:33 2024 -0700

    fix: make preconf contract match .sol name

commit e072ee7
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Tue Apr 30 18:47:02 2024 -0700

    fix: move default values to initializer

commit 4d06bfd
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Tue Apr 30 18:38:19 2024 -0700

    feat: add wip changes that compiles

commit fc3dd87
Author: Alok <aloknerurkar@no-reply.com>
Date:   Thu May 2 20:13:26 2024 +0530

    fix: round decay to 100 if greater

commit 91b7bfa
Author: aloknerurkar <aloknerurkar@gmail.com>
Date:   Thu May 2 16:35:02 2024 +0530

    feat(tracker): split preconf protocol for better organisation (#44)

commit d370b7c
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 19:39:16 2024 +0200

    refactor: changed 10000 to timeDiff in real-bidder

commit 132871c
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 16:51:28 2024 +0200

    feat: added logs to updater

commit 978a2ea
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 14:00:36 2024 +0200

    fix: updated dir in goreleaser

commit fdf4c6a
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 13:19:29 2024 +0200

    fix: added missing goreleaser to real bidder

commit 9d890c6
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 13:14:52 2024 +0200

    fix: updated artifacts workflow

commit ee345d7
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed May 1 01:42:10 2024 +0200

    fix: move blocksPerWindow set up to separated func

commit fa3dc68
Author: aloknerurkar <aloknerurkar@gmail.com>
Date:   Wed May 1 04:39:34 2024 +0530

    fix: integration test (#39)

    Co-authored-by: Alok <aloknerurkar@no-reply.com>

commit 92943b4
Author: Mikelle <mikhwall@gmail.com>
Date:   Tue Apr 30 20:29:55 2024 +0200

    fix: contract tests

commit 9cc6434
Author: Mikelle <mikhwall@gmail.com>
Date:   Tue Apr 30 19:59:41 2024 +0200

    fix: change blocksnumber to 10 for the testing

commit cc2dc86
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 23:51:51 2024 +0200

    refactor: changed balance from map to lru cache

commit 1f87498
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 23:42:54 2024 +0200

    fix: whitespace

commit 11814d1
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 23:41:24 2024 +0200

    fix: deposit function

commit 9eb248d
Author: Alok <aloknerurkar@no-reply.com>
Date:   Tue Apr 30 02:47:25 2024 +0530

    fix: events unit test

commit 0456a5a
Author: Alok <aloknerurkar@no-reply.com>
Date:   Tue Apr 30 02:28:18 2024 +0530

    fix: start publisher

commit c297dbc
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 22:37:02 2024 +0200

    fix: delete unused

commit 2f28d82
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 22:29:26 2024 +0200

    fix: updated handshake ver

commit 9e93397
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 22:27:03 2024 +0200

    fix: abi gen with new ver

commit e78c7ad
Author: Alok <aloknerurkar@no-reply.com>
Date:   Tue Apr 30 01:46:41 2024 +0530

    fix: go mod tidy oracle

commit 75c4ada
Author: aloknerurkar <aloknerurkar@gmail.com>
Date:   Tue Apr 30 01:24:08 2024 +0530

    feat: withdraw API (#38)

commit 775f939
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 17:37:18 2024 +0200

    refactor: updated abi

commit 0bf93a4
Author: Mikelle <mikhwall@gmail.com>
Date:   Mon Apr 29 15:54:59 2024 +0200

    refactor: get rid of logs parsing, redundant checks and function in sc

commit 060b3a9
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri Apr 26 23:23:30 2024 +0200

    refactor: moved to x packages

commit 0178a1b
Author: aloknerurkar <aloknerurkar@gmail.com>
Date:   Fri Apr 26 19:42:19 2024 +0530

    feat(oracle): e2e privacy changes (#35)

commit cce95c4
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed Apr 24 20:04:56 2024 +0200

    feat: upload p2p (mev-commit) changes for privacy e2e

commit 3a8dba4
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed Apr 24 15:05:35 2024 +0200

    feat: updated abi

commit cbdf531
Author: Mikelle <mikhwall@gmail.com>
Date:   Wed Apr 24 14:54:54 2024 +0200

    feat: upload contract changes
@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from e76f068 to a24b16a Compare May 17, 2024 05:55
@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from a24b16a to c336412 Compare May 17, 2024 06:03
Co-Authored-By: Mikhail Wall <mikhwall@gmail.com>
@shaspitz shaspitz force-pushed the upgradable-contracts-rebase branch from c336412 to b0e2dd2 Compare May 17, 2024 06:03
@shaspitz shaspitz merged commit 5974d42 into main May 17, 2024
@shaspitz shaspitz deleted the upgradable-contracts-rebase branch May 17, 2024 06:30
Mikelle added a commit that referenced this pull request May 17, 2024
commit bb7c8ba
Merge: 40b1078 5d2d4b6
Author: Mikhail Wall <mikhwall@gmail.com>
Date:   Fri May 17 22:21:27 2024 +0200

    Merge branch 'main' into keykeeper-refactoring

commit 5d2d4b6
Author: mrekucci <mrekucci@users.noreply.github.com>
Date:   Fri May 17 20:32:33 2024 +0200

    feat: introduce ansible playbooks wrapper script (#66)

commit 4290a91
Author: Kartik Chopra <k5chopra@uwaterloo.ca>
Date:   Fri May 17 13:56:01 2024 -0400

    feat: bumps foundry in infra (#64)

    * feat: bumps foundry in infra

    * chore: amd not arm

commit 40b1078
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 17:10:34 2024 +0200

    chore: moved aeskey out

commit 05c2b2d
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 16:14:35 2024 +0200

    chore: fixed pr comments

commit d35ad17
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 12:26:04 2024 +0200

    fix: fixed some pr comments

commit 68dce1d
Merge: 23a7714 5974d42
Author: Mikhail Wall <mikhwall@gmail.com>
Date:   Fri May 17 11:32:58 2024 +0200

    Merge branch 'main' into keykeeper-refactoring

commit 5974d42
Author: Shawn <44221603+shaspitz@users.noreply.github.com>
Date:   Thu May 16 23:30:42 2024 -0700

    feat: upgradable contracts (#55)

    * feat: squashed changes of previous pr

    commit d866728
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Wed May 1 16:37:29 2024 -0700

        fix: deploy scripts + new contract addrs

    commit dfc629e
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Wed May 1 13:09:33 2024 -0700

        fix: rm stale todo and standardize solidity version

    commit c65f440
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Wed May 1 01:30:44 2024 -0700

        feat: update abis

    commit beb8dd2
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Wed May 1 01:25:51 2024 -0700

        fix: expect revert w/o string for whitelist

    commit 5a5edd6
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Wed May 1 01:18:49 2024 -0700

        fix: remove inherited initializer

    commit 60a3341
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Tue Apr 30 19:05:33 2024 -0700

        fix: make preconf contract match .sol name

    commit e072ee7
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Tue Apr 30 18:47:02 2024 -0700

        fix: move default values to initializer

    commit 4d06bfd
    Author: Shawn <44221603+shaspitz@users.noreply.github.com>
    Date:   Tue Apr 30 18:38:19 2024 -0700

        feat: add wip changes that compiles

    commit fc3dd87
    Author: Alok <aloknerurkar@no-reply.com>
    Date:   Thu May 2 20:13:26 2024 +0530

        fix: round decay to 100 if greater

    commit 91b7bfa
    Author: aloknerurkar <aloknerurkar@gmail.com>
    Date:   Thu May 2 16:35:02 2024 +0530

        feat(tracker): split preconf protocol for better organisation (#44)

    commit d370b7c
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 19:39:16 2024 +0200

        refactor: changed 10000 to timeDiff in real-bidder

    commit 132871c
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 16:51:28 2024 +0200

        feat: added logs to updater

    commit 978a2ea
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 14:00:36 2024 +0200

        fix: updated dir in goreleaser

    commit fdf4c6a
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 13:19:29 2024 +0200

        fix: added missing goreleaser to real bidder

    commit 9d890c6
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 13:14:52 2024 +0200

        fix: updated artifacts workflow

    commit ee345d7
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed May 1 01:42:10 2024 +0200

        fix: move blocksPerWindow set up to separated func

    commit fa3dc68
    Author: aloknerurkar <aloknerurkar@gmail.com>
    Date:   Wed May 1 04:39:34 2024 +0530

        fix: integration test (#39)

        Co-authored-by: Alok <aloknerurkar@no-reply.com>

    commit 92943b4
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Tue Apr 30 20:29:55 2024 +0200

        fix: contract tests

    commit 9cc6434
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Tue Apr 30 19:59:41 2024 +0200

        fix: change blocksnumber to 10 for the testing

    commit cc2dc86
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 23:51:51 2024 +0200

        refactor: changed balance from map to lru cache

    commit 1f87498
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 23:42:54 2024 +0200

        fix: whitespace

    commit 11814d1
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 23:41:24 2024 +0200

        fix: deposit function

    commit 9eb248d
    Author: Alok <aloknerurkar@no-reply.com>
    Date:   Tue Apr 30 02:47:25 2024 +0530

        fix: events unit test

    commit 0456a5a
    Author: Alok <aloknerurkar@no-reply.com>
    Date:   Tue Apr 30 02:28:18 2024 +0530

        fix: start publisher

    commit c297dbc
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 22:37:02 2024 +0200

        fix: delete unused

    commit 2f28d82
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 22:29:26 2024 +0200

        fix: updated handshake ver

    commit 9e93397
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 22:27:03 2024 +0200

        fix: abi gen with new ver

    commit e78c7ad
    Author: Alok <aloknerurkar@no-reply.com>
    Date:   Tue Apr 30 01:46:41 2024 +0530

        fix: go mod tidy oracle

    commit 75c4ada
    Author: aloknerurkar <aloknerurkar@gmail.com>
    Date:   Tue Apr 30 01:24:08 2024 +0530

        feat: withdraw API (#38)

    commit 775f939
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 17:37:18 2024 +0200

        refactor: updated abi

    commit 0bf93a4
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Mon Apr 29 15:54:59 2024 +0200

        refactor: get rid of logs parsing, redundant checks and function in sc

    commit 060b3a9
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Fri Apr 26 23:23:30 2024 +0200

        refactor: moved to x packages

    commit 0178a1b
    Author: aloknerurkar <aloknerurkar@gmail.com>
    Date:   Fri Apr 26 19:42:19 2024 +0530

        feat(oracle): e2e privacy changes (#35)

    commit cce95c4
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed Apr 24 20:04:56 2024 +0200

        feat: upload p2p (mev-commit) changes for privacy e2e

    commit 3a8dba4
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed Apr 24 15:05:35 2024 +0200

        feat: updated abi

    commit cbdf531
    Author: Mikelle <mikhwall@gmail.com>
    Date:   Wed Apr 24 14:54:54 2024 +0200

        feat: upload contract changes

    * fix: stack too deep errors for oracle test

    * feat: update abis

    * docs: rm todo

    * refactor: rename proxy vars

    * feat: apply suggestions from code review

    Co-Authored-By: Mikhail Wall <mikhwall@gmail.com>

    * feat: update contract values

    * chore: use geth from main

    ---------

    Co-authored-by: Mikhail Wall <mikhwall@gmail.com>

commit 23a7714
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 01:12:04 2024 +0200

    chore: fixed lint

commit b162105
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 00:56:23 2024 +0200

    refactor: updated oracle to move to x/keysigner

commit 41de4f2
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 00:52:25 2024 +0200

    refactor: get rid of keykeeper

commit dc791d2
Author: Mikelle <mikhwall@gmail.com>
Date:   Fri May 17 00:08:10 2024 +0200

    refactor: moved nike keys out of keykeeper

commit 7960caa
Author: Mikelle <mikhwall@gmail.com>
Date:   Thu May 16 23:30:23 2024 +0200

    refactor: moved ecies out of keykeeper

commit 91d44d9
Author: Mikelle <mikhwall@gmail.com>
Date:   Thu May 16 19:32:48 2024 +0200

    chore: fixes after merge

commit 60caac5
Merge: f0b585b cff5c34
Author: Mikelle <mikhwall@gmail.com>
Date:   Thu May 16 19:32:20 2024 +0200

    chore: Merge branch 'main' into keykeeper-refactoring

commit f0b585b
Author: Mikelle <mikhwall@gmail.com>
Date:   Thu May 16 19:11:24 2024 +0200

    refactor: deleted nike from keykeeper

commit cff5c34
Author: mrekucci <mrekucci@users.noreply.github.com>
Date:   Thu May 16 19:04:49 2024 +0200

    refactor: rename repository (#60)

commit 50c092b
Author: Mikelle <mikhwall@gmail.com>
Date:   Thu May 16 17:54:59 2024 +0200

    refactor: moved aes to the store, moved crypto functions to crypto package

commit cc9c314
Author: aloknerurkar <aloknerurkar@gmail.com>
Date:   Thu May 16 16:22:06 2024 +0530

    chore: add logs around deposits (#62)

commit 5266b68
Author: mrekucci <mrekucci@users.noreply.github.com>
Date:   Thu May 16 09:42:44 2024 +0200

    chore: introduce protobuf gen parity CI check (#61)
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.

Make contracts upgradable

3 participants