Global Feed Post Login
Replying to Avatar n3xB | Global Bitcoin Exchange Protocol on Nostr

Coded with GPT-4 and asked it to do PSBT with BDK in Rust. Its not perfect. But I ask it to fix things I see incorrect and it understood context and keep digging more into the BDK doc for solutions on its own. Mind is blown.

For example at first it called a method that didn’t exist. I told it that and it fixed it. Then I asked it I want the input amount and output amount to be different since it’s ‘partial’. It done that by just looping through UTXOs in the wallet until it reaches the desired input amount.

I asked if there’s something in the BDK that helps with coin selection. And it found the CoinSelection trait and updated the code to use ‘BranchAndBound’

I still haven’t tried to run it yet. But even if I treat this a pseudo code it’d still be amazing

Avatar
n3xB | Global Bitcoin Exchange Protocol on Nostr 2y ago

I want to take everything above back. Whats generated by GPT-4 is actually pretty rubbish. It gave me some ideas. But most of it is wrong. It basically just made up non-existing functions and modules. Partly because BDK interfaces have changed drastically since GPT-4 trained its data set. Partly because lying confidently is what GPTs does all the time.

This is similar for Github Co-Pilot.

Reply to this note

Please Login to reply.

Discussion

No replies yet.