Klaytn 문서 아카이브
시작하기스마트 컨트랙트노드 운영dApp 개발자
  • Klaytn 문서
  • -
    • Klaytn Overview
      • 왜 클레이튼일까요?
      • 클레이튼 디자인
        • 합의 메커니즘
        • 계정
        • 트랜잭션
          • 기본
          • 수수료 위임 트랜잭션
          • 수수료 부분 위임 트랜잭션
          • Ethereum
        • 연산
          • 클레이튼 스마트 컨트랙트
          • 실행 모델(Execution Model)
          • Computation Cost
            • 연산 비용 (구 버전 문서)
          • Klaytn 가상머신
            • 클레이튼 가상머신 (구 버전 문서)
        • 스토리지
        • 트랜잭션 비용
          • 트랜잭션 비용 (구 버전 문서)
        • 클레이튼의 네이티브 코인 - KLAY
        • 토큰 이코노미
        • 거버넌스
        • 다중 채널
        • KNI
      • 확장성 솔루션
    • Getting Started
      • Deploying Smart Contract Using Foundry
      • Deploying Smart Contract Using Hardhat
      • Deploying Smart Contract Using KEN
        • Launch an Endpoint Node
        • Top up your Account
        • Install Development Tools
        • Deploy a Smart Contract
        • Check the Deployment
        • Account Management
          • Creating Accounts
          • Managing Accounts
      • Development Environment
      • Getting KLAY
    • 스마트 컨트랙트
      • 솔리디티 - 스마트 컨트랙트 언어
      • 미리 컴파일된 컨트랙트
        • 미리 컴파일된 컨트랙트 (구 버전 문서)
      • IDE 및 도구
        • Truffle
      • 샘플 컨트랙트
        • KlaytnGreeter
        • ERC-20
          • 1. ERC-20 스마트 컨트랙트 작성
          • 2. 스마트 컨트랙트 배포
          • 3. 클레이튼 월렛에서 ERC-20 토큰 사용
        • ERC-721
          • 1. ERC-721 스마트 컨트랙트 작성
          • 2. Deploying Smart Contract
      • 테스트 가이드
      • 배포 가이드
      • 클레이튼 호환 토큰
      • 이더리움 컨트랙트 이식
    • Run a Node
      • 배포
        • Endpoint Node
          • 시스템 요구사항
          • 설치 가이드
            • 다운로드
            • Installation Guide
            • 환경설정
            • EN 실행하기
            • 설치 테스트하기
          • ken CLI 명령어
          • JSON-RPC API
        • 코어 셀
          • System Requirements
          • 네트워크 설정
          • Installation Guide
            • Download
            • 설치하기 전에
            • 컨센서스 노드 설정
              • Installation Guide
              • Configuration
              • CN 실행하기
            • 프록시 노드 설정
              • Installation Guide
              • Configuration
              • PN 실행하기
            • 코어 셀 테스트하기
          • 모니터링 설정
          • H/A 설정
        • Service Chain
          • Getting Started
            • 4개 노드 서비스 체인 설정하기
            • Connecting to Baobab
            • 크로스체인 토큰 전송
            • HA(High Availability) for ServiceChain
            • Nested ServiceChain
            • Value Transfer between Sibling ServiceChains
          • 참조 매뉴얼
            • System Requirements
            • Download
            • SCN User Guide
              • Installation
              • Configuration
              • SCN 실행 및 중지하기
              • 노드 상태 확인하기
              • kscn commands
              • homi commands
            • SPN/SEN User Guide
              • Installation
              • Configuration
              • 노드 실행 및 중지
              • Checking Node Status
            • Bridge Configuration
            • 앵커링
            • KAS 앵커링
            • 토큰 전송
            • Configuration Files
            • 로그 파일
            • Genesis JSON
            • 업그레이드 및 하드포크
          • How-To Guides
        • Download Node Packages
          • v1.11.1
          • v1.11.0
          • v1.10.2
          • v1.10.1
          • v1.10.0
          • v1.9.1
          • v1.9.0
          • v1.8.4
          • v1.8.3
          • v1.8.2
          • v1.8.1
          • v1.8.0
          • v1.7.3
          • v1.7.2
          • v1.7.1
          • v1.7.0
          • v1.6.4
          • v1.6.3
          • v1.6.2
          • v1.6.1
          • v1.6.0
          • v1.5.3
          • v1.5.2
          • v1.5.1
          • v1.5.0
          • v1.4.2
          • v1.4.1
          • v1.4.0
          • v1.3.0
          • v1.2.0
          • v1.1.1
          • v1.0.0
          • v0.9.6
          • v0.8.2
    • 운영 가이드
      • Configuration
      • 노드 로그
      • Log operation
      • 에러 및 문제 해결
      • Klaytn Command
      • Chaindata Change
      • Chaindata Migration
    • dApp Developers
      • JSON-RPC APIs
        • API references
          • eth
            • Caution
            • Account
            • Block
            • Transaction
            • Config
            • Filter
            • Gas
            • Miscellaneous
          • klay
            • Account
            • Block
            • Transaction
              • Working with Klaytn Transaction Types
            • Configuration
            • Filter
            • Gas
            • Miscellaneous
          • net
          • debug
            • Logging
            • Profiling
            • Runtime Tracing
            • Runtime Debugging
            • VM Tracing
            • VM Standard Tracing
            • Blockchain Inspection
          • admin
          • personal
          • txpool
          • governance
        • Service Chain API references
          • mainbridge
          • subbridge
        • Transaction Error Codes
      • RPC Service Providers
        • Public Endpoints
      • SDK & Libraries for interacting with Klaytn Node
        • caver-js
          • Getting Started
          • Sending a sample transaction
          • API references
            • caver.account
            • caver.wallet
              • caver.wallet.keyring
            • caver.transaction
              • Basic
              • Fee Delegation
              • Partial Fee Delegation
            • caver.rpc
              • caver.rpc.klay
              • caver.rpc.net
              • caver.rpc.governance
            • caver.contract
            • caver.abi
            • caver.kct
              • caver.kct.kip7
              • caver.kct.kip17
              • caver.kct.kip37
            • caver.validator
            • caver.utils
            • caver.ipfs
          • caver-js ~v1.4.1
            • Getting Started (~v1.4.1)
            • API references
              • caver.klay
                • Account
                • Block
                • Transaction
                  • Legacy
                  • Value Transfer
                  • Value Transfer Memo
                  • Account Update
                  • Smart Contract Deploy
                  • Smart Contract Execution
                  • Cancel
                • Configuration
                • Filter
                • Miscellaneous
              • caver.klay.net
              • caver.klay.accounts
              • caver.klay.Contract
              • caver.klay.KIP7
              • caver.klay.KIP17
              • caver.klay.abi
              • caver.utils (~v1.4.1)
            • Porting from web3.js
        • caver-java
          • Getting Started
          • API references
          • caver-java ~v1.4.0
            • Getting Started (~v1.4.0)
            • Porting from web3j
        • ethers.js
        • web3.js
      • Tutorials
        • Klaytn Online Toolkit
        • Fee Delegation Example
        • Count DApp
          • 1. Environment Setup
          • 2. Clone Count DApp
          • 3. Directory Structure
          • 4. Write Smart Contract
          • 5. Frontend Code Overview
            • 5-1. Blocknumber Component
            • 5-2. Auth Component
            • 5-3. Count Component
          • 6. Deploy Contract
          • 7. Run App
        • Klaystagram
          • 1. Environment Setup
          • 2. Clone Klaystagram DApp
          • 3. Directory Structure
          • 4. Write Klaystagram Smart Contract
          • 5. Deploy Contract
          • 6. Frontend Code Overview
          • 7. FeedPage
            • 7-1. Connect Contract to Frontend
            • 7-2. UploadPhoto Component
            • 7-3. Feed Component
            • 7-4. TransferOwnership Component
          • 8. Run App
        • Building a Buy Me a Coffee dApp
          • 1. Project Setup
          • 2. Creating a BMC Smart Contract
          • 3. Testing the contract using scripts
          • 4. Deploying BMC Smart contract
          • 5. Building the BMC Frontend with React and Web3Onboard
          • 6. Deploying Frontend code on IPFS using Fleek
          • 7. Conclusion
        • Migrating Ethereum App to Klaytn
        • Connecting MetaMask
        • Connecting Remix
        • Verifying Smart Contracts Using Block Explorers
      • Developer Tools
        • Wallets
          • Kaikas
          • Klaytn Wallet
          • Klaytn Safe
            • Klaytn Safe Design
            • Create a Safe
            • Add assets
            • Send assets
            • Contract Interaction
            • Transaction Builder
            • Points to Note
            • Frequently Asked Questions
          • Wallet Libraries
            • Web3Auth
            • Web3Modal
            • Web3-Onboard
        • Oracles
          • Orakl Network
          • Witnet
          • SupraOracles
        • Block Explorers
          • Klaytnscope
          • Klaytnfinder
        • Klaytn Contracts Wizard
    • Glossary
  • ---
    • Klaytn 하드포크
    • 클레이튼 2.0
      • 메타버스 패키지
      • 완결성과 개선 사항들
      • 이더리움 호환성
      • 거버넌스 탈중앙화
      • 대규모 에코 펀드
    • FAQ
    • 오픈 소스
    • 이용약관
    • 지원 언어
  • ℹ️최신 Klaytn 문서
