Skip to content

Local dev env with Espresso Sequencer#2

Merged
ImJeremyHe merged 1 commit intointegrationfrom
jh/deploy
Nov 16, 2023
Merged

Local dev env with Espresso Sequencer#2
ImJeremyHe merged 1 commit intointegrationfrom
jh/deploy

Conversation

@ImJeremyHe
Copy link
Member

No description provided.

@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 2 times, most recently from d6e846c to 3c588a7 Compare November 7, 2023 07:54
@sveitser sveitser changed the title Testing Local dev env with Espresso Sequencer Nov 7, 2023
@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 8 times, most recently from 822aaca to d1db79b Compare November 14, 2023 06:54
@ImJeremyHe ImJeremyHe marked this pull request as ready for review November 14, 2023 07:02
@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 4 times, most recently from 0d95fa0 to db20d1a Compare November 14, 2023 09:11
@sveitser
Copy link
Collaborator

@ImJeremyHe since this seems to cause problem with the contract deployment on L1 is it possible that the commitment task interferes with the L1 deployment? Can you confirm that the account we use here for the hotshot commitment isn't otherwise used?

@sveitser
Copy link
Collaborator

sveitser commented Nov 14, 2023

@ImJeremyHe I had a look at the code and it looks like there should be no interference. Another possibility is that there are some hardcoded contract addresses during the test deployment and having the commitment task run before the rollup deployment messes with that. I haven't yet had time to check if that's the case, but currently I don't have another idea.

Edit: if we do use a separate account this shouldn't be possible either.

@sveitser
Copy link
Collaborator

sveitser commented Nov 14, 2023

@ImJeremyHe I'm a bit confused that the failing gas estimation happens while initialising the L1 but the failing request is a request to the L2 sequencer.

    requestBody: '{"method":"eth_estimateGas","params":[{"to":"0x00000000000000000000000000000000000000c8","data":"0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000"}],"id":425,"jsonrpc":"2.0"}',
    requestMethod: 'POST',
    url: 'http://sequencer:8547'
  },
  method: 'estimateGas',
  transaction: {
    to: '0x00000000000000000000000000000000000000C8',
    data: '0xc3dc58790000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f40000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000001294b86822ff4976bfe136cb06cf43ec7fcf257400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e0000000000000000000000003f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c44201f985000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a39ffa43eba037d67a0f4fe91956038aba0ca38600000000000000000000000000000000000000000000000000000000000000010000000000000000000000004a2ba922052ba54e29c5417bc979daaf7d5fe4f400000000000000000000000000000000000000000000000000000000',
    accessList: null
  }

On the upside it now makes more sense that our changes break this.

@sveitser
Copy link
Collaborator

@ImJeremyHe it's also possible the issues arise from L2 transactions going through the sequencer. Since the sequencer may sequence transactions out of order this could explain why we get transactions replaced errors. It could also explain why we get the permissions error (sometimes) but I can't say for sure. If all the L2 transaction wait until they get a transaction receipt then re-ordering should not be an issue.

Maybe would be good to confirm if that is the case I think the places I have looked at inside the arbitrum-sdk repo all have .wait() but maybe there are places where multiple transactions are sent in parallel.

Does ./test-node.bash --init --dev --espresso ever work without error for you? For me it always fails, tried maybe a total of 10 times.

echo == Funding validator and sequencer
docker-compose run scripts send-l1 --ethamount 1000 --to validator --wait
docker-compose run scripts send-l1 --ethamount 1000 --to sequencer --wait
docker-compose run scripts send-l1 --ethamount 1000 --to espresso-sequencer --wait
Copy link

Choose a reason for hiding this comment

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

What is the purpose of this espresso-sequencer account? Does it correspond to the hotshot commitment contract?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. It needs to commit/deploy the hotshot contract. There are some other ways to do this, like funding in the Genesis Block. But I think it is not a good idea to change so many files and this special account may be useful in later testing.

@ImJeremyHe ImJeremyHe force-pushed the jh/deploy branch 2 times, most recently from ea91552 to bb9b6dd Compare November 15, 2023 04:47
return specialAccount(4);
}
if (name == "espresso-sequencer")
return specialAccount(5);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if the espresso sequencer account should be a user account instead? One could argue we don't require it to be a special account since it's we didn't increment specialAccounts but things are working anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I didn't realize that. This constant is only to write down the information of accounts(for debugging?). Using espresso-sequencer as the name of the account maybe not necessary, but it clearly shows there is a special entity in our integration.

Copy link
Collaborator

@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.

LGTM. Just one question remaining.

@ImJeremyHe ImJeremyHe merged commit 7c8b39a into integration Nov 16, 2023
@ImJeremyHe ImJeremyHe deleted the jh/deploy branch November 16, 2023 02:03
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