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

Dump Arbitrum Data #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dump Arbitrum Data #1

wants to merge 1 commit into from

Conversation

HanWang233
Copy link

@HanWang233 HanWang233 commented May 23, 2022

  1. 完成了对block,transaction,receipt,trace信息的收集
  2. 对于block,transaction,receipt部分可以直接从log-reader接收到,而真正的交易执行逻辑在arbos部分
  3. 对于trace部分,因为拿到的其实是执行完之后的交易,所以需要回放交易,回放和核心逻辑在trace.go,同时也是需要对这部分更底层的逻辑做一些抽象
  • 因为存在循环引用,以及构造server部分代码不是很适合在当前位置,因此需要将这部分更底层的逻辑抽象出来,写在另外一个pkg里面

  • 因为需要对当前的对象进行DB操作,所以要等到当前的内容落盘之后,再去做transaction的回放操作拿到trace

  1. 对于trace的dump加上check机制,用一个文件来记录当前dump的进度,防止block的信息通过rocksdb写入log之后发生宕机造成的trace数据的缺失

build 命令

docker build -t arb-node -f packages/arb-node.Dockerfile packages

run 命令

docker run --rm -it -v /home/han/arb/:/home/user/.arbitrum/mainnet -v /home/han/log/:/home/user/dump -v /home/han/trace_process/:/home/user/trace_process -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 arb-node:latest --l1.url http://192.168.100.51:8545/ --node.rpc.tracing.enable --node.cache.allow-slow-lookup --core.checkpoint-gas-frequency=156250000

几个解释:
--l1.url http://192.168.100.51:8545/ L1的地址
--node.rpc.tracing.enable 可以通过rpc拿到trace
--node.cache.allow-slow-lookup 从磁盘load block的信息,而不是从memory cache
--core.checkpoint-gas-frequency=156250000 archive的推荐配置

参考链接: https://developer.offchainlabs.com/docs/running_node

@HanWang233 HanWang233 force-pushed the dev-hanwang branch 9 times, most recently from c6a94f3 to f4d26f5 Compare May 24, 2022 06:23
@HanWang233 HanWang233 force-pushed the dev-hanwang branch 21 times, most recently from 918b68b to 5108bfc Compare June 8, 2022 05:19
@HanWang233 HanWang233 requested a review from mortal123 June 9, 2022 16:10
@HanWang233 HanWang233 force-pushed the dev-hanwang branch 26 times, most recently from d78f44d to 06f089a Compare June 17, 2022 06:50
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