Powered by GitBook
On this page
  • txpool_content
  • txpool_inspect
  • txpool_status

Was this helpful?

  1. -
  2. dApp Developers
  3. JSON-RPC APIs
  4. API references

txpool

노드에서 트랜잭션 풀을 검사하는 API입니다.

Namespace txpool API는 몇몇 비표준 RPC 메서드에 접근하여 현재 보류 상태일 뿐만 아니라 이후 처리되기 위해 대기 중인 모든 트랜잭션들을 담고 있는 트랜잭션 풀의 내용을 검사하도록 합니다

txpool_content

content 검사 속성을 조회하여 다음 블록(들)에 포함되기 위해 현재 보류 중인 트랜잭션 뿐 아니라 이후에 처리되기 위해 대기 중인 모든 트랜잭션의 상세한 정보를 확인할 수 있습니다.

pending과 queued 등 두 개의 필드로 구성된 객체를 반환합니다. 각 필드는 연관 배열이며, 연관 배열의 각 항목은 발신자의 주소별로 대기 중인 트랜잭션 묶음을 보여줍니다. 트랜잭션 묶음 자체도 논스에 따른 각 트랜잭션의 내용으로 구성되어 있습니다.

Client
Method invocation

Console

txpool.content

RPC

{"method": "txpool_content"}

