리ν¬μ§ν 리μ μ΄λ―Έ μ Έλ¦¬ κ΄λ ¨ μ½λκ° μκ³ μ Έλ¦¬ κ΄λ ¨ λ¬Έμ λ μμ§λ§ λ¬Έμμλ ν΄λΉ λͺ¨λμμ db syncλ₯Ό μ€ννλ μ§μΉ¨μ΄ μμ΅λλ€. Shelley ν μ€νΈλ·μΌλ‘ cardano-db-syncλ₯Ό μ΄λ»κ² μνν΄ λ³Ό μ μμ΅λκΉ?
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μ ꡬνν μ μλλ‘ κΈ°λ€λ¦¬κ³ 무μ λλ¬Έμ)λ μ΅μ΄μ ν λ¨μ‘° λΈλ‘μ μ€λ¨λ©λλ€ .
κ°μ₯ μ μ©ν λκΈ
νμ¬ ν μ€νΈ λ€νΈμν¬κ° λ무 λ§κ³ λΉν λ° κ΅¬μ±μ΄ λ무 λ§μ΄ λ³κ²½λμ΄ μμλ³΄λ€ μ΄λ ΅μ΅λλ€.
κ³ ν΅ μλ λ°©μμΌλ‘
release/1.16.x
λ₯Ό μ§μνλ κ²μ΄ κ±°μ μλ€λ κ²μ΄ κ±°μ νμ€ν©λλ€.κ·Έλ¬λ
node
ꡬμ±μ 보κ³Protocol: RealPBFT
λΌκ³ νμλλ©΄master
κ° μλν΄μΌ ν©λλ€. λ°λ©΄μ κ·Έκ²μ΄ λ§νλ κ²½μ°Protocol: Cardano
λ€μ tjheerikd/hfc-5
λΆκΈ° μλν΄μΌνμ§λ§ (μ¦, λ΄κ° # 195μ ꡬνν μ μλλ‘ κΈ°λ€λ¦¬κ³ 무μ λλ¬Έμ)λ μ΅μ΄μ ν λ¨μ‘° λΈλ‘μ μ€λ¨λ©λλ€ .