Cardano-db-sync: 使用雪莱网络运行数据库同步

创建于 2020-07-09  ·  15评论  ·  资料来源: input-output-hk/cardano-db-sync

我注意到 repo 中已经有特定于 shelley 的代码,并且也有特定于 shelley 的问题,但在文档中我没有看到在该模式下运行 db sync 的说明。 如何使用雪莱测试网尝试 cardano-db-sync?

最有用的评论

我们目前有太多的测试网络,太多的飞行和配置变化比它应该的要困难得多。

几乎可以肯定,我们没有以轻松的方式支持release/1.16.x东西。

但是,如果您查看node配置并显示Protocol: RealPBFT那么master应该可以工作。 另一方面,如果它说Protocol: Cardano那么 tjhe erikd/hfc-5分支应该可以工作,但它在第一个池伪造块上中止(因为这是我正在等待的,所以我可以实现 #195 ) .

所有15条评论

Shelley 的支持目前正在进行中。 代码尚未完成,数据库架构也未完成。

所以是的,基本上可以将它连接到雪莱 Haskell 测试网,但它完全没有记录。 基本上我在两个screen会话中执行此操作:

# For cardano-node
git checkout 1.14.2 -b tag-1.14.2
nix-build -A scripts.shelley_testnet.node -o shelley-testnet-node
./shelley-testnet-node

对于db-sync

export PGPASSFILE=config/pgpass-shelley-testnet
cabal run cacardano-db-sync-extended -- --config config/testnet-config.yaml --genesis-file /nix/store/hih30xck46bw2l4mlz6b36dsdnd2cwh4-shelley-
testnet-genesis.json --socket-path ../cardano-node/state-node-shelley_testnet/node.socket --schema-dir schema/

显然,在实际接近完成之前,所有这些都不受官方支持。

这里可能有更多信息: https :

cardano-db-sync-extended 和 cardano-db-sync 有什么区别?

cardano-db-sync-extended 和 cardano-db-sync 有什么区别?

它在顶级自述文件中。

@refi93如果您的问题已得到解答,请随时关闭此选项。

@erikd你确定这是正确的命令吗? 即使在纠正“ ca cardano-db-sync-extended”之后,我也得到了

cabal: unrecognized 'run' option '--genesis-file'

unrecognized 'run' option '--socket-path'

unrecognized 'run' option '--schema-dir'

抱歉,在cardano-db-sync-extended之后插入一个额外的-- cardano-db-sync-extended (以上说明已更新)。

Cabal 假设cardano-db-sync-extended的选项是cabal

@erikd
cabal run cardano-db-sync-extended -- --config config/testnet-config.yaml --genesis-file /nix/store/hih30xck46bw2l4mlz6b36dsdnd2cwh4-shelley- testnet-genesis.json --socket-path ../cardano-node/state-node-shelley_testnet/node.socket --schema-dir schema/

Linking <path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-db-sync-extende
d-2.0.0/x/cardano-db-sync-extended/build/cardano-db-sync-extended/cardano-db-sync-extended ...
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):rrMw_info: error: undefined reference to 'crypto_vrf_proofbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):rrMx_info: error: undefined reference to 'crypto_vrf_publickeybytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):rrMy_info: error: undefined reference to 'crypto_vrf_secretkeybytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):rrMz_info: error: undefined reference to 'crypto_vrf_seedbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):rrMA_info: error: undefined reference to 'crypto_vrf_outputbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_zdfVRFAlgorithmPraosVRFzuzdc
seedSizzeVRF_info: error: undefined reference to 'crypto_vrf_seedbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_zdfVRFAlgorithmPraosVRFzuzdc
sizzeOutputVRF_info: error: undefined reference to 'crypto_vrf_outputbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/buil
d/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_vrfKeySizzeVRF_info: error: 
undefined reference to 'crypto_vrf_outputbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_unsafeRawSeed2_info: error: undefined reference to 'crypto_vrf_seedbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_verKeySizzeVRF_info: error: undefined reference to 'crypto_vrf_publickeybytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_signKeySizzeVRF_info: error: undefined reference to 'crypto_vrf_secretkeybytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_certSizzeVRF_info: error: undefined reference to 'crypto_vrf_proofbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_verify1_info: error: undefined reference to 'crypto_vrf_outputbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):ss0l_info: error: undefined reference to 'crypto_vrf_verify'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_zdfVRFAlgorithmPraosVRF4_info: error: undefined reference to 'crypto_vrf_seedbytes'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_skToSeed_info: error: undefined reference to 'crypto_vrf_sk_to_seed'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_skToVerKey_info: error: undefined reference to 'crypto_vrf_sk_to_pk'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):cardanozmcryptozmpraoszm2zi0zi0zminplace_CardanoziCryptoziVRFziPraos_keypairFromSeed_info: error: undefined reference to 'crypto_vrf_keypair_from_seed'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):ss5e_info: error: undefined reference to 'crypto_vrf_prove'
<path-to-dir>/cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-crypto-praos-2.0.0/build/libHScardano-crypto-praos-2.0.0-inplace.a(Praos.o):ss6c_info: error: undefined reference to 'crypto_vrf_proof_to_hash'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

任何提示?

第一个apt install libsodium libsodium-dev

然后将以下内容添加到cabal.project.local

package cardano-crypto-praos
  flags: -external-libsodium-vrf

抱歉,这没有记录在案,因为这还没有准备好发布。

@erikd根据您提供的运行 cardano-node 的命令,它不再同步并出现以下错误:

[ip-172-3:cardano.node.DnsSubscription:Error:23963] [2020-07-15 10:07:22.94 UTC] [String "Application Exception: 3.128.147.191:3001 HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 0}, blockPointHash = ShelleyHash {unShelleyHash = HashHeader {unHashHeader = 600137a3495e6f2c5bde81ecd81105086c55af51c1b4587985b92d46bb26b0e4}}})) (HeaderProtocolError [[OverlayFailure (WrongGenesisColdKeyOVERLAY (KeyHash e47b777efea3146b1aa18fde95ddbd3de38f068f529997ff4141e484) (KeyHash 17d2ab1bd33faeb975ce82f531cffb4c956acf14fc5fe62a30209b55)),OverlayFailure (OcertFailure (NoCounterForKeyHashOCERT (KeyHash e47b777efea3146b1aa18fde95ddbd3de38f068f529997ff4141e484)))]]) TipGenesis (Tip (SlotNo {unSlotNo = 169612}) (ShelleyHash {unShelleyHash = HashHeader {unHashHeader = d5a2570da3b552b0761cf87f99f1d503e5e443482cb8bbb93cce9a42add0fe88}}) (BlockNo {unBlockNo = 8348}))",String "SubscriptionTrace",String "\"relays-new.shelley-testnet.dev.cardano.org\""]
[ip-172-3:cardano.node.ErrorPolicy:Warning:56] [2020-07-15 10:07:22.94 UTC] [String "ErrorPolicySuspendPeer (Just (ApplicationExceptionTrace (HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 0}, blockPointHash = ShelleyHash {unShelleyHash = HashHeader {unHashHeader = 600137a3495e6f2c5bde81ecd81105086c55af51c1b4587985b92d46bb26b0e4}}})) (HeaderProtocolError [[OverlayFailure (WrongGenesisColdKeyOVERLAY (KeyHash e47b777efea3146b1aa18fde95ddbd3de38f068f529997ff4141e484) (KeyHash 17d2ab1bd33faeb975ce82f531cffb4c956acf14fc5fe62a30209b55)),OverlayFailure (OcertFailure (NoCounterForKeyHashOCERT (KeyHash e47b777efea3146b1aa18fde95ddbd3de38f068f529997ff4141e484)))]]) TipGenesis (Tip (SlotNo {unSlotNo = 169612}) (ShelleyHash {unShelleyHash = HashHeader {unHashHeader = d5a2570da3b552b0761cf87f99f1d503e5e443482cb8bbb93cce9a42add0fe88}}) (BlockNo {unBlockNo = 8348}))))) 200s 200s",String "ErrorPolicyTrace",String "3.128.147.191:3001"]

我们如何解决这个问题?

顺便说一下,您是否期望 db 架构发生重大变化?

预计不会对架构进行更多重大更改,但仍有可能发生细微更改。

至于你看到的问题是节点问题,而不是数据库同步问题。 极有可能是因为节点版本和网络版本不匹配。 这仍然是一项有进展的工作。 它仍然一直在变化。

~预计不会对架构进行更多重大更改~。

我刚刚意识到至少需要添加一个全新的表。

@erikd那会是什么桌子?

需要有一个表来保存来自分类帐状态的奖励,然后才能撤回。

@erikd是否有与 Cardano 节点 1.16.x 兼容的分支? 如果是这样,我该如何开始?

我们目前有太多的测试网络,太多的飞行和配置变化比它应该的要困难得多。

几乎可以肯定,我们没有以轻松的方式支持release/1.16.x东西。

但是,如果您查看node配置并显示Protocol: RealPBFT那么master应该可以工作。 另一方面,如果它说Protocol: Cardano那么 tjhe erikd/hfc-5分支应该可以工作,但它在第一个池伪造块上中止(因为这是我正在等待的,所以我可以实现 #195 ) .

此页面是否有帮助?
0 / 5 - 0 等级