I hereby claim:
- I am pradyuman-verma on github.
- I am pradyumnverma (https://keybase.io/pradyumnverma) on keybase.
- I have a public key whose fingerprint is 8682 ED6D C499 D155 9962 FA04 5FF1 5662 0D5B 1E14
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
The following blog summarises my work in bcoin as a part of Summer of Bitcoin 2021.
I am thankful to my mentor Matthew Zipkin, for being incredibly supportive throughout this journey. And kudos to all my peers for being this amazing.
Bcoin
is an alternative implementation of Bitcoin protocol built with Javascript. A full node can be used for full blockchain validation and is aware of all known consensus rules. It is easier to use, faster to learn, and more well-documented than competing implementations.
My ten-week summer internship work with bcoin helped increase test coverage in its test library and implement bech32m address encoding format to make bcoin taproot ready and also involved reviewing pull requests and issues.
This gist will explain how you can use the dsa-connect Flashloan feature.
I will be using this code.
/**
This code is from the Instadapp terminal, so there is no need to import node modules.
*/
// Connect your metamask account. It will be rendered as USER_ADDRESS
Let's say contributor
has submitted a pull request to your (author
) project (repo
). They have made changes on their
branch feature
and have proposed to merge this into origin/master
, where
origin -> https://github.com/author/repo.git
Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called
In this article, we will walk through "how to install and run a full node of Bitcoin using Bcoin."
We will create a wallet, send some coins and mine some blocks in regtest mode. So, let's start.
The Bitcoin blockchain is designed as a decentralised P2P network where nobody owns or controls Bitcoin, and everyone can participate. A full node is a program that fully validates transactions and blocks. By running a Bitcoin full node, you are supporting the Bitcoin network to become more decentralised and fostering the growth of Bitcoin.
In the previous blog, we are done with setting up our bcoin
node in regtest
mode.
In this blog, we will try to play more in this regtest
mode and try performing chain reorganisation, and Double-spent attacks.
So, the first question that arises is what the regtest
mode is?
Bitcoin Core provides testing tools designed to let developers test their applications with reduced risks and limitations. One of the modes is the regtest
.
Regtest
(regression test) mode creates a local private blockchain where you can adjust the parameters to what you want. You usually use this when it is not needed to communicate with other peers and blocks.
An example of what you can do with the parameters is created blocks instantly, and you have complete control over the environment.
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.0; | |
interface ListInterface { | |
function accountID(address) external returns (uint64); | |
} | |
contract InstaEventManager { | |
ListInterface internal immutable instalist; |
[ | |
{ | |
"market": "0xc3d688B66703497DAA19211EEdff47f25384cdc3", | |
"marketName": "USDC", | |
"key": "usdc", | |
"totalSupplyInBase": "77.497297179140780653", | |
"totalBorrowInBase": "0", | |
"totalSupplyInUsd": "77.497297179140780653", | |
"totalBorrowInUsd": "0", | |
"netBaseBalance": "0", |
[ | |
{ | |
"market": "0xc3d688B66703497DAA19211EEdff47f25384cdc3", | |
"marketName": "USDC", | |
"key": "usdc", | |
"baseToken": { | |
"key": "usdc", | |
"type": "token", | |
"symbol": "USDC", | |
"name": "USD Coin", |
// SPDX-License-Identifier: WTF | |
pragma solidity ^0.8.0; | |
interface IERC20 { | |
function balanceOf(address account) external view returns (uint256); | |
function transfer(address to, uint256 amount) external returns (bool); | |
function allowance(address owner, address spender) | |
external |