Questions tagged [database]

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Does the graph-node re-sync all blocks every time it gets restarted?

I am running an EC2 instance with graph-node, using docker. Let's assume that I have a list of smart contracts that I want my subgraph to track and, at some point, that list gets updated; so I have to ...
0 votes
2 answers
21 views

indexing all Ethereum fullnode data in a relational database

I want to develop a web app like etherscan. I realized I have to extract and index all datas in a relational database. I have chosen Posturesql. All Datas I want to save are: block uncle transaction ...
  • 1
0 votes
0 answers
4 views

Blockchain Layer on top of a database for Query Processing

Is it possible to have a blockchain layer on top of a database? I have heard about bigchainDB doing exactly the same but I wanted to know if there lies any advantage in doing so?
0 votes
1 answer
17 views

Deploy of subgraph fails in Amazon EC2 Instance

I want to run graph-node (The Graph) in an Amazon EC2 Instance. I have setup everything with docker-compose and the 3 containers (graph-node, ipfs and postgres) are running smoothly. I have also setup ...
0 votes
0 answers
29 views

How to compare two values of structs of the same msg.sender from different mappings

I'm having a Smart Contract contest among friends about who loses the most weight. Each competitor is expected to enter its weight at the beginning of the week and at the end of the week. The ...
0 votes
0 answers
21 views

Best way to access ancient / freezer data in Javascript?

Trying to access freezer data using Node. Didn't find @ethereumjs support for reading freezer tables. I read this blog post giving an overview of the data structure, but I was wondering if there are ...
  • 113
0 votes
0 answers
71 views

Decoding chaindata stored on Geth's LevelDB using Python

I've been trying to read the transactions and block data directly from the LevelDB files (.ldb) stored within Geth's chaindata/ directory. To do so, I first tried to extract the keys stored on LevelDB ...
0 votes
1 answer
28 views

How can I get a large amount of Ethereum transactions in a database without running my own node? Does a database like this exist already?

I am doing research into Ethereum transactions and I simply need a database of 1000 transactions or just about 10 blocks worth of transactions. What is the easiest and fastest way to acquire this? Do ...
0 votes
0 answers
15 views

What is the best way to query all EOA addresses with positive balance but zero nonce

These addresses are probably addresses that have received ether by mistake and the ether is now unrecoverable, i would like to put together a list of all those addresses. Anyone know a good way of ...
  • 141
0 votes
0 answers
13 views

Patterns around building a fault-tolerant aggregator/indexer

We are trying to build an indexer/aggregator in the style of TheGraph. Using TheGraph directly is not feasible, since we need to merge blockchain data with offchain data in our datastores. The core ...
2 votes
1 answer
211 views

Optimizing Backend with a lot of Ethers.js Event listeners

I've been building an nft marketplace backend, on top of a manager contract that manages all the permissioned nft collections. The idea is that, manager can create erc721 or erc1155 contracts via this ...
  • 23
0 votes
0 answers
15 views

What is the process through which transactions and transaction receipts are found on a Ethereum database

Transactions and transaction receipts are constructed into Merkle Patricia Tries using the rlp encoded index with which they appear in a block. Once all tx information is rlp & hex prefix encoded ...
4 votes
1 answer
744 views

geth error - Fatal: Database has receipts with a legacy format

I'm following this tutorial for testing an ethereum private blockchain using 3 nodes. Everything works fine but if I stop the nodes I can't restart them using the same command. Each node was running ...
  • 43
0 votes
0 answers
36 views

How to fetch on-chain data of major tokens to create a dashboard app

I'm thinking of creating a simple dashboard app to show summaries of ~100 major ERC20 tokens. Similar examples are: https://etherscan.io/tokens https://cryptofees.info/ In this case, what is the ...
0 votes
1 answer
68 views

How to automate tokenomics research and data collection?

I want to create a tokenomics database. I want to build a bot to automate data collection that answers for each token on the blockchain some of the questions asked and answered in this article. I am a ...
  • 201
0 votes
1 answer
34 views

What Database (or maybe the whole stack) should I use for a webapp?

I am thinking of making a webapp where I have to save some private data and other data that could be public. For simplicity let's say it's a quizzes page but it logs in with Metamask. We are going to ...
0 votes
1 answer
184 views

Can use smart contract as a CURD database?

I am a full stack enginer. I am going to develop a decentralized social app. Fully not have backend. My choises: Frontend: react or vue. Big content storage: arweave. Cheaper and faster chain: ...
  • 3
0 votes
1 answer
173 views

How to add databases to smart contract?

I creating dApp and I want to add some sort of registration pannel(add nickname to wallet address) and its nessesary to store this data on db (public wallet address, nickname, email(optionally)). So ...
  • 1
0 votes
1 answer
232 views

Fetching data from smart contract to show on front end

So right now i have a function in my smart contract that is able to fetch all open listings(nft marketplace). It looks like this: function fetchListings() external view returns (Listing[] memory) { ...
  • 26
1 vote
1 answer
216 views

What Is The Best Way To Retrieve All Transactions of a Certain Token?

I am currently trying to better understand purchasing trends of certain NFTs (ERC-721). Currently, I am doing this using EtherScan's API. Now, the API calls return "up to a maximum of the last ...
0 votes
1 answer
64 views

How does an NFT marketplace give a verified badge?

I am trying to build an NFT marketplace. I see that Opensea provides a verifiable account badge. Here is the link for documentation I wonder how Opensea uniquely identifies the user if it is qualified ...
  • 1,330
1 vote
2 answers
350 views

How to interact between DB and smart contract?

I want to create a smart contract and when I transfer coin on it, it's automatically update on the DataBase (I use Cassandra), so you do your things on the website with it and you can win or loose ...
0 votes
1 answer
1k views

Database column type (postgres) for storing erc20 token balances the correct way

I have an app that is pulling all erc20 tokens for each address. Now I want to store these values already calculated to the right amount into my postgres db. Right now, I am using the column type of ...
0 votes
0 answers
41 views

How could I have a custom, stored in database currency be a requirement to call a smart contract function for my NFT Game?

Im currently developing an NFT Game, where our idea is to have a custom currency that is stored in the database and serves to buy some items(stored in database aswell), and to breed the NFTs, how can ...
0 votes
0 answers
50 views

Storage systems for massive quantities of data

I'm creating a decentralized social media protocol and have begun trying to figure out the right data storage scheme. It feels like storing directly on chain would prove costly, inefficient, and ...
  • 21
0 votes
2 answers
71 views

Backend for DApp

I'm developing a DApp, and I need some logic to handle events. This shouldn't be done in the Frontend of the application, right? So what would a good approach look like. I thought about a Java-Backend ...
  • 51
1 vote
1 answer
203 views

How to securely decrypt game data inside smart contract

I have a problem I haven't been able to figure out, as follows: Suppose I have a game running on the blockchain (a solidity/smart contract game) where there are a limited number of plots of land that ...
  • 247
3 votes
0 answers
351 views

How should a dapp store & query user profile data?

We are currently working on a dApp that will store user profile data and let its users query them. We haven't been able to figure out how to do that efficiently so far, and therefore we need to ask ...
0 votes
2 answers
514 views

Physical location of Ethereum World State Trie

First of all, allow me to admit to a mistake I made on the other sites like this one, when I asked almost the same question. I feel it is ethical to explain this. I mistakenly asked this question on ...
0 votes
0 answers
88 views

Index and Search Archive node database for method hash

I want to find similar method hashes, either from contract bytecode or transaction hashes (which in theory are the same because the contract bytecode comes from a contract creation transaction) I have ...
  • 147
0 votes
0 answers
155 views

NULL value returned when trying to fetch data from solidity smart contract from react js

I'm trying to make a Student Management System using Ethereum blockchain. I've linked my smart contract (solidity) with react frontend. I try to get the setted value from the smart contract, but this ...
  • 1
0 votes
0 answers
32 views

How to store private data on blockchain application using a database?

I'm doing a project on healthcare data management Dapp. My project contains the actors as the doctor, patient and hospital. Actors have the attributes them self like name, id, age, hospital ...
1 vote
0 answers
17 views

Verification system for vaccination, medicine [closed]

Project Idea, Need Guidance. Verification system for vaccination. Vaccination confirmation per individual, multiple times, different locations. Can also be used for ticketing, voucher confirmation, ...
8 votes
2 answers
1k views

Is it worth to store Ether at the full precision in database?

Ether has precision of 10^18 which makes it impossible to use BIGINT type in database to store values in weis: DECIMAL type should be used instead. Is it worth to store values in Gwei to stay with ...
1 vote
2 answers
151 views

Better Platform to store data out of ethereum blockchain

What can be the better alternative for someone who is willing to store data off-chain? What smart-contract suppose to do is just sign a transaction and perform, while every piece of information needs ...
  • 379
0 votes
1 answer
47 views

Ethereum Smartcontracts with YottaChain

I am very much curious about this new storage system YottaChain. Can someone point me good articles/videos/sources as a reference to go through and understand its implementation with ethereum smart-...
  • 379
2 votes
1 answer
548 views

What is the best way to store data/information while writing smartcontract?

Smart contracts are immutable. Unless we're 100% sure that our smart-contract is fully functional without any exception we never want to push that in the main net. That's why we have public test net. ...
  • 379
0 votes
2 answers
143 views

Data validation using Ethereum

I'm pretty new to the BC and specifically Ethereum world and I'm just starting to scratch the surface of the potential applications of this powerful technology. As I'm approaching to build my first ...
1 vote
2 answers
125 views

Store encrypted data on-chain VS on cloud

So, I am currently doing research for a project and an interesting question was born. If I have data that I want to store encrypted, why to choose blockchain instead of a cloud provider? Since the ...
  • 35
2 votes
1 answer
306 views

What is the difference between IPDB and Blockchain Databases?

I wanted to know what are the differences between IPFS, interplanetary file system and a block chain database like IPDB and BigChainDB
1 vote
2 answers
2k views

Accessing database in solidity

I am developing a voting application using blockchain (ganache). So basically i am registering the candidates by a web form and storing the data in phpmyadmin database. Now i want to access this data ...
1 vote
1 answer
37 views

Smart contract DB

Is it a good practice to create a smart contract to serve as a DB table? For example, lets say that I have users that need to create Operations. My operations objects need to contain id, description,...
0 votes
1 answer
127 views

How data is stored in Ethereum blockchain?

If I become a full node in Ethereum and retrieve the current state, how all this data is going to be stored in my physical drive?
  • 35
0 votes
1 answer
129 views

Saving huge volumes of data in Ethereum

I would like to save daily prices of about 3000 items (about 2mb in size) on a public blockchain, and I would like to create a DAPP to retrieve the data. I am considering saving the data on Ethereum. ...
  • 1
3 votes
1 answer
522 views

How can a smart contract store mutable data outside blockchain?

As storing persistent data on blockchain is costly due to the storage operation being gas-expensive, what are the solutions to store mutable data outside the realm of blockchain from within a smart ...
  • 201
0 votes
1 answer
164 views

Is there any chance to retrieve data on a database(sql) to a smart contract [duplicate]

I want to write a smart contract that gets id numbers as inputs and then retrieve data that are recorded in a database.Is there any specific database for that process.
0 votes
1 answer
368 views

Storing transactions result into database

I need to store the transaction details to my database. And here is my code: var rawTx = { nonce: nonce, gas: estimate_gas, to: contract_add, value: '0x0', ...
1 vote
2 answers
245 views

What happens if you modify the blockchain database out of band?

I understand that the data in a blockchain is stored in a database. E.g., this post states that Ethereum uses LevelDb or RocksDb. I expect that normally the only access to this database is through ...
  • 135
2 votes
3 answers
864 views

Decentralized database for ethereum?

I'm looking for a way to store data in a decentralized way such that I can access any record from within the smart contract, probably through oracles I guess? I've been looking into gundb but not ...
  • 75
0 votes
1 answer
179 views

Is there an indexed database for ERC20 allowances?

For instance, I'd like to make the following query: Return all the addresses that have approved spender x on a particular token It seems that I can only query for a specific (address, spender) ...