Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new blocks subscriber and submit data to kafka #34

Merged

Conversation

DNK90
Copy link
Contributor

@DNK90 DNK90 commented Oct 12, 2021

No description provided.

@DNK90 DNK90 changed the base branch from v2.2.1-archive to master November 4, 2021 07:21
eth/downloader/downloader.go Outdated Show resolved Hide resolved
docker/chainnode/Dockerfile Outdated Show resolved Hide resolved
docker/chainnode/entrypoint.sh Outdated Show resolved Hide resolved
docker/chainnode/entrypoint.sh Show resolved Hide resolved
Copy link
Contributor

@ducthotran2010 ducthotran2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node logs from this PR, please delete unnecessary logs:

Forcing update chain config.
Using account 8209b2f9f5ea2c09a75ba90e8206385488849470
checking subscriber= kafka_url=
dump: 8209b2f9f5ea2c09a75ba90e8206385488849470 enode://a166ab6437cf370bc604097529a0fb6a8a4836bb85833fbf588b130cb73fe0517940d10c5d89c0e3e1c2800a774ac1ae2108d62cb4608556e41bc1fc4482241a@10.3.0.18:30303
params:  --rpc.allow-unprotected-txs --http.api eth,web3,personal,txpool --networkid 2020 --unlock 8209b2f9f5ea2c09a75ba90e8206385488849470 --bootnodes enode://a166ab6437cf370bc604097529a0fb6a8a4836bb85833fbf588b130cb73fe0517940d10c5d89c0e3e1c2800a774ac1ae2108d62cb4608556e41bc1fc4482241a@10.3.0.18:30303 --ethstats vm-rpc-skymavis-8:xQj2MZPaN6@stats.roninchain.com:443 --miner.gasprice 0 --keystore /ronin/keystore --password /ronin/keystore/password --mine
+ echo 'params:  --rpc.allow-unprotected-txs --http.api eth,web3,personal,txpool --networkid 2020 --unlock 8209b2f9f5ea2c09a75ba90e8206385488849470 --bootnodes enode://a166ab6437cf370bc604097529a0fb6a8a4836bb85833fbf588b130cb73fe0517940d10c5d89c0e3e1c2800a774ac1ae2108d62cb4608556e41bc1fc4482241a@10.3.0.18:30303 --ethstats vm-rpc-skymavis-8:xQj2MZPaN6@stats.roninchain.com:443 --miner.gasprice 0 --keystore /ronin/keystore --password /ronin/keystore/password --mine'

docker/chainnode/docker-compose.yaml Show resolved Hide resolved
@ducthotran2010 ducthotran2010 merged commit b6e4e30 into axieinfinity:master Nov 10, 2021
@DNK90 DNK90 deleted the feature/chain_head_event_subscriptions branch December 2, 2021 10:20
DNK90 added a commit that referenced this pull request Dec 10, 2021
* Implement new blocks subscriber and submit data to kafka

* Fix job is added to job queue continuously

* Add SCRAM-SHA-256 authentication type and update description of authentication flag

* Continue the loop in worker when job reaches its maxTry instead of return (break the loop)

* Change subscribe function from ChainHeadEvent (only emit canonical block) to ChainEvent (emit for every block)

* Add missing queueSize flag

* Apply sending batch to optimize memory and fix deadlock when exiting

* Add handle reorg event

* Send message to ChainEvent after finish syncing block using snap or fast

* Add Remove and Rebirth logs event, Fix empty blockHash, Number, TransactionHash in synced logs

* Implement get and publish past blocks in state

* Add subscribe removedLogEvent and rebirthLogsEvent codes

* Update Dockerfile and command usage

* Add contractAddress to transaction

* Add checkConnection function to check connectivity to kafka, Fixed wrong condition in entrypoint.sh

* Correct docker-compose volumes path

* Correct mine condition

* Add number of transactions to block

* Add CumulativeGasUsed to transaction

* Add Verbosity variable to docker-compose

* Add comments for new ideas of resetting blockchain's state if bad block happen

* Add fromHeight validation for reOrg, rebirthLog and removeLog

* Add RONIN_PARAMS to docker-compose

* Update sending confirmed block which behind 10 blocks with current block

* Handle nil confirmed block

* Add write timeout and log while publishing error

* Update the latest go-kafka

* Fix typo, send wrong topic in confirmBlockTopic

* Update flags default value description

* Enable miner by default in Dockerfile and entrypoint

* Remove unused commented code

* Add publishedTime to newBlock/newTx/newLogs to specify the exact time event is sent from blockchain

* Update entrypoint that allows users custom their datadir

* Remove unnecessary comments in entrypoint.sh
DNK90 added a commit that referenced this pull request Dec 10, 2021
* Implement new blocks subscriber and submit data to kafka

* Fix job is added to job queue continuously

* Add SCRAM-SHA-256 authentication type and update description of authentication flag

* Continue the loop in worker when job reaches its maxTry instead of return (break the loop)

* Change subscribe function from ChainHeadEvent (only emit canonical block) to ChainEvent (emit for every block)

* Add missing queueSize flag

* Apply sending batch to optimize memory and fix deadlock when exiting

* Add handle reorg event

* Send message to ChainEvent after finish syncing block using snap or fast

* Add Remove and Rebirth logs event, Fix empty blockHash, Number, TransactionHash in synced logs

* Implement get and publish past blocks in state

* Add subscribe removedLogEvent and rebirthLogsEvent codes

* Update Dockerfile and command usage

* Add contractAddress to transaction

* Add checkConnection function to check connectivity to kafka, Fixed wrong condition in entrypoint.sh

* Correct docker-compose volumes path

* Correct mine condition

* Add number of transactions to block

* Add CumulativeGasUsed to transaction

* Add Verbosity variable to docker-compose

* Add comments for new ideas of resetting blockchain's state if bad block happen

* Add fromHeight validation for reOrg, rebirthLog and removeLog

* Add RONIN_PARAMS to docker-compose

* Update sending confirmed block which behind 10 blocks with current block

* Handle nil confirmed block

* Add write timeout and log while publishing error

* Update the latest go-kafka

* Fix typo, send wrong topic in confirmBlockTopic

* Update flags default value description

* Enable miner by default in Dockerfile and entrypoint

* Remove unused commented code

* Add publishedTime to newBlock/newTx/newLogs to specify the exact time event is sent from blockchain

* Update entrypoint that allows users custom their datadir

* Remove unnecessary comments in entrypoint.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants