Send Transaction v2

Introduction

circle-exclamation

BlockRazor achieves subsecond-level transaction inclusion based on globally distributed high-performance network and high-quality SWQoS(see the Benchmarkarrow-up-right), and also provides multiple modes such as sandwich mitigation.

Send Transaction v2 is used to send signed transaction on Solana based on HTTP. It presents a much more streamlined and rapid method for submitting transactions compared with Send Transaction

  • Bypasses CORS Preflight: It eliminates the delay (50-100ms) that is typically incurred by OPTIONS preflight.

  • Plain Text over JSON: Employing a simple plain text transmission circumvents the computational burden associated with parsing JSON. Furthermore, the resulting smaller data size serves to cut down on network transfer time and costs.

  • Base64: Comparing with base58, encoding and decoding of Base64 are significantly faster, while its more compact serialization results in a reduced overall body size.

Endpoint

Region
Endpoint

Frankfurt

http://frankfurt.solana.blockrazor.xyz:443/v2/sendTransaction

New York

http://newyork.solana.blockrazor.xyz:443/v2/sendTransaction

Tokyo

http://tokyo.solana.blockrazor.xyz:443/v2/sendTransaction

Amsterdam

http://amsterdam.solana.blockrazor.xyz:443/v2/sendTransaction

London

http://london.solana.blockrazor.xyz:443/v2/sendTransaction

Rate Limit

circle-info

Solana's transaction sending service is no longer bound to the subscription plan. If you need to increase the TPS limit, please contactarrow-up-right us and we will handle it as soon as possible.

Request Example

circle-info

Note:

  • the auth and request parameter are compulsory to be added in URI params, e.g., http://frankfurt.solana.blockrazor.xyz:443/v2/sendTransaction?auth=<auth_token>&mode=fast&revertProtection=true

  • the only header permitted in the request is Content-Type: text/plain

  • Tx should be in Base64 encoded

Request Parameter

Parameters
Mandatory
Example
Description

transaction

Mandatory

"4hXTCk……tAnaAT"

Fully signed transactions, Base64 encoded

mode

Optional

"fast" "sandwichMitigation"

BlockRazor offers two modes: Fast and SandwichMitigation, with Fast as the default. In fast mode, transactions are sent based on globally distributed high-performance network and high-quality SWQoS, reaching the Leader node with the lowest latency. In sandwichMitigation mode, BlockRazoz will route transactions to the trusted SWQoS and skip the slot of the blacklisted Leader (dynamically identified by the BlockRazor sandwich monitoring mechanism). In this mode, DO NOT send transactions using durable nonce, as it will cause the sandwich protection to become ineffective.

safeWindow

Optional

3

safeWindow is used to determine the timing of transaction sending in sandwichMitigation mode and represents the number of consecutive slots of whitelist validators. For example, if it is set to 3, the transaction will only be sent when 3 consecutive slots from the current slot belong to whitelist validators. The range of safeWindow is 3-13. The larger the number, the better the effect of mitigating the sandwich attack, but it may have a certain impact on the rate of inclusion. If not set, the default is 3.

revertProtection

Optional

false

The default value is false. If set to true, the transaction will not fail on chain, but the speed of inclusion will be affected and there is a possibility that it cannot be included. Please choose to enable it carefully according to actual needs.

Priority Fee

Priority Fee is an additional transaction fee charged by Solana on top of Base Fee (the minimum cost of sending a transaction, 5,000 lamports for each signature included in the transaction). Due to limited computing resources, Leader nodes order transactions mainly by transaction value when producing blocks. Transactions with higher Priority Fee have a higher probability of being included in the next block. The CU Price of Priority Fee is provided by getTransactionfee and is recommended to be set at least 1,000,000 when conscructing transactions.

Tip

When constructing a transaction, you need to add a instruction of Tip transfer into the transaction(preferably added at the front position) to further speed up the inclusion. BlockRazor does not charge service fees from Tips. The Tip transfer amount is at least 1,000,000 Lamports (0.001 Sol) . It is recommended to set it to the value returned by getTransactionfee. The account to receive Tip is:

circle-info

To avoid the degradation of performance due to address occupation, causing transaction delay, please rotate the Tip account when sending transactions.

Keep Alive

Send post request to the health endpoint to keep connection alive, the request is as follows:

Response

Status Code
Message
Meaning

200

OK

The request is normal

400

BadRequest

Invalid parameter

403

Forbidden

Request denied, as the authentication (auth) is empty, invalid, or expired.

500

InternalServerError

The server encountered an unexpected condition that prevented it from fulfilling the request

Last updated