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

update invoke v3 txn validation to require sender_address #2308

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

rianhughes
Copy link
Contributor

closes #2307

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.27%. Comparing base (27f0bc1) to head (52a9ca8).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2308      +/-   ##
==========================================
- Coverage   75.37%   75.27%   -0.11%     
==========================================
  Files         108      108              
  Lines       11541    11541              
==========================================
- Hits         8699     8687      -12     
- Misses       2179     2186       +7     
- Partials      663      668       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rpc/transaction.go Outdated Show resolved Hide resolved
@rianhughes
Copy link
Contributor Author

This request causes a panic when running Juno from main, but does not panic and returns the expected response when building from this branch

response from main build : curl: (52) Empty reply from server + Juno panic

response with this branches build: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid Params","data":"Key: 'BroadcastedTransaction.Transaction.SenderAddress' Error:Field validation for 'SenderAddress' failed on the 'required_if' tag"},"id":1}

curl --location 'http://localhost:6060' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "starknet_estimateFee",
    "params": {
        "request": [
            {
                "transaction_hash": "0x205e0b869e4eadd24cac88ee8601f3cae91000f142bf66312e78710edbae2e3",
                "type": "INVOKE",
                "version": "0x3",
                "nonce": "0x2764",

                "signature": [
                    "0x1",
                    "0x3d5da84853f9f0557789d897b2d10afc941aec3a813a270ebbf860b96daf378",
                    "0x58185b9d272c0514e9f9a372ea1e14fa81c84fa500c157e73d8687e375ea91"
                ],
                "calldata": [
                    "0x1",
                    "0xbf7ba278658bb8ddb076939d0d10b96323177a594792285516b2d7b72f9899",
                    "0x34cc13b274446654ca3233ed2c1620d4c5d1d32fd20b47146a3371064bdc57d",
                    "0x15",
                    "0x414e595f43414c4c4552",
                    "0x1939b056d0d",
                    "0x6751c724",
                    "0x67539be4",
                    "0x1",
                    "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
                    "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",
                    "0x3",
                    "0xbf7ba278658bb8ddb076939d0d10b96323177a594792285516b2d7b72f9899",
                    "0x38d7ea4c68000",
                    "0x0",
                    "0x9",
                    "0x2",
                    "0x6652083ee3f9848896b211b0ac16876d",
                    "0xd7015f293adfbf946d5e393aac53d1a4",
                    "0x7eb27f10a2b01c869fe4a3340d287657",
                    "0x175c9727b923932eaadc256b0c08bbbc",
                    "0xbced860fb340a3ea2bfc008efd7c50d7",
                    "0x702c62769cd4107869df5e35aae852eb",
                    "0xbe37474c5d0a17687556aa548013b025",
                    "0x1768158066093807d5a06ab7c80405fa"
                ],
                "resource_bounds": {
                    "l1_gas": {
                        "max_amount": "0x76",
                        "max_price_per_unit": "0x59bdebb88a7e"
                    },
                    "l2_gas": {
                        "max_amount": "0x0",
                        "max_price_per_unit": "0x0"
                    }
                },
                "tip": "0x0",
                "paymaster_data": [],
                "account_deployment_data": [],
                "nonce_data_availability_mode": "L1",
                "fee_data_availability_mode": "L1"
            }
        ],
        "block_id": {"block_number": 1},
        "simulation_flags": [
            "SKIP_VALIDATE"
        ]
    }
}'

Copy link
Contributor

@pnowosie pnowosie left a comment

Choose a reason for hiding this comment

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

👍