Parameters

None

Return Value

Type
Description

JSON string

트랜잭션 풀의 내용입니다.

Example

Console

> txpool.content
{
  pending: {
    0x18352126c43E4EC314E41b632A0c1af6b233260b: {
      733: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: "0x0",
        from: "0x18352126c43e4ec314e41b632a0c1af6b233260b",
        gas: "0x5208",
        gasPrice: "0x0",
        input: "0x",
        nonce: "0x2dd",
        signatures: [...],
        to: "0x18352126c43e4ec314e41b632a0c1af6b233260b",
        transactionIndex: "0x0",
        txHash: "0xeeac2d4f1255e50659cd57a58e74e46d2af7122d91e347ca341d4e2cd7da689b",
        type: "TxTypeLegacyTransaction",
        value: "0x2"
      },
    },
    0x952c9a710Ce70D58FD5C55d45c4479b82dEA6DAC: {
      756: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: "0x0",
        from: "0x952c9a710ce70d58fd5c55d45c4479b82dea6dac",
        gas: "0x5208",
        gasPrice: "0x0",
        input: "0x",
        nonce: "0x2f4",
        signatures: [...],
        to: "0x6afe934786fe008c79577d85d8e1af1f6f14c73a",
        transactionIndex: "0x0",
        txHash: "0x0fad399b31b520e4af5bc9f2ea40de71854a7f3c41d5918d5ed120d1b4fc5154",
        type: "TxTypeLegacyTransaction",
        value: "0x1"
      },
      757: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: "0x0",
        from: "0x952c9a710ce70d58fd5c55d45c4479b82dea6dac",
        gas: "0x5208",
        gasPrice: "0x0",
        input: "0x",
        nonce: "0x2f5",
        signatures: [...],
        to: "0x18352126c43e4ec314e41b632a0c1af6b233260b",
        transactionIndex: "0x0",
        txHash: "0xdfc3053ce6c27fd4610bb2e103837c4435f27bb6bb9dfd56110cbd2bbe5ea7fa",
        type: "TxTypeLegacyTransaction",
        value: "0x1"
      },
    },
  },
  queued: {
    0x7dCef85A0356c36a0B43772e1F7C2e80cE029b96: {
      786: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: "0x0",
        from: "0x7dcef85a0356c36a0b43772e1f7c2e80ce029b96",
        gas: "0x5208",
        gasPrice: "0x0",
        input: "0x",
        nonce: "0x312",
        signatures: [...],
        to: "0x7dcef85a0356c36a0b43772e1f7c2e80ce029b96",
        transactionIndex: "0x0",
        txHash: "0xf90dab02c355b4f09d1b1f224380a278a03fc76d1fc7d866fb2ad2f503525717",
        type: "TxTypeLegacyTransaction",
        value: "0x0"
      },
    },
    0xd5B94dd456040612d721A8Eae1e4E97a70b92812: {
      742: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: "0x0",
        from: "0xd5b94dd456040612d721a8eae1e4e97a70b92812",
        gas: "0x5208",
        gasPrice: "0x0",
        input: "0x",
        nonce: "0x2e6",
        signatures: [...],
        to: "0xd5b94dd456040612d721a8eae1e4e97a70b92812",
        transactionIndex: "0x0",
        txHash: "0x6266969f1221b258bb2ce6fd2bcce88ad76be1e2b3eb5c770311a2bc0c2cc74a",
        type: "TxTypeLegacyTransaction",
        value: "0x2"
      },
    }
  }
}

HTTP RPC

$ curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"txpool_content","id":1}' https://public-en-baobab.klaytn.net
{"jsonrpc":"2.0","id":1,"result":{"pending":{},"queued":{}}}
#There is no pending transaction nor queued transaction.

txpool_inspect

inspect 검사 속성을 조회하여 다음 블록(들)에 포함되기 위해 현재 보류 중인 트랜잭션 뿐만 아니라 이후에 처리되기 위해 대기 중인 모든 트랜잭션의 요약본을 확인할 수 있습니다. 이 메서드는 개발자가 빠르게 트랜잭션 풀을 확인하고 잠재적인 문제를 찾을 수 있도록 만들어졌습니다.

The result is an object with two fields pending and queued. Each of these fields is associative arrays, in which each entry maps an origin-address to a batch of scheduled transactions. 트랜잭션 묶음 자체도 논스에 따른 각 트랜잭션의 내용으로 구성되어 있습니다.

Client
Method invocation

Console

txpool.inspect

RPC

{"method": "txpool_inspect"}

Parameters

None

Return Value

Type
Description

JSON string

보류 상태이거나 대기 상태인 트랜잭션들의 목록입니다.

Example

Console

> txpool.inspect
{
  pending: {
    0x26588a9301b0428d95e6fc3a5024fce8bec12d51: {
      31813: "0x3375ee30428b2a71c428afa5e89e427905f95f7e: 0 peb + 500000 gas × 25000000000 peb"
    },
    0x2a65aca4d5fc5b5c859090a6c34d164135398226: {
      563662: "0x958c1fa64b34db746925c6f8a3dd81128e40355e: 1051546810000000000 peb + 90000 gas × 25000000000 peb",
      563663: "0x77517b1491a0299a44d668473411676f94e97e34: 1051190740000000000 peb + 90000 gas × 25000000000 peb",
      563664: "0x3e2a7fe169c8f8eee251bb00d9fb6d304ce07d3a: 1050828950000000000 peb + 90000 gas × 25000000000 peb",
      563665: "0xaf6c4695da477f8c663ea2d8b768ad82cb6a8522: 1050544770000000000 peb + 90000 gas × 25000000000 peb",
      563666: "0x139b148094c50f4d20b01caf21b85edb711574db: 1048598530000000000 peb + 90000 gas × 25000000000 peb",
      563667: "0x48b3bd66770b0d1eecefce090dafee36257538ae: 1048367260000000000 peb + 90000 gas × 25000000000 peb"
    },
    0x9174e688d7de157c5c0583df424eaab2676ac162: {
      3: "0xbb9bc244d798123fde783fcc1c72d3bb8c189413: 30000000000000000000 peb + 85000 gas × 25000000000 peb"
    },
    0xb18f9d01323e150096650ab989cfecd39d757aec: {
      777: "0xcd79c72690750f079ae6ab6ccd7e7aedc03c7720: 0 peb + 1000000 gas × 25000000000 peb"
    },
    0xb2916c870cf66967b6510b76c07e9d13a5d23514: {
      2: "0x576f25199d60982a8f31a8dff4da8acb982e6aba: 26000000000000000000 peb + 90000 gas × 25000000000 peb"
    },
    0xbc0ca4f217e052753614d6b019948824d0d8688b: {
      0: "0x2910543af39aba0cd09dbb2d50200b3e800a63d2: 1000000000000000000 peb + 50000 gas × 25000000000 peb"
    },
    0xea674fdde714fd979de3edf0f56aa9716b898ec8: {
      70148: "0xe39c55ead9f997f7fa20ebe40fb4649943d7db66: 1000767667434026200 peb + 90000 gas × 25000000000 peb"
    }
  },
  queued: {
    0x0f6000de1578619320aba5e392706b131fb1de6f: {
      6: "0x8383534d0bcd0186d326c993031311c0ac0d9b2d: 9000000000000000000 peb + 21000 gas × 25000000000 peb"
    },
    0x5b30608c678e1ac464a8994c3b33e5cdf3497112: {
      6: "0x9773547e27f8303c87089dc42d9288aa2b9d8f06: 50000000000000000000 peb + 90000 gas × 25000000000 peb"
    },
    0x976a3fc5d6f7d259ebfb4cc2ae75115475e9867c: {
      3: "0x346fb27de7e7370008f5da379f74dd49f5f2f80f: 140000000000000000 peb + 90000 gas × 25000000000 peb"
    },
    0x9b11bf0459b0c4b2f87f8cebca4cfc26f294b63a: {
      2: "0x24a461f25ee6a318bdef7f33de634a67bb67ac9d: 17000000000000000000 peb + 90000 gas × 25000000000 peb",
      6: "0x6368f3f8c2b42435d6c136757382e4a59436a681: 17990000000000000000 peb + 90000 gas × 25000000000 peb",
      7: "0x6368f3f8c2b42435d6c136757382e4a59436a681: 17900000000000000000 peb + 90000 gas × 25000000000 peb"
    }
  }
}

HTTP RPC

$ curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"txpool_inspect","id":1}' https://public-en-baobab.klaytn.net
{"jsonrpc":"2.0","id":1,"result":{"pending":{"0x1A789E38cD567a00b7Fb8e1D39100ac395fa463B":{"0":"0x87AC99835e67168d4f9a40580f8F5C33550bA88b: 0 peb + 99000000 gas × 25000000000 peb"},"0xAb552FC3d76de919c74435A4C6B04576a9763934":{"0":"0x87AC99835e67168d4f9a40580f8F5C33550bA88b: 0 peb + 99000000 gas × 25000000000 peb"}},"queued":{}}}

txpool_status

status 검사 속성을 조회하여 다음 블록(들)에 포함되기 위해 현재 보류 중인 트랜잭션 뿐만 아니라 이후에 처리되기 위해 대기 중인 모든 트랜잭션의 개수를 확인할 수 있습니다.

pending과 queued 등 두 개의 필드로 구성된 객체를 결과로 반환하며, 각 필드는 해당 상태의 트랜잭션 수를 나타냅니다.

Client
Method invocation

Console

txpool.status

RPC

{"method": "txpool_status"}

Parameters

None

Return Value

Name
Type
Description

pending

int

보류 상태인 트랜잭션의 개수입니다.

queued

int

대기 상태인 트랜잭션의 개수입니다.

Example

Console

> txpool.status
{
  pending: 10,
  queued: 7
}

HTTP RPC

$ curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"txpool_status","id":1}' https://public-en-baobab.klaytn.net
{"jsonrpc":"2.0","id":1,"result":{"pending":"0x0","queued":"0x0"}}
PreviouspersonalNextgovernance

Last updated 2 years ago

Was this helpful?