fix(sdk): bug causing error when no tx nonce given#2556
Merged
mergify[bot] merged 1 commit intodevelopfrom May 11, 2022
Merged
Conversation
🦋 Changeset detectedLatest commit: f8db278 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
a025959 to
c577880
Compare
Contributor
|
Whats up with the diff in the |
Fixes a bug in the SDK that would throw an error when the user did not provide a nonce along with the transaction (when estimating gas). If no nonce is provided, will try to find a reasonable nonce or use a default (large) nonce that will give a good upper bound for the L1 gas cost.
c577880 to
f8db278
Compare
tynes
approved these changes
May 10, 2022
Contributor
|
This PR has been added to the merge queue, and will be merged soon. |
Contributor
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Merged
nitaliano
pushed a commit
that referenced
this pull request
May 20, 2024
Fixes a bug in the SDK that would throw an error when the user did not provide a nonce along with the transaction (when estimating gas). If no nonce is provided, will try to find a reasonable nonce or use a default (large) nonce that will give a good upper bound for the L1 gas cost.
theochap
added a commit
that referenced
this pull request
Dec 10, 2025
## Overview This PR adds comprehensive documentation for the `kona-engine` crate to improve developer experience and API understanding. The documentation is cohesive yet concise, staying well under the 500-line limit while providing complete coverage of the public API. ## Changes Made ### Enhanced README.md (62 lines added) - **Comprehensive overview** of the engine's purpose and architecture - **Working code example** demonstrating proper usage with async/await patterns - **Engine API compatibility matrix** showing version support across hardforks - **Key components documentation** with cross-references to main types ### Improved Crate-Level Documentation (28 lines added) - Added **architecture diagram** showing component relationships - Enhanced **module organization** documentation with clear descriptions - Fixed rustdoc link issues by referencing public types instead of private modules ### Enhanced API Documentation - **EngineClient**: Detailed HTTP client docs with JWT authentication examples - **EngineSyncState**: Comprehensive safety level explanations with OP Stack references - **EngineQueries**: Enhanced query interface documentation with usage patterns - **Metrics**: Added Prometheus metrics documentation with practical examples - **EngineKind**: Improved client type identification with string parsing examples - **AttributesMatch**: Better payload validation documentation with use cases - **Version Enums**: Enhanced Engine API version selection with hardfork mapping ## Technical Accuracy All documentation includes: - ✅ **Cross-references** between related types using proper `[Type]` syntax - ✅ **Technical accuracy** with references to [OP Stack specifications](https://specs.optimism.io) - ✅ **Working code examples** that compile and demonstrate real usage - ✅ **Hardfork compatibility** explanations for Engine API version selection ## Verification - **Documentation builds cleanly** with `RUSTDOCFLAGS="-D warnings"` - **All doc tests pass** (3 passed, 2 ignored as expected) - **Total lines added: 281** (well under 500 limit) - **Comprehensive coverage** of all public APIs ## Example Usage The enhanced documentation now provides clear guidance: ```rust use kona_engine::{Engine, EngineClient, EngineState}; use kona_genesis::RollupConfig; use alloy_rpc_types_engine::JwtSecret; // Create authenticated Engine API client let client = EngineClient::new_http(engine_url, l2_url, l1_url, config, jwt); // Initialize engine with task queue let state = EngineState::default(); let (state_sender, _) = tokio::sync::watch::channel(state); let (queue_sender, _) = tokio::sync::watch::channel(0); let engine = Engine::new(state, state_sender, queue_sender); ``` This documentation improvement makes the kona-engine crate more accessible to developers while maintaining the existing high code quality standards. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: refcell <21288394+refcell@users.noreply.github.com> Co-authored-by: refcell <abigger87@gmail.com> Co-authored-by: theochap <80177219+theochap@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a bug in the SDK that would throw an error when the user did not
provide a nonce along with the transaction (when estimating gas). If no
nonce is provided, will try to find a reasonable nonce or use a default
(large) nonce that will give a good upper bound for the L1 gas cost.
Metadata