Cardano-db-sync: Ausführen von db sync mit Shelley-Netzwerk

Erstellt am 9. Juli 2020  ·  15Kommentare  ·  Quelle: input-output-hk/cardano-db-sync

Mir ist aufgefallen, dass das Repo bereits Shelley-spezifischen Code enthält und es auch Shelley-spezifische Probleme gibt, aber in den Dokumenten sehe ich keine Anweisungen zum Ausführen von db sync in diesem Modus. Wie kann ich cardano-db-sync mit Shelley Testnet ausprobieren?

Hilfreichster Kommentar

Wir haben derzeit zu viele Testnetzwerke, zu viele Flugänderungen und Konfigurationen sind schwieriger als es sein sollte.

Es ist fast sicher, dass wir nicht etwas haben, das release/1.16.x schmerzlos unterstützt.

Wenn Sie sich jedoch die Konfiguration von node ansehen und dort Protocol: RealPBFT dann sollte master funktionieren. Wenn auf der anderen Seite Protocol: Cardano dann sollte der erikd/hfc-5 Zweig funktionieren, aber er wird beim ersten gefälschten Poolblock abgebrochen (weil ich darauf warte, damit ich #195 implementieren kann) .

Alle 15 Kommentare

Der Shelley-Support ist derzeit in Arbeit. Der Code wurde noch nicht fertiggestellt, ebenso wenig wie das Datenbankschema.

Also ja, es ist grundsätzlich möglich, es mit dem Shelley Haskell-Testnetz zu verbinden, aber es ist völlig undokumentiert. Im Grunde mache ich das in zwei screen Sitzungen:

# 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

und für 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/

Offensichtlich wird all dies offiziell nicht unterstützt, bis es tatsächlich fast abgeschlossen ist.

Weitere Infos gibt es hier: https://github.com/cardano-community/guild-operators

Was ist der Unterschied zwischen cardano-db-sync-extended und cardano-db-sync ?

Was ist der Unterschied zwischen cardano-db-sync-extended und cardano-db-sync ?

Es ist in der obersten Ebene README.

@refi93 Bitte schließen Sie dies, wenn

@erikd Sind Sie sicher, dass das der richtige Befehl ist? Auch nach der Korrektur von " ca cardano-db-sync-extended" bekomme ich

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

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

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

Entschuldigung, fügen Sie nach cardano-db-sync-extended ein zusätzliches -- cardano-db-sync-extended (Anweisungen oben aktualisiert).

Die Kabale geht davon aus, dass Optionen für cardano-db-sync-extended Optionen für 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/

Gibt

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)

Irgendwelche Hinweise?

Zuerst apt install libsodium libsodium-dev .

Fügen Sie dann Folgendes zu cabal.project.local :

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

Dies wurde leider nicht dokumentiert, da dies noch nicht zur Veröffentlichung bereit ist.

@erikd Gemäß den Befehlen, die Sie zum Ausführen von cardano-node bereitgestellt haben, synchronisiert es nicht mehr und gibt diese Fehler aus:

[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"]

Wie können wir das beheben?

Erwarten Sie übrigens größere Änderungen im DB-Schema?

Es werden keine größeren Änderungen am Schema mehr erwartet, aber kleinere Änderungen sind immer noch wahrscheinlich.

Das Problem, das Sie sehen, ist ein Knotenproblem, kein db-sync-Problem. Dies ist höchstwahrscheinlich auf eine Nichtübereinstimmung zwischen der Knotenversion und der Netzwerkversion zurückzuführen. Dies ist noch eine Arbeit am Fortschritt. Es ändert sich immer noch ständig.

~Es werden keine größeren Schemaänderungen mehr erwartet~.

Mir ist gerade klar geworden, dass mindestens eine ganz neue Tabelle hinzugefügt werden muss.

@erikd Welche Tabelle wäre das?

Es muss ein Tisch vorhanden sein, in dem Belohnungen aus dem Hauptbuchstatus aufbewahrt werden, bevor sie abgehoben werden.

@erikd Gibt es einen Zweig, der mit 1.16.x des Cardano-Knotens kompatibel ist? Wenn ja, wie kann ich es starten?

Wir haben derzeit zu viele Testnetzwerke, zu viele Flugänderungen und Konfigurationen sind schwieriger als es sein sollte.

Es ist fast sicher, dass wir nicht etwas haben, das release/1.16.x schmerzlos unterstützt.

Wenn Sie sich jedoch die Konfiguration von node ansehen und dort Protocol: RealPBFT dann sollte master funktionieren. Wenn auf der anderen Seite Protocol: Cardano dann sollte der erikd/hfc-5 Zweig funktionieren, aber er wird beim ersten gefälschten Poolblock abgebrochen (weil ich darauf warte, damit ich #195 implementieren kann) .

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen