GithubHelp home page GithubHelp logo

110codingp / bpd-week-1-assignment-110codingp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitshala-classrooms/bpd-week-1-assignment

0.0 0.0 0.0 45 KB

Shell 16.37% JavaScript 0.93% Python 15.37% Rust 31.04% TypeScript 36.30%

bpd-week-1-assignment-110codingp's Introduction

Bitcoin Protocol Development - Week 1: Interacting with a Bitcoin Node

Overview

This week, you'll learn how to use Bitcoin Core's RPC to interact with a running Bitcoin node. The tasks involve connecting to a Bitcoin Core RPC daemon, creating, and broadcasting a transaction. You'll need a Bitcoin node running in regtest mode on your local machine to test your solution. You can use bash, javascript, python, or rust for your implementation.

A docker-compose file is provided to help you launch a Bitcoin node in regtest mode locally.

You can also use the bitcoin.conf file to start a local regtest node without docker.

Objective

Successfully send a Payment + OP_Return Transaction.

Your tasks are to:

  • Connect to a Bitcoin node in regtest mode using RPC.
  • Create and load a wallet named “testwallet.”
  • Generate an address from the wallet.
  • Mine blocks to that address.
  • Send 100 BTC to a provided address.
  • Include a second output with an OP_RETURN message: “We are all Satoshi!!”
  • Set the fee rate to 21 sats/vB.
  • Output the transaction ID (txid) to an out.txt file.

Place your solution in the appropriate directory based on your chosen language:

Requirements

Input

Create a transaction with the following outputs:

  • Output 1:
    • Address: bcrt1qq2yshcmzdlznnpxx258xswqlmqcxjs4dssfxt2
    • Amount: 100 BTC
  • Output 2:
    • Data: "We are all Satoshi!!" (This should be an OP_RETURN output with the binary encoding of the string.)

Output

After creating and broadcasting the transaction, save the txid to out.txt.

Execution

To test your solution locally:

  • Uncomment the line corresponding to your language in run.sh.
  • Execute test.sh.

If your code works, you will see the test completed successfully.

Evaluation Criteria

Your submission will be evaluated based on:

  • Autograder: Your code must pass the autograder test script.
  • Explainer Comments: Include comments explaining each step of your code.
  • Code Quality: Your code should be well-organized, commented, and adhere to best practices.

Plagiarism Policy

Our plagiarism detection checker thoroughly identifies any instances of copying or cheating. Participants are required to publish their solutions in the designated repository, which is private and accessible only to the individual and the administrator. Solutions should not be shared publicly or with peers. In case of plagiarism, both parties involved will be directly disqualified to maintain fairness and integrity.

AI Usage Disclaimer

You may use AI tools like ChatGPT to gather information and explore alternative approaches, but avoid relying solely on AI for complete solutions. Verify and validate any insights obtained and maintain a balance between AI assistance and independent problem-solving.

Why These Restrictions?

These rules are designed to enhance your understanding of the technical aspects of Bitcoin. By completing this assignment, you gain practical experience with the technology that secures and maintains the trustlessness of Bitcoin. This challenge not only tests your ability to develop functional Bitcoin applications but also encourages deep engagement with the core elements of Bitcoin technology.

bpd-week-1-assignment-110codingp's People

Contributors

rajarshimaitra avatar theanmolsharma avatar

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.