Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scratch for testing the integration #12

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Scratch for testing the integration #12

merged 1 commit into from
Nov 16, 2023

Conversation

ImJeremyHe
Copy link
Member

This PR is to update the submodule of nitro-testnode, and it depends on this.

Test this with

./test-node.bash --init --dev --espresso

@sveitser
Copy link

@ImJeremyHe this is still marked as draft. Any more work that is required before reviewing?

@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 3 times, most recently from e685587 to 0cfc68e Compare November 14, 2023 09:18
@ImJeremyHe ImJeremyHe marked this pull request as ready for review November 14, 2023 09:21
@sveitser
Copy link

I'm getting the error below. Looks like a contract function from the wrong account.

https://github.com/search?q=repo%3AOffchainLabs%2Ftoken-bridge-contracts%20ONLY_COUNTERPART_GATEWAY&type=code

I think the changes here should be causing such an error though.

weth 0x408Da76E87511429485C32E4Ad647DD14823Fdc4
multicall 0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48
initialising L2
initialising L1
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":422,\"error\":{\"code\":3,\"message\":\"execution reverted: ONLY_COUNTERPART_GATEWAY\",\"data\":\"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000\"}}\n","error":{"code":3,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000"},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"to\":\"0x00000000000000000000000000000000000000c8\",\"data\":\"0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000\"}],\"id\":422,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"http://sequencer:8547"}, method="estimateGas", transaction={"to":"0x00000000000000000000000000000000000000C8","data":"0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.6.4)
    at Logger.makeError (/workspace/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
    at Logger.throwError (/workspace/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
    at checkError (/workspace/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:108:16)
    at JsonRpcProvider.<anonymous> (/workspace/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:590:20)
    at step (/workspace/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
    at Object.throw (/workspace/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
    at rejected (/workspace/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  error: Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":422,\"error\":{\"code\":3,\"message\":\"execution reverted: ONLY_COUNTERPART_GATEWAY\",\"data\":\"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000\"}}\n", error={"code":3,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000"}, requestBody="{\"method\":\"eth_estimateGas\",\"params\":[{\"to\":\"0x00000000000000000000000000000000000000c8\",\"data\":\"0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000\"}],\"id\":422,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="http://sequencer:8547", code=SERVER_ERROR, version=web/5.6.0)
      at Logger.makeError (/workspace/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
      at Logger.throwError (/workspace/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
      at /workspace/node_modules/@ethersproject/web/src.ts/index.ts:329:28
      at step (/workspace/node_modules/@ethersproject/web/lib/index.js:33:23)
      at Object.next (/workspace/node_modules/@ethersproject/web/lib/index.js:14:53)
      at fulfilled (/workspace/node_modules/@ethersproject/web/lib/index.js:5:58)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5) {
    reason: 'processing response error',
    code: 'SERVER_ERROR',
    body: '{"jsonrpc":"2.0","id":422,"error":{"code":3,"message":"execution reverted: ONLY_COUNTERPART_GATEWAY","data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000"}}\n',
    error: Error: execution reverted: ONLY_COUNTERPART_GATEWAY
        at getResult (/workspace/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:125:28)
        at processJsonFunc (/workspace/node_modules/@ethersproject/web/src.ts/index.ts:371:22)
        at /workspace/node_modules/@ethersproject/web/src.ts/index.ts:308:42
        at step (/workspace/node_modules/@ethersproject/web/lib/index.js:33:23)
        at Object.next (/workspace/node_modules/@ethersproject/web/lib/index.js:14:53)
        at fulfilled (/workspace/node_modules/@ethersproject/web/lib/index.js:5:58)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (node:internal/process/task_queues:96:5) {
      code: 3,
      data: '0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f4e4c595f434f554e544552504152545f474154455741590000000000000000'
    },
    requestBody: '{"method":"eth_estimateGas","params":[{"to":"0x00000000000000000000000000000000000000c8","data":"0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000"}],"id":422,"jsonrpc":"2.0"}',
    requestMethod: 'POST',
    url: 'http://sequencer:8547'
  },
  method: 'estimateGas',
  transaction: {
    to: '0x00000000000000000000000000000000000000C8',
    data: '0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000',
    accessList: null
  }
}

@sveitser
Copy link

On the second try I got the transaction replaced error you mentioned.

.gitmodules Outdated Show resolved Hide resolved
@@ -143,6 +143,10 @@ func (s *EspressoSequencer) Start(ctxIn context.Context) error {

// Required methods for the TransactionPublisher interface
func (s *EspressoSequencer) PublishTransaction(parentCtx context.Context, tx *types.Transaction, options *arbitrum_types.ConditionalOptions) error {
if err := s.hotShotState.client.SubmitTransaction(parentCtx, tx); err != nil {
Copy link

Choose a reason for hiding this comment

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

Nice, yeah I think this works better here

@@ -281,6 +281,7 @@ func DeployOnL1(ctx context.Context, parentChainReader *headerreader.HeaderReade

type Config struct {
Sequencer bool `koanf:"sequencer"`
Espresso bool `koanf:"espresso"`
Copy link

Choose a reason for hiding this comment

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

It doesn't look like any logic (besides the validation below) depends on this flag, so can we remove it?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used to avoid the breaking of the validation since we need to set Sequencer to true and set Coordinator to false.

@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 2 times, most recently from 0d7e7a9 to f46a13c Compare November 15, 2023 07:19
@sveitser sveitser self-requested a review November 15, 2023 10:44
Copy link

@sveitser sveitser left a comment

Choose a reason for hiding this comment

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

Works like a charm!

Copy link

@nomaxg nomaxg left a comment

Choose a reason for hiding this comment

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

LGTM

@ImJeremyHe ImJeremyHe merged commit c3c566d into integration Nov 16, 2023
5 checks passed
@ImJeremyHe ImJeremyHe deleted the jh/deploy branch November 16, 2023 02:40
zacshowa pushed a commit that referenced this pull request Nov 26, 2024
add getBlockDifficulty to mock simple
zacshowa pushed a commit that referenced this pull request Nov 26, 2024
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