MENU

Monthly Active Developers in Crypto

February 6, 2023
0
3112
0
A neat report on the state of developer activity in the crypto ecosystem. https://www.developerreport.com/developer-report
Read More ›

Decentralisation is Bigger than Bitcoin

February 6, 2023
0
3132
0
This article was written in Feb 2022. Just reposting here. With Australia’s largest bank offering crypto trading in their mobile app and CBDC gaining interest, is there something more ominous on the horizon knocking on the doors of the decentralised token economy?  The introduction of Bitcoin in 2008 brought the concept of decentralisation back into the spotlight. Decentralised peer to peer technology has existed in many forms prior to Bitcoin with Napster, Gnutella and Bittorrent to name a few. But not only is decentralised technology back, it is flourishing in this new blockchain based token economy and this is important because the war between centralisation and decentralisation is reigniting.  In the early days, banks dismissed Bitcoin technology as a small bunch of enthusiastic, geeky, hobbyists thinking that they could change the world. Very certain it was going to be a fad, the banks ignored us. When it grew to the size of an ant, gnawing at the toenails of the elephant banks, the elephant stomped all over us closing bank accounts often with little reason and little warning.  Then it grew big enough not only to catch more attention from the banks, but believe it or not, some banks started […]
Read More ›

Btree_gist extension is required

January 22, 2023
0
4102
0
If you have come across this error then you’ll have to run the following command: But where do you run this? This is a SQL command so you need to run it within postgres. First log in. Note, you might have to create a user with the following command first. Then when you run the SQL command, you should see this:
Read More ›

Some differences between Crust v Filecoin

January 8, 2023
0
5550
0
Crust is a project in Polkadot. Crust Filecoin Proof of Storage Crust node supports the Trusted Execution Environment (TEE) technology. Therefore, it checks the files locally on the node and periodically generates a workload report signed by the TEE. Crust’s local inspection method does not need to introduce the complex zero-knowledge proof, which reduces computational costs and lowers thresholds. Each node periodically provides proof to the network via a zero-knowledge proof based on the file it stores. Proof of Storage Crust’s workload report is much smaller, which decreases the occupation of network resources. Periodic report generated by zero-knowledge proof is more resource intensive Incentive mechanisms Based on the storage space or capability provided and the collateral obtained by the node (Staking). Crust’s incentive for storage nodes is independent of the storage market, which is conducive to the growth of storage resources during the cold start period. Based on the number of storage orders accepted by the node Consensus of producing blocks Based on GPoS, a PoS consensus where storage resources are used as Guaranteed quota. Uses an EC (Expected Consensus) algorithm based on VRF (Verifiable Random Function) and VDF (Verifiable Delay Function) Support for computing Trusted resource monitoring module, in […]
Read More ›

How to verify PGP digital signatures?

September 7, 2022
0
8627
0
A neat video on the basics of verifying a PGP digital signature using GnuPG on macOS. Relevant for instance if you have a bitcoin donation address on your website and your website gets hacked and the bitcoin donation address is swapped out for the hacker’s bitcoin address.
Read More ›

How to join a shared wallet in Bitpay?

August 6, 2022
0
9303
0
Note: In version 14.5.1 of Bitpay’s crypto wallet, screenshots can no longer be taken. (This may have been in place for earlier versions). This means providing directions on how to perform certain functions becomes a bit more difficult to do. How to join a shared wallet? Select “Create, import or join a shared wallet” from the home screen of Bitpay. To get to the home screen, click on the house icon at the bottom menu bar. This will provide 3 further options. New Key, Import Key or Multisig Wallet. Select Multisig Wallet and choose “Join a shared wallet”. Then provide your name and your wallet invitation and click join.
Read More ›

CRC

February 20, 2022
0
11941
0
Completed my Chainalysis Reactor Certification.
Read More ›

CCFC

January 22, 2022
0
11612
0
Got my Chainalysis Cryptocurrency Fundamentals Certification today. It was a well written exam and covered a lot of the basic fundamentals of cryptocurrencies. Highly recommend it.
Read More ›

Blockchain word cloud references

August 5, 2021
0
14542
0
BlockchainsBitcoinAltcoinsLitecoinEthereumCryptocurrenciesPrivacy_coins MiningDifficultyPoolsAntminmerGPUsASIC10_mins CryptographyPublic/Private_keysRSASHA256Hash_FunctionsDigital_SignaturesKECCAK256 ISO/TC_307WG1_FoundationsWG2_Security,privacy&identity WG3_Smart_contracts&_their_applicationsWG5_GovernanceWG6_Use_casesSG_7_Interoperability_of_blockchains TokensTokenomicsInflationBonding_curvesStablecoinsDAOICOIEOTGETGOFungibilityNFT
Read More ›

Debugging SubQuery project with debugger

July 25, 2021
0
14712
0
To debug a SubQuery project, the –inspect flag of the node command needs to be used. The command is: Eg: This enables the node inspector. Note the small difference between –inspect and –inspect-brk. Then open up the Developer Tools in Chrome and you should see a green icon appear. Clicking on the green icon will open up the DevTools. From here, navigate to the “Filesystem” and add your project folder to the workspace. Then you can add breakpoints and step through your code just like any regular debugger.
Read More ›

How to list all transactions for a given address in SubQuery

July 21, 2021
0
14705
0
Introduction What we will do here is to write a query to list all the transaction for a given Polkadot address as seen in the screenshot below. Pre-requisites Have gone through the SubQuery Hello World exercise. This ensures your environment has all the required applications. Step 1: Run subql init This will set up the scaffolding making everything a lot easier. Step 2: Create a schema The first step is to create your schema file which “defines the shape of your data”. Here we will define 2 entities or objects, Account and Transfer. Step 3: Update the manifest file In the manifest file, we want to create a handler called handleTransfer (to be written next). This is a standard substrate/Eventhandler and we will filter on the balances module. The filter is optional but recommended as they significantly reduce the amount of data processed by your SubQuery project and will improve indexing performance. Step 4: Writing the mappings This is perhaps the most challenging part for those still learning SubQuery and Polkdadot. What the code below does is create a helper function called “ensureAccounts” and a handleTransfer EventHandler function to grab the transferred amount along with the to and from Id. […]
Read More ›

A chat with Alex Sims

July 16, 2021
0
15611
0
Here I catch up with Alex Sims, an Associate Professor in the Department of Commercial Law and a Research Fellow at the UCL Centre for Blockchain Technologies. She teaches a wide range of commercial law subjects. Her primary areas of research and publication are on blockchain technology, in particular, DAOs (decentralised autonomous organisations), the regulation of cryptocurrencies and legal issues surrounding smart contracts. It was great to get some insights into her research and understand more about DAOs, NFTs and lots of other interesting facts along the way.
Read More ›

How to check your SubQuery node health?

July 13, 2021
1
14071
0
There are two URL resources available to check your SubQuery node health. They are: These commands are for Indexers running their own nodes and looking to get some base node stats. /meta To access node metadata endpoint, add /meta to the end of your SubQuery node url. For example: This provides the following information: /health The health endpoint can be accessed via: A healthy node will return a blank page which can be a little confusing. It actually returns an HTTP status of 200 OK so this should be used to determine if it is healthy or not. If the node is not healthy, it will return a 500 status code. Typically you will see this when the node is starting up. 404 You will receive a 404 if the resource URL is incorrect.
Read More ›

How does the Subquery dictionary work?

July 2, 2021
0
14867
0
To understand what the SubQuery dictionary is and how it works, it is important to understand what SubQuery is and how it works. If you already have an understanding, feel free to skip this step. What is SubQuery? SubQuery is a project that provides an SDK for developers to easily extract data from Substrate blockchains. For example, if you wanted to know how many accounts have made over 200 transactions or the total amount staked for a particular address, or anything else you care to wonder, you can do this easily and quickly with SubQuery. Traditionally, you would have to create a node either locally or on a hosted infrastructure, then wait for it to synchronise and then code up your query asking for the data you need. With about 130GB of unstructured data and over almost 6 million blocks this could take days to synchronise. What SubQuery does is fetch every block through the Polkadot API and places it in a buffer for later processing. The indexer (aka node) then takes the block out from the buffer, and while extracting the block data, checks whether the events and extrinsics (aka transactions) within the block matches the user-defined filter. As you […]
Read More ›

Subql-node flag definitions

June 29, 2021
0
15144
0
Sometimes the help within the command line can be a bit confusing as you can see below. Here I will explain what the various flags mean and also provide examples. Flags –version -f, –subquery This flag is the most important because it actually starts the subquery node. –subquery-name TBA This flag is very interesting. When used it creates a seperate schema and starts the block synchronising from zero. It is almost creating another “instance” of your project. Will create 3 schemas as shown below. -c, –config This flag will read the various configurations explained here from a file. Create a yaml file with the following: Name the file subquery_config.yml (the name does not matter). Place the file in the same directory as the project. The . means “the current directory”. Then with terminal in the project directory, run: –local This flag is primarily used for debugging purposes where it creates the default starter_entity table in the default “postgres” schema. Note that once you use this flag, removing it won’t mean that it will point to another database. To repoint to another database you will have to create a NEW database and change the env settings to this new database. In […]
Read More ›

