Giter Club home page Giter Club logo

bluefin's People

Contributors

agaffney avatar dependabot[bot] avatar verbotenj avatar wolf31o2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bluefin's Issues

bluefin seems to store incorrect UTxOs for use as inputs

It seems to have gotten into a weird state in preview where it's trying to use a UTxO from another wallet as an input on a new TX. The other wallet was also mining TUNA, but the UTxO seems to be from a subsequent TX on that wallet unrelated to TUNA mining.

{"level":"error","timestamp":"2024-04-30T17:03:44-05:00","caller":"miner/worker.go:81","msg":"failed to submit TX: failed to submit TX to API: http://tc2:6090/api/submit/tx: 400: \"transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (AlonzoInBabbageUtxowPredFailure (ExtraRedeemers [RdmrPtr Spend 0])),UtxowFailure (UtxoFailure (AlonzoInBabbageUtxoPredFailure (UtxosFailure (CollectErrors [BadTranslation (TranslationLogicMissingInput (TxIn (TxId {unTxId = SafeHash \\\"086459182edc0a2fe54e40f9560a4f99821265e386bab263902f3e874c95204f\\\"}) (TxIx 0)))])))),UtxowFailure (UtxoFailure (AlonzoInBabbageUtxoPredFailure (ValueNotConservedUTxO (MaryValue 87325173 (MultiAsset (fromList [(PolicyID {policyID = ScriptHash \\\"502fbfbdafc7ddada9c335bd1440781e5445d08bada77dc2032866a6\\\"},fromList [(\\\"54554e41\\\",585000000000)])]))) (MaryValue 94040153 (MultiAsset (fromList [(PolicyID {policyID = ScriptHash \\\"502fbfbdafc7ddada9c335bd1440781e5445d08bada77dc2032866a6\\\"},fromList [(\\\"54554e41\\\",585000000000),(\\\"6c6f72642074756e61\\\",1)])])))))),UtxowFailure (UtxoFailure (AlonzoInBabbageUtxoPredFailure (BadInputsUTxO (fromList [TxIn (TxId {unTxId = SafeHash \\\"086459182edc0a2fe54e40f9560a4f99821265e386bab263902f3e874c95204f\\\"}) (TxIx 0)]))))])\"","stacktrace":"github.com/blinklabs-io/bluefin/internal/miner.(*Manager).Start.func1\n\t/home/agaffney/dev/blinklabs-io/bluefin/internal/miner/worker.go:81"}

The UTxO that it's complaining about comes from this transaction:

https://preview.cexplorer.io/tx/086459182edc0a2fe54e40f9560a4f99821265e386bab263902f3e874c95204f

And the TXs for that address:

https://preview.cexplorer.io/address/addr_test1qpsh97c3spdxmrksyzkl3xlz9c9qyaklqay73fr7wye5yhdn5favrq4uqajcpvqvxc9emhew0cpcgjnayhzw2fwa8m2q9n2p0a/tx#data

io/fs: malformed module path "io/fs": missing dot in first path element

on Ubuntu 22.04.3 LTS:

~/bluefin$ make
# Needed to fetch new dependencies and add them to go.mod
...
go mod tidy
github.com/blinklabs-io/bluefin/internal/logging imports
        go.uber.org/zap tested by
        go.uber.org/zap.test imports
        io/fs: malformed module path "io/fs": missing dot in first path element
make: *** [Makefile:23: mod-tidy] Error 1

Support for hard-fork contract

There's a TUNAv2 contract with some changes. We want to be able to support both.

I've looked through the TUNA hard-fork contract, and I've noticed a few differences:

  • the TargetState object (used by the miner internally) has its fields reordered and a new miner bytestring field added
  • the miner bytestring is a blake2b hash of either a public key hash or a NFT (for mining pools, I think)
  • if using a PKH for the miner field, the contract will verify that it matches one of the signers on the transaction
  • the on-chain datum fields have been reordered to put extra (message) last instead of before the interlink

It's harder to determine what changes we'll need in the TX building (extra redeemers or whatever) from looking at the smart contract, so we may need to wait until Fortuna is updated to see what's needed

Create a HOWTO

Create a HOWTO which walks the user through setup and maintenance. This includes anything necessary in the wallet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.