@kirugan kirugan merged commit 8bf9be9 into main Dec 11, 2024
13 checks passed
@kirugan kirugan deleted the rianhughes/invoke-validation-fix branch December 11, 2024 12:11
weiihann added a commit that referenced this pull request Dec 12, 2024
commit 7687360
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:54:32 2024 +0800

    Remove size in OrderedSet (#2319)

commit 65b7507
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:20:55 2024 +0800

    Fix and refactor trie proof logics (#2252)

commit 2b1b219
Author: aleven1999 <[email protected]>
Date:   Thu Dec 12 12:11:28 2024 +0400

    Remove unused code (#2318)

commit 0a21162
Author: Daniil Ankushin <[email protected]>
Date:   Thu Dec 12 00:04:08 2024 +0700

    Remove unused code (#2317)

commit 8bf9be9
Author: Rian Hughes <[email protected]>
Date:   Wed Dec 11 14:11:22 2024 +0200

    update invoke v3 txn validation to require sender_address (#2308)

commit 91d0f8e
Author: Kirill <[email protected]>
Date:   Wed Dec 11 16:01:10 2024 +0400

    Add schema_version to output of db info command (#2309)

commit 60e8cc9
Author: AnavarKh <[email protected]>
Date:   Wed Dec 11 16:04:31 2024 +0530

    Update download link for Juno snapshots from dev to io in Readme file (#2314)

commit 8862de1
Author: wojciechos <[email protected]>
Date:   Wed Dec 11 11:20:02 2024 +0100

    Improve binary build workflow for cross-platform releases (#2315)

    - Add proper architecture handling in matrix configuration
    - Implement caching for Go modules and Rust dependencies
    - Streamline dependency installation for both Linux and macOS
    - Improve binary artifact handling and checksums
    - Add retention policy for build artifacts
    - Split build steps for better clarity and maintainability

    This update ensures more reliable and efficient binary builds
    across all supported platforms.

commit e75e504
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Dec 11 07:35:16 2024 +0000

    Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316)

    Bump nanoid in /docs in the npm_and_yarn group across 1 directory

    Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid).

    Updates `nanoid` from 3.3.7 to 3.3.8
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.3.7...3.3.8)

    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
      dependency-group: npm_and_yarn
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3a7abeb
Author: wojciechos <[email protected]>
Date:   Tue Dec 10 21:52:49 2024 +0100

    Skip error logs for FGW responses with NOT_RECEIVED status (#2303)

    * Add NotReceived case handling in adaptTransactionStatus

    ---------

    Co-authored-by: Rian Hughes <[email protected]>
weiihann added a commit that referenced this pull request Dec 13, 2024
commit 7687360
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:54:32 2024 +0800

    Remove size in OrderedSet (#2319)

commit 65b7507
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:20:55 2024 +0800

    Fix and refactor trie proof logics (#2252)

commit 2b1b219
Author: aleven1999 <[email protected]>
Date:   Thu Dec 12 12:11:28 2024 +0400

    Remove unused code (#2318)

commit 0a21162
Author: Daniil Ankushin <[email protected]>
Date:   Thu Dec 12 00:04:08 2024 +0700

    Remove unused code (#2317)

commit 8bf9be9
Author: Rian Hughes <[email protected]>
Date:   Wed Dec 11 14:11:22 2024 +0200

    update invoke v3 txn validation to require sender_address (#2308)

commit 91d0f8e
Author: Kirill <[email protected]>
Date:   Wed Dec 11 16:01:10 2024 +0400

    Add schema_version to output of db info command (#2309)

commit 60e8cc9
Author: AnavarKh <[email protected]>
Date:   Wed Dec 11 16:04:31 2024 +0530

    Update download link for Juno snapshots from dev to io in Readme file (#2314)

commit 8862de1
Author: wojciechos <[email protected]>
Date:   Wed Dec 11 11:20:02 2024 +0100

    Improve binary build workflow for cross-platform releases (#2315)

    - Add proper architecture handling in matrix configuration
    - Implement caching for Go modules and Rust dependencies
    - Streamline dependency installation for both Linux and macOS
    - Improve binary artifact handling and checksums
    - Add retention policy for build artifacts
    - Split build steps for better clarity and maintainability

    This update ensures more reliable and efficient binary builds
    across all supported platforms.

commit e75e504
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Dec 11 07:35:16 2024 +0000

    Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316)

    Bump nanoid in /docs in the npm_and_yarn group across 1 directory

    Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid).

    Updates `nanoid` from 3.3.7 to 3.3.8
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.3.7...3.3.8)

    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
      dependency-group: npm_and_yarn
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3a7abeb
Author: wojciechos <[email protected]>
Date:   Tue Dec 10 21:52:49 2024 +0100

    Skip error logs for FGW responses with NOT_RECEIVED status (#2303)

    * Add NotReceived case handling in adaptTransactionStatus

    ---------

    Co-authored-by: Rian Hughes <[email protected]>
weiihann added a commit that referenced this pull request Dec 16, 2024
commit 7687360
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:54:32 2024 +0800

    Remove size in OrderedSet (#2319)

commit 65b7507
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:20:55 2024 +0800

    Fix and refactor trie proof logics (#2252)

commit 2b1b219
Author: aleven1999 <[email protected]>
Date:   Thu Dec 12 12:11:28 2024 +0400

    Remove unused code (#2318)

commit 0a21162
Author: Daniil Ankushin <[email protected]>
Date:   Thu Dec 12 00:04:08 2024 +0700

    Remove unused code (#2317)

commit 8bf9be9
Author: Rian Hughes <[email protected]>
Date:   Wed Dec 11 14:11:22 2024 +0200

    update invoke v3 txn validation to require sender_address (#2308)

commit 91d0f8e
Author: Kirill <[email protected]>
Date:   Wed Dec 11 16:01:10 2024 +0400

    Add schema_version to output of db info command (#2309)

commit 60e8cc9
Author: AnavarKh <[email protected]>
Date:   Wed Dec 11 16:04:31 2024 +0530

    Update download link for Juno snapshots from dev to io in Readme file (#2314)

commit 8862de1
Author: wojciechos <[email protected]>
Date:   Wed Dec 11 11:20:02 2024 +0100

    Improve binary build workflow for cross-platform releases (#2315)

    - Add proper architecture handling in matrix configuration
    - Implement caching for Go modules and Rust dependencies
    - Streamline dependency installation for both Linux and macOS
    - Improve binary artifact handling and checksums
    - Add retention policy for build artifacts
    - Split build steps for better clarity and maintainability

    This update ensures more reliable and efficient binary builds
    across all supported platforms.

commit e75e504
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Dec 11 07:35:16 2024 +0000

    Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316)

    Bump nanoid in /docs in the npm_and_yarn group across 1 directory

    Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid).

    Updates `nanoid` from 3.3.7 to 3.3.8
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.3.7...3.3.8)

    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
      dependency-group: npm_and_yarn
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3a7abeb
Author: wojciechos <[email protected]>
Date:   Tue Dec 10 21:52:49 2024 +0100

    Skip error logs for FGW responses with NOT_RECEIVED status (#2303)

    * Add NotReceived case handling in adaptTransactionStatus

    ---------

    Co-authored-by: Rian Hughes <[email protected]>
weiihann added a commit that referenced this pull request Dec 18, 2024
commit 7687360
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:54:32 2024 +0800

    Remove size in OrderedSet (#2319)

commit 65b7507
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:20:55 2024 +0800

    Fix and refactor trie proof logics (#2252)

commit 2b1b219
Author: aleven1999 <[email protected]>
Date:   Thu Dec 12 12:11:28 2024 +0400

    Remove unused code (#2318)

commit 0a21162
Author: Daniil Ankushin <[email protected]>
Date:   Thu Dec 12 00:04:08 2024 +0700

    Remove unused code (#2317)

commit 8bf9be9
Author: Rian Hughes <[email protected]>
Date:   Wed Dec 11 14:11:22 2024 +0200

    update invoke v3 txn validation to require sender_address (#2308)

commit 91d0f8e
Author: Kirill <[email protected]>
Date:   Wed Dec 11 16:01:10 2024 +0400

    Add schema_version to output of db info command (#2309)

commit 60e8cc9
Author: AnavarKh <[email protected]>
Date:   Wed Dec 11 16:04:31 2024 +0530

    Update download link for Juno snapshots from dev to io in Readme file (#2314)

commit 8862de1
Author: wojciechos <[email protected]>
Date:   Wed Dec 11 11:20:02 2024 +0100

    Improve binary build workflow for cross-platform releases (#2315)

    - Add proper architecture handling in matrix configuration
    - Implement caching for Go modules and Rust dependencies
    - Streamline dependency installation for both Linux and macOS
    - Improve binary artifact handling and checksums
    - Add retention policy for build artifacts
    - Split build steps for better clarity and maintainability

    This update ensures more reliable and efficient binary builds
    across all supported platforms.

commit e75e504
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Dec 11 07:35:16 2024 +0000

    Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316)

    Bump nanoid in /docs in the npm_and_yarn group across 1 directory

    Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid).

    Updates `nanoid` from 3.3.7 to 3.3.8
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.3.7...3.3.8)

    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
      dependency-group: npm_and_yarn
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3a7abeb
Author: wojciechos <[email protected]>
Date:   Tue Dec 10 21:52:49 2024 +0100

    Skip error logs for FGW responses with NOT_RECEIVED status (#2303)

    * Add NotReceived case handling in adaptTransactionStatus

    ---------

    Co-authored-by: Rian Hughes <[email protected]>
weiihann added a commit that referenced this pull request Dec 19, 2024
commit 7687360
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:54:32 2024 +0800

    Remove size in OrderedSet (#2319)

commit 65b7507
Author: Ng Wei Han <[email protected]>
Date:   Thu Dec 12 18:20:55 2024 +0800

    Fix and refactor trie proof logics (#2252)

commit 2b1b219
Author: aleven1999 <[email protected]>
Date:   Thu Dec 12 12:11:28 2024 +0400

    Remove unused code (#2318)

commit 0a21162
Author: Daniil Ankushin <[email protected]>
Date:   Thu Dec 12 00:04:08 2024 +0700

    Remove unused code (#2317)

commit 8bf9be9
Author: Rian Hughes <[email protected]>
Date:   Wed Dec 11 14:11:22 2024 +0200

    update invoke v3 txn validation to require sender_address (#2308)

commit 91d0f8e
Author: Kirill <[email protected]>
Date:   Wed Dec 11 16:01:10 2024 +0400

    Add schema_version to output of db info command (#2309)

commit 60e8cc9
Author: AnavarKh <[email protected]>
Date:   Wed Dec 11 16:04:31 2024 +0530

    Update download link for Juno snapshots from dev to io in Readme file (#2314)

commit 8862de1
Author: wojciechos <[email protected]>
Date:   Wed Dec 11 11:20:02 2024 +0100

    Improve binary build workflow for cross-platform releases (#2315)

    - Add proper architecture handling in matrix configuration
    - Implement caching for Go modules and Rust dependencies
    - Streamline dependency installation for both Linux and macOS
    - Improve binary artifact handling and checksums
    - Add retention policy for build artifacts
    - Split build steps for better clarity and maintainability

    This update ensures more reliable and efficient binary builds
    across all supported platforms.

commit e75e504
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Dec 11 07:35:16 2024 +0000

    Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316)

    Bump nanoid in /docs in the npm_and_yarn group across 1 directory

    Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid).

    Updates `nanoid` from 3.3.7 to 3.3.8
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.3.7...3.3.8)

    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
      dependency-group: npm_and_yarn
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3a7abeb
Author: wojciechos <[email protected]>
Date:   Tue Dec 10 21:52:49 2024 +0100

    Skip error logs for FGW responses with NOT_RECEIVED status (#2303)

    * Add NotReceived case handling in adaptTransactionStatus

    ---------

    Co-authored-by: Rian Hughes <[email protected]>
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.

Some requests are causing 502 responses
4 participants