How to run a SubQuery Indexer?

June 26, 2021
0
15269
0
At first, it may sound confusing but running an indexer is synonymous to running a node which will “index” the blockchain and store the data in a database. To be more precise, the @subql/node implementation will extract substrate-based blockchain data (aka on the PolkaDot network) and save it into a Postgres database. Currently you don’t “join” a network. You create a SubQuery project and “run” it. Postgres The first thing you will need to do is to install Postgres. Visit https://www.postgresql.org/download/ and install version 12 or higher. SubQuery node To install the SubQuery node application, run The -g flag means to install it globally which means on OSX, the location will be /usr/local/lib/node_modules Once installed, check out the possible flags with the help command. #Connecting to a database Use the export command to set the environment variables as shown below. Typing “env” should list your current environment variables and note that these variables are only set temporarily. In other words, they are only valid for the duration that the terminal window is open for. You can make it more permanent by creating these in your ./bash_profile. Starting a project To start a project, use the -f flag. For example, Postgres […]
Read More ›

Some SubQuery How to’s…

June 21, 2021
0
15635
0
How to start at a different block height? TL;DR To start a SubQuery node synchronising from a non-zero height, all you have to do is to modify your project.yaml file and change the startBlock key. For example: Why NOT start from zero? The main reason is that it can take a long time synchronising the entire Polkadot mainnet blockchain. Picking a start block such as 500,000 or 1,000,000 allows you to synchronise with the network faster. The other reason is that if you know that you are only interested in say all transactions in the last 30 days, you can figure out the block height 30 days ago and start synchronising from there. What are the drawbacks of not starting from zero? The most obvious drawback will be that you won’t be able to query for data on the blockchain for blocks that you don’t have. How to figure out the current block height? Visit https://polkascan.io/ and pick your network. It will most probably be: https://polkascan.io/polkadot. You’ll then see the block height under “Finalised Block”. Why is it not working? The most common problem that you will encounter is that you did not delete your .data hidden folder. If this […]
Read More ›

How to strip down a SubQuery starter project to its minimum

June 15, 2021
0
15362
0
The SubQuery starter project is great way to get up and running very quickly. One drawback however is that it labels its field as “field1, field 2” etc and that it attempts to demonstrate the 3 types of mapping functions, namely block handlers, event handlers and call handers all in one go. This isn’t a bad thing but it can be slightly overwhelming for a beginner. Here, we’ll strip everything down to its bare minimum. TL;DR Delete all the field variables leaving field 1, but rename field1 to blockHeight Remove the handleEvent and handleCall from the mappingHandlers.ts to leave only handleBlock. Update the project.yaml file to remove the unnecessary mapping handlers (linked to #2). Pre-requisite Start by running the standard init command: If you are not sure what the above means, check out this. Step 1: Modify the variables Change the schema.graph from: to We are a) giving the variable a meaningful name and b) simplifying by removing what is not necessary. Step 2: Just keep handleBlock In the mappingHandler.ts file of the default starter project, delete the handleEvent and the handleCall function. We’ll look at these later on. This is what the file should look like. Step 3: Update […]
Read More ›

How to turn on logging in SubQuery?

May 31, 2021
0
15437
0
In SubQuery, you can log messages on 3 different levels. They are: For example, adding “logger.info(“info test”) results in: The same can be done with warnings. However, to add a debug log, an extra modification needs to be made. The docker-compose.yaml file needs to have an additional –log-level=debug command passed to it. Here is a screenshot of the docker-compose.yaml file from the Hello World starter project. Also don’t forget to regenerate and build the code first via: and then running:
Read More ›

Hosting a Subql project in less than 5 mins

May 27, 2021
0
15749
0
SubQuery provides a very convenient service where you can host your projects for free and the best part about it is that you can get it up and running in less than 5 minutes. Pre-requisites You will have wanted to have gone through the Part 1: Subql Hello World in less than 5 mins tutorial first because tutorial is exactly the same except for the last step. Instead of running the query in Docker, we will run it in SubQuery. You will also need a GitHub account and have pushed your code to a repository. This is because SubQuery will read your code from GitHub. Set up GitHub Log into your GitHub account and create a repository by clicking on “new” in the repository tab. Provide a repo name and choose your visibility and initialisation preference. I’ve left everything as the default for now. Then hit “Create repository”. Once you have this repository, we’ll create our template starter project and push it to this repo. Create your project Next, let’s create a starter project template with the following command: You don’t have to make the project name the same as the repository name but I find that it helps. Then […]
Read More ›