[$7,000] Alternative subql dictionary generation
Closed this issue · 4 comments
Prize Title
Alternative substrate-like chain dictionary generation
Prize Bounty
Total Grant Award: $7,000 USDC
Challenge Description
This is a typical dictionary project: https://explorer.subquery.network/subquery/subquery/polkadot-dictionary, which is generated from a subquery project: https://github.com/subquery/subql-dictionary.
The performance of generating a dictionary is becoming a challenge and a potential solution is to use another way (other than a normal subquery project) to generate a dictionary that shares the same DB schema and same result.
Submission Requirements
- Fork and extend substrate-archive to generate basic subql dictionary (events, extrinsics, spec_version) for polkadot
- The generated dictionary should use same db schema as original dictionary project so we can use
@subql/query
to provide GraphQL as before, populate same data and only index finalised blocks as a normal subql project does. - The speed of this dictionary generation should be faster than 50 bps.
Bonus
Depends on the achievements of following tasks, we will add bonus to the challenge.
- Make the solution be configured to work with moonbeam, moonriver and moonbase-alpha
- Generate evm subql dictionary (evm_logs, evm_transactions) for moonbeam
- Make substrate-archive able to accept json like type definition so archiving a new chain doesn't require source code changes and re-compiling.
Judging Criteria
- Functionality
- Understandability (ie documentation etc provided)
- Performance (measured by bps)
Winner Announcement Date
Within 1 wk from the closing date of the hackathon
Resources
DB Schema
create table events
(
id text not null primary key, -- {blockHeight-eventIdx}
module text not null, -- with index
event text not null, -- with index
block_height numeric not null -- with index
);
create table extrinsics
(
id text not null primary key, -- {blockHeight-extrinsicIdx}
tx_hash text not null, -- with index
module text not null, -- with index
call text not null, -- with index
block_height numeric not null, -- with index
success boolean not null,
is_signed boolean not null
);
create table spec_versions
(
id text not null primary key, -- {specVersion}
block_height numeric not null
);
create table evm_logs
(
id text not null primary key, -- {blockHeight-logIdx}
address text not null, -- with index
block_height numeric not null, -- with index
topics0 text not null, -- with index
topics1 text,
topics2 text,
topics3 text
);
create table evm_transactions
(
id text not null primary key, -- {blockHeight-txIdx}
tx_hash text not null, -- with index
"from" text not null, -- with index
"to" text not null, -- with index
func text, -- with index
block_height numeric not null, -- with index
success boolean not null
);
For support,
Please join our Discord channel #technical-support and #hackathon
Read our documentation at: https://doc.subquery.network/
Learn the basics of SubQuery with our Hero’s course (https://doc.subquery.network/academy/herocourse/)
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 7000.0 USDC (7000.0 USD @ $1.0/USDC) attached to it.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $9,287,781.13 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 1 week, 6 days ago.
Please review their action plans below:
1) singulart has started work.
Extend substrate-archive to provide alternative dictionary generator with better performance.
2) seeergo has started work.
I will come up with a scalable, performant solution to build chain archives
3) binsta has started work.
Alternative subql-node, subql-query for moonbeam & moonriver
4) unicornideas has started work.
This project will query rocksdb for blocks info and store it in the postgres database.
Learn more on the Gitcoin Issue Details page.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 7000.0 USDC (7000.0 USD @ $1.0/USDC) has been submitted by:
@seandotau please take a look at the submitted work:
- PR by @UnicornIdeas
- PR by @singulart
- PR by @SeeeRGo
- Learn more on the Gitcoin Issue Details page
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $5,409,704.60 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 7000.0 USDC (7000.00 USD @ $1.0/USDC) attached to this issue has been approved & issued to @singulart.
- Learn more on the Gitcoin Issue Details page
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $5,060,011.96 more funded OSS Work available on the Gitcoin Issue Explorer