Cardano-db-sync: Shelley λ„€νŠΈμ›Œν¬μ™€ db sync μ‹€ν–‰

에 λ§Œλ“  2020λ…„ 07μ›” 09일  Β·  15μ½”λ©˜νŠΈ  Β·  좜처: input-output-hk/cardano-db-sync

리포지토리에 이미 셸리 κ΄€λ ¨ μ½”λ“œκ°€ 있고 셸리 κ΄€λ ¨ λ¬Έμ œλ„ μžˆμ§€λ§Œ λ¬Έμ„œμ—λŠ” ν•΄λ‹Ή λͺ¨λ“œμ—μ„œ db syncλ₯Ό μ‹€ν–‰ν•˜λŠ” 지침이 μ—†μŠ΅λ‹ˆλ‹€. Shelley ν…ŒμŠ€νŠΈλ„·μœΌλ‘œ cardano-db-syncλ₯Ό μ–΄λ–»κ²Œ μ‹œν—˜ν•΄ λ³Ό 수 μžˆμŠ΅λ‹ˆκΉŒ?

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

ν˜„μž¬ ν…ŒμŠ€νŠΈ λ„€νŠΈμ›Œν¬κ°€ λ„ˆλ¬΄ 많고 λΉ„ν–‰ 및 ꡬ성이 λ„ˆλ¬΄ 많이 λ³€κ²½λ˜μ–΄ μ˜ˆμƒλ³΄λ‹€ μ–΄λ ΅μŠ΅λ‹ˆλ‹€.

고톡 μ—†λŠ” λ°©μ‹μœΌλ‘œ release/1.16.x λ₯Ό μ§€μ›ν•˜λŠ” 것이 거의 μ—†λ‹€λŠ” 것이 거의 ν™•μ‹€ν•©λ‹ˆλ‹€.

κ·ΈλŸ¬λ‚˜ node ꡬ성을 보고 Protocol: RealPBFT 라고 ν‘œμ‹œλ˜λ©΄ master κ°€ μž‘λ™ν•΄μ•Ό ν•©λ‹ˆλ‹€. λ°˜λ©΄μ— 그것이 λ§ν•˜λŠ” 경우 Protocol: Cardano λ‹€μŒ tjhe erikd/hfc-5 λΆ„κΈ° μž‘λ™ν•΄μ•Όν•˜μ§€λ§Œ (즉, λ‚΄κ°€ # 195을 κ΅¬ν˜„ν•  수 μžˆλ„λ‘ 기닀리고 무엇 λ•Œλ¬Έμ—)λŠ” 졜초의 ν’€ 단쑰 블둝에 μ€‘λ‹¨λ©λ‹ˆλ‹€ .

λͺ¨λ“  15 λŒ“κΈ€

Shelley 지원은 ν˜„μž¬ 진행 μ€‘μž…λ‹ˆλ‹€. μ½”λ“œκ°€ μ™„λ£Œλ˜μ§€ μ•Šμ•˜μœΌλ©° λ°μ΄ν„°λ² μ΄μŠ€ μŠ€ν‚€λ§ˆλ„ μ—†μŠ΅λ‹ˆλ‹€.

예, 기본적으둜 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://github.com/cardano-community/guild-operators

cardano-db-sync-extended와 cardano-db-sync의 차이점은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?

cardano-db-sync-extended와 cardano-db-sync의 차이점은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?

μ΅œμƒμœ„ README에 μžˆμŠ΅λ‹ˆλ‹€.

@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 (μ—…λ°μ΄νŠΈ μœ„μ˜ 지침).

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 μŠ€ν‚€λ§ˆμ˜ μ£Όμš” λ³€κ²½ 사항을 μ˜ˆμƒν•˜μ‹­λ‹ˆκΉŒ?

μŠ€ν‚€λ§ˆμ— λŒ€ν•œ 더 μ΄μƒμ˜ μ£Όμš” λ³€κ²½ 사항은 μ˜ˆμƒλ˜μ§€ μ•Šμ§€λ§Œ μ‚¬μ†Œν•œ λ³€κ²½ 사항은 μ—¬μ „νžˆ β€‹β€‹μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.

λ¬Έμ œλŠ” db-sync λ¬Έμ œκ°€ μ•„λ‹ˆλΌ λ…Έλ“œ λ¬Έμ œλΌλŠ” 것을 μ•Œ 수 μžˆμŠ΅λ‹ˆλ‹€. λ…Έλ“œ 버전과 λ„€νŠΈμ›Œν¬ 버전이 μΌμΉ˜ν•˜μ§€ μ•ŠκΈ° λ•Œλ¬ΈμΌ κ°€λŠ₯성이 ν½λ‹ˆλ‹€. 이것은 아직 진행 쀑인 μž‘μ—…μž…λ‹ˆλ‹€. 그것은 μ—¬μ „νžˆ ​​항상 λ³€ν™”ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

~μŠ€ν‚€λ§ˆμ— λŒ€ν•œ 더 μ΄μƒμ˜ μ£Όμš” λ³€κ²½ 사항은 μ—†μŠ΅λ‹ˆλ‹€~.

적어도 ν•˜λ‚˜μ˜ μ™„μ „νžˆ μƒˆλ‘œμš΄ ν…Œμ΄λΈ”μ„ μΆ”κ°€ν•΄μ•Ό ν•œλ‹€λŠ” 것을 κΉ¨λ‹¬μ•˜μŠ΅λ‹ˆλ‹€.

@erikd μ–΄λ–€ ν…Œμ΄λΈ”μ΄ λ κΉŒμš”?

인좜되기 전에 원μž₯ μƒνƒœμ—μ„œ 보상을 보관할 ν…Œμ΄λΈ”μ΄ ν•„μš”ν•©λ‹ˆλ‹€.

@erikd 1.16.x μΉ΄λ₯΄ λ‹€λ…Έ λ…Έλ“œμ™€ ν˜Έν™˜λ˜λŠ” λΈŒλžœμΉ˜κ°€ μžˆλ‚˜μš”? κ·Έλ ‡λ‹€λ©΄ μ–΄λ–»κ²Œ μ‹œμž‘ν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

ν˜„μž¬ ν…ŒμŠ€νŠΈ λ„€νŠΈμ›Œν¬κ°€ λ„ˆλ¬΄ 많고 λΉ„ν–‰ 및 ꡬ성이 λ„ˆλ¬΄ 많이 λ³€κ²½λ˜μ–΄ μ˜ˆμƒλ³΄λ‹€ μ–΄λ ΅μŠ΅λ‹ˆλ‹€.

고톡 μ—†λŠ” λ°©μ‹μœΌλ‘œ release/1.16.x λ₯Ό μ§€μ›ν•˜λŠ” 것이 거의 μ—†λ‹€λŠ” 것이 거의 ν™•μ‹€ν•©λ‹ˆλ‹€.

κ·ΈλŸ¬λ‚˜ node ꡬ성을 보고 Protocol: RealPBFT 라고 ν‘œμ‹œλ˜λ©΄ master κ°€ μž‘λ™ν•΄μ•Ό ν•©λ‹ˆλ‹€. λ°˜λ©΄μ— 그것이 λ§ν•˜λŠ” 경우 Protocol: Cardano λ‹€μŒ tjhe erikd/hfc-5 λΆ„κΈ° μž‘λ™ν•΄μ•Όν•˜μ§€λ§Œ (즉, λ‚΄κ°€ # 195을 κ΅¬ν˜„ν•  수 μžˆλ„λ‘ 기닀리고 무엇 λ•Œλ¬Έμ—)λŠ” 졜초의 ν’€ 단쑰 블둝에 μ€‘λ‹¨λ©λ‹ˆλ‹€ .

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