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

eth/filters: add finalized block subscription #375

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

andicrypt
Copy link
Contributor

  • Allow users to subscribe to constantly receive notifications about latest finalized blocks

@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from e140e59 to c0f9b0f Compare October 31, 2023 03:44
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from c0f9b0f to 8b05e12 Compare October 31, 2023 03:57
core/events.go Outdated Show resolved Hide resolved
eth/filters/filter_system.go Show resolved Hide resolved
eth/filters/filter_system_test.go Outdated Show resolved Hide resolved
eth/filters/filter_system_test.go Outdated Show resolved Hide resolved
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch 6 times, most recently from 1446d9d to e44dae7 Compare November 1, 2023 06:39
@andicrypt
Copy link
Contributor Author

andicrypt commented Nov 1, 2023

Websocket url: ""
Message:

{"jsonrpc": "2.0","method": "eth_subscribe","params": ["newFinalizedBlocks"],"id": 1}

Response:

{
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0x8fc46d59fe6fad7c474cf4105321ac70",
        "result": {
            "finalizedBlockNumber": "0x14b9c51",
            "finalizedBlockHash": "0xebbe050276be3c1644211994df64c5ee2d9895b289d34f227cb7d86ddd10a81f"
        }
    }
}

Note: Remember turning flag additionalchainevent.enable on.

@andicrypt andicrypt force-pushed the feat/finalized-subscription branch 2 times, most recently from 4e6f076 to 23e998b Compare November 1, 2023 08:54
@andicrypt andicrypt changed the title [feat]: add finalized block subscription eth/filters: add finalized block subscription Nov 1, 2023
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from 23e998b to 432d815 Compare November 2, 2023 02:52
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from 432d815 to 9da177d Compare November 2, 2023 03:58
@minh-bq minh-bq merged commit 061ab32 into axieinfinity:master Nov 2, 2023
1 check passed
minh-bq pushed a commit to minh-bq/ronin that referenced this pull request Feb 20, 2024
Allow users to subscribe to constantly receive notifications about latest finalized blocks

Message:
{"jsonrpc": "2.0","method": "eth_subscribe","params": ["newFinalizedBlocks"],"id": 1}

Response:
{
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0x4c5cd521106240a12aea37bb57ef666f",
        "result": {
            "finalizedBlockNumber": "0x14b4228",
            "finalizedBlockHash": "0x2dea4504e505f0743d443e6db2f0d270831d33f2917d484cd2f878e44839f416"
        }
    }
}
Note: Remember turning flag additionalchainevent.enable on
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.

3 participants