Skip to content

Persistence Updates#56

Merged
willmeister merged 5 commits intomasterfrom
persistence_updates
Mar 26, 2020
Merged

Persistence Updates#56
willmeister merged 5 commits intomasterfrom
persistence_updates

Conversation

@willmeister
Copy link
Copy Markdown

Description

Adding and cleaning up configuration via environment variables. Trying to pave the way for persistence in a deployed dev environment.

Contributing Agreement

Copy link
Copy Markdown
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

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

This looks good so far but I haven't quite finished the review. Instead I just noticed a bit of terminology that I got confused by and so I'm submitting this as a comment to then send around to make sure it lines up with others intuitions.

Might be good to add stuff like this to a glossary--we've got so many moving parts it's important we're all on the same page with what is what.

* to consolidate access / updates and default values.
*/
export class Environment {
// Local Node Config
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! In the spirit of honing my code style intuitions, I have two observations:

  1. These comments are good because they provide context for the organizational structure of the code, not just what the code does.
  2. We could possibly look for a library which handles config but in this case building this class seems like it wouldn't be much harder than using a library, so it's fine to use a "custom" implementation.

* @param mnemonic
* @param port
*/
export const startLocalL1Node = async (
Copy link
Copy Markdown
Contributor

@karlfloersch karlfloersch Mar 25, 2020

Choose a reason for hiding this comment

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

Hmm the terminology here is a little confusing. Am I getting it right that "LocalL1Node" is what we send "InternalTransactions" to? It's just really confusing and I want to make sure we have all of the components mapped out with reasonable terminology.

I just made a diagram which illustrates all of the components.

IMG_6A835E8216F2-1

So to be clear, L1 Node would be just a normal Geth instance that's syncing mainnet Ethereum. Then an L2 Node or maybe more specifically Rollup Node would be the thing that runs an Internal instance of Geth / EVM, which itself either emulates an OVM deployed to it (ExecutionManger, etc).

Does that match up with the terminology being used here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yep, that's it! The line in question is to specifically start an L1 node locally to fully exercise the end-to-end functionality of L2 <--> L1 messaging. This is completely different than the L2 Node. I went with L1 and L2 because nothing is actually "rolled up" in the L2 node, and instead, the rollup state sits in the L1 node. Wanted to avoid that confusion. Does L1 and L2 sound good? Happy to rename it to rollup if you think it makes more sense.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah great! So I think after staring at this for a while I see where my confusion was. The fact that inside the LocalL1Node we have a sequencerWallet was throwing me off. But it’s just because in this circumstance the L1 that we are running is a Local testnet run by the sequencer.

These L1 & L2 terms are a little confusing! Especially when you see L1ToL2 right next to L2ToL1 — my dyslexia goes crazy! That said, it’s not clear to me that EthNode and RollupNode (for example) are much better 😕 Especially because both are in some sense “Eth” nodes.

I realize this could require some refactoring/renaming (and so I’m happy to not do it) but I wonder if instead of L1ToL2/L2ToL1, we could use the terms L2InboundMessages and L2OutboundMessages or something? Just spitballing and curious what you / @ben-chain think.

It’s a nitpick though & might be specific to my difficulty reading 😂

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh nvm I take it back. I’m now thinking about l2ToL1MessageReceiver and calling it l2OutboundMessageReceiver and realize that these variable names are going to be confusing basically no matter how we slice it.

Unless y'all absolutely love my naming change (which might have been closer to what Ben did originally?) doesn’t feel worth the switching cost.

@willmeister willmeister merged commit 14fea00 into master Mar 26, 2020
@willmeister willmeister deleted the persistence_updates branch March 26, 2020 04:09
Copy link
Copy Markdown
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

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

Alrighty! That took surprisingly long to decipher but happy to say that I understand the code / variable naming now & looks good to me!!! 😄

* @param mnemonic
* @param port
*/
export const startLocalL1Node = async (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah great! So I think after staring at this for a while I see where my confusion was. The fact that inside the LocalL1Node we have a sequencerWallet was throwing me off. But it’s just because in this circumstance the L1 that we are running is a Local testnet run by the sequencer.

These L1 & L2 terms are a little confusing! Especially when you see L1ToL2 right next to L2ToL1 — my dyslexia goes crazy! That said, it’s not clear to me that EthNode and RollupNode (for example) are much better 😕 Especially because both are in some sense “Eth” nodes.

I realize this could require some refactoring/renaming (and so I’m happy to not do it) but I wonder if instead of L1ToL2/L2ToL1, we could use the terms L2InboundMessages and L2OutboundMessages or something? Just spitballing and curious what you / @ben-chain think.

It’s a nitpick though & might be specific to my difficulty reading 😂

* @param mnemonic
* @param port
*/
export const startLocalL1Node = async (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh nvm I take it back. I’m now thinking about l2ToL1MessageReceiver and calling it l2OutboundMessageReceiver and realize that these variable names are going to be confusing basically no matter how we slice it.

Unless y'all absolutely love my naming change (which might have been closer to what Ben did originally?) doesn’t feel worth the switching cost.

snario pushed a commit that referenced this pull request Apr 14, 2021
* decompression (not working)

* start EIP155 serialization

* working decompressor

* working CreateEOA, working native EIP155tx

* all three tx types working

* remove only

* fix ECDSAUtil tests

* restore original version of smock

* add proxys

* clean up tests

* clean up decompressor tests

* clean up ProxyDecompressor

* clean up decompressor tests

* add CREATEEOA, SETNONCE, GETNONCE tests

* working ECDSAContractAccount

* fix decompressor

* renaming, add deploy

* add proxyeoa test, cleanup

* remove createEOA type, add extcodesize check

* fix decompressor test

* support create txs

* Decompressor -> Entrypoint

* use safeREVERT instead of requires

* add isAuthenticated state manager test

* update smock

* fix sequencerEntrypoint test

* add isAuthenticated

* Revert "update smock"

This reverts commit 286a222414accf9387dcd12ecbed0a66be586bc8.

* fix test

* Updates to EM

* removed kall from contract account

* Fixed SSLOAD and SSTORE problems

* Fix some broken tests

* Fix more bugs & rename to ProxyEOA

* WIP fix call test

* fix all tests

* add gas check

* update tests

* lint and remove 2000 gas check

* Add fees to default EOA (#56)

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
protolambda pushed a commit to protolambda/optimism that referenced this pull request May 1, 2022
…ting-exemptions

add more linting exemptions
gd-0 pushed a commit to gattaca-com/based-optimism that referenced this pull request May 19, 2025
gd-0 pushed a commit to gattaca-com/based-optimism that referenced this pull request May 19, 2025
blockchaindevsh added a commit to blockchaindevsh/optimism that referenced this pull request Jun 30, 2025
cuiweixie pushed a commit to cuiweixie/optimism that referenced this pull request Oct 22, 2025
theochap pushed a commit that referenced this pull request Dec 10, 2025
Zena-park added a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
commit 017ba2f
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 23:24:01 2024 +0900

    Update package.json

commit 4701a20
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 23:23:23 2024 +0900

    style: keep code within 100 Columns to improve readability ethereum-optimism#58

    - /contracts/stake/managers/SeigManagerV1_3.sol:
    - /contracts/stake/managers/DepositManagerV1_1.sol:
    - /contracts/proxy/DAOCommitteeProxy2.sol:

commit a97b123
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 22:55:37 2024 +0900

    fix: remove excess empty line ethereum-optimism#58

    /contracts/layer2/OperatorManagerProxy.sol
    remove excess empty line at the end of the contract

commit 1bba418
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 22:54:16 2024 +0900

    fix: Delete blank ethereum-optimism#58

    /contracts/layer2/Layer2ManagerV1_1.sol:
    contract  Layer2ManagerV1_1 -> contract Layer2ManagerV1_1

commit 9b1d60f
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 22:51:18 2024 +0900

    test: Excluding comparison of Powerton TON balances on the mainnet

commit 620d853
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 22:49:31 2024 +0900

    fix: Implementations of the setFactor() function can be put in require statements ethereum-optimism#56
Zena-park added a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
commit 5f9a4c558d7d08519b838223e42f76885cfb3eae
Author: Zena-park <zena@tokamak.network>
Date:   Thu Oct 24 20:40:31 2024 +0900

    feat: add LegacySystemConfigProxy ethereum-optimism#57

    After implementing the challenge on Titan Candidate, we need to upgrade the logic, so use the proxy.

commit aa5494b7a8c00f0008ab9331147d0b5d46528309
Author: Zena-park <zena@tokamak.network>
Date:   Thu Oct 24 18:02:28 2024 +0900

    test

commit 8f0cd922e81a577e1526a954f5104456c766e6b1
Author: Zena-park <zena@tokamak.network>
Date:   Thu Oct 24 13:17:56 2024 +0900

    Update 9.check_apy.js

commit 19cad49eb5c078e9ab0dd0c5037c7434187f52c6
Author: Zena-park <zena@tokamak.network>
Date:   Thu Oct 24 13:15:52 2024 +0900

    Update 9.check_apy.js

commit 177f65cc0283f2823f15ef00da2db9602fd8f8eb
Author: Zena-park <zena@tokamak.network>
Date:   Thu Oct 24 12:52:50 2024 +0900

    Create 9.check_apy.js

commit d36d5d19e369c700b0b5f1132d9a6313b11eb708
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 23:43:10 2024 +0900

    Squashed commit of the following:

    commit 8f89b1a
    Author: Zena-park <zena@tokamak.network>
    Date:   Wed Oct 23 23:26:26 2024 +0900

        Squashed commit of the following:

        commit 017ba2f
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 23:24:01 2024 +0900

            Update package.json

        commit 4701a20
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 23:23:23 2024 +0900

            style: keep code within 100 Columns to improve readability ethereum-optimism#58

            - /contracts/stake/managers/SeigManagerV1_3.sol:
            - /contracts/stake/managers/DepositManagerV1_1.sol:
            - /contracts/proxy/DAOCommitteeProxy2.sol:

        commit a97b123
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 22:55:37 2024 +0900

            fix: remove excess empty line ethereum-optimism#58

            /contracts/layer2/OperatorManagerProxy.sol
            remove excess empty line at the end of the contract

        commit 1bba418
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 22:54:16 2024 +0900

            fix: Delete blank ethereum-optimism#58

            /contracts/layer2/Layer2ManagerV1_1.sol:
            contract  Layer2ManagerV1_1 -> contract Layer2ManagerV1_1

        commit 9b1d60f
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 22:51:18 2024 +0900

            test: Excluding comparison of Powerton TON balances on the mainnet

        commit 620d853
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 22:49:31 2024 +0900

            fix: Implementations of the setFactor() function can be put in require statements ethereum-optimism#56

    commit 76617fc
    Author: Zena-park <zena@tokamak.network>
    Date:   Wed Oct 23 22:11:34 2024 +0900

        test ethereum-optimism#54

    commit 795f37c
    Author: Zena-park <zena@tokamak.network>
    Date:   Wed Oct 23 21:47:01 2024 +0900

        Squashed commit of the following:

        commit e4a7e06135104ee6fe74052f80866324061e7d2e
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 21:46:34 2024 +0900

            chores ethereum-optimism#57

        commit afe276cfee706256ede3d6b0167f5c98ac066582
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 21:46:19 2024 +0900

            test: the rehearsal script of sepolia ethereum-optimism#57

        commit 632365dc85e19a41d8d2bb5ec8a794c9ba367a52
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 21:45:10 2024 +0900

            feat: initialize the storage ethereum-optimism#57

        commit 24f712cc31f85218e27fdc95452a4e1ca6671dd5
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 21:44:47 2024 +0900

            a deployment script ethereum-optimism#57

        commit ec5a195b2d427d279abd2400fc34fe332ceeb818
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 17:30:13 2024 +0900

            Update 8.dao-staking-v2.5.sepolia.test.ts

        commit af60315286e9f61b2e6b62b8789b473771a474bb
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 17:28:40 2024 +0900

            feat: a deployment script ethereum-optimism#57

        commit 9c0e4d8f1ffc58e2e7cd649b07d6a8b0b30d67a5
        Merge: 690bc8d 87c1cda
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 17:03:12 2024 +0900

            Merge branch 'test-mainnet' into rehearsal-sepolia

        commit 690bc8d28851612ed23ba0f594b68946c153535b
        Author: Zena-park <zena@tokamak.network>
        Date:   Wed Oct 23 16:42:40 2024 +0900

            test

commit e4a7e06135104ee6fe74052f80866324061e7d2e
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 21:46:34 2024 +0900

    chores ethereum-optimism#57

commit afe276cfee706256ede3d6b0167f5c98ac066582
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 21:46:19 2024 +0900

    test: the rehearsal script of sepolia ethereum-optimism#57

commit 632365dc85e19a41d8d2bb5ec8a794c9ba367a52
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 21:45:10 2024 +0900

    feat: initialize the storage ethereum-optimism#57

commit 24f712cc31f85218e27fdc95452a4e1ca6671dd5
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 21:44:47 2024 +0900

    a deployment script ethereum-optimism#57

commit ec5a195b2d427d279abd2400fc34fe332ceeb818
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 17:30:13 2024 +0900

    Update 8.dao-staking-v2.5.sepolia.test.ts

commit af60315286e9f61b2e6b62b8789b473771a474bb
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 17:28:40 2024 +0900

    feat: a deployment script ethereum-optimism#57

commit 9c0e4d8f1ffc58e2e7cd649b07d6a8b0b30d67a5
Merge: 690bc8d 87c1cda
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 17:03:12 2024 +0900

    Merge branch 'test-mainnet' into rehearsal-sepolia

commit 690bc8d28851612ed23ba0f594b68946c153535b
Author: Zena-park <zena@tokamak.network>
Date:   Wed Oct 23 16:42:40 2024 +0900

    test
Zena-park added a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
theochap pushed a commit that referenced this pull request Jan 14, 2026
theochap pushed a commit that referenced this pull request Jan 15, 2026
* feat(protocol): introduce core protocol types

* fix: use alloy primitive types internally for better serialization

* fix: tests are only for serde
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.

2 participants