Runlog gas lanes

Background

What are gas lanes?

Gas lanes allow us to create runlog jobs with different maximum gas prices. This allows us to create cheap runlog jobs that will not be fulfilled during gas spikes and more expensive runlog jobs that are guaranteed to be fulfilled during the highest gas spikes. This is especially useful for runlog users who do not need requests to be fulfilled at high gas prices, making it cheaper overall.

How do we achieve this?

If we were to create runlog jobs with different max gas prices using the same Ethereum account, we would likely end up in a situation where a low gas price transaction is holding up a queue of high gas price transactions. Luckily, the Chainlink node supports using multiple Ethereum accounts. This allows us to purpose each account for its own gas lane.

As an example, we could have this setup of accounts on the node:

  • Account A: max gas price = 50 Gwei

  • Account B: max gas price = 500 Gwei

  • Account C: max gas price = 5,000 Gwei

Setting it up

1. Configuring the accounts

Remember to take note of which gas lane you configure each account for!

Updating existing accounts

The Chainlink node will automatically create a new account on the initial setup. To set the gas lane of this account or any other additional accounts you've added to the node, you can use the command below:

Add new accounts

To add new accounts to the node (and set their gas lane), you can use the following command:

2. Setting up the jobs

Next, we need to configure jobs to use the correct gas lane. We do this by defining the "from" address in the ethTx task of the jobs, e.g.:

Once we create this job, it will use the account we defined in the from param - which means that this job will not use a gas price higher than what we defined for this account.

Last updated

Was this helpful?