Skip to content

Conversation

@ameeshaagrawal
Copy link
Collaborator

@ameeshaagrawal ameeshaagrawal commented Apr 25, 2025

✨ Changelog

New Roles:

  • SWITCHBOARD_DISABLER_ROLE - Socket

Limits:

  • Removed precompile limits
  • max payload limit: 24_500
  • max txs in a request: 10
  • supported max msg gas limit for each chain

Rename:

  • DumpDecoder: PayloadHeaderDecoder
  • allowPacket: allowPayload
  • CallFromChainParams: TriggerParams

Fees updater:

  • precompile fees: query, finalise, timeout and callback needs to be updated by watchers

Watcher:

  • signs on sb address and chainSlug to avoid replay attack
  • digest updated
  • watcher need to transfer credits or natives based on the fees plug events

Transmitter:

  • bid needs a uint256 instead of FeesData struct
  • execute function inputs updated
  • allowed tx retry on socket till deadline
  • transmitter address can be addr(0)

Auction:

  • auction manager pays for the setTimeout precompile whenever used

Library:

  • use LibCall for all .call()
  • separated watcher Id encode decode to WatcherIdUtils

Plugs:

  • use app gateway id instead of address
  • plugs can directly call the functions of app gateway using interface without encoding call
  • fees needs to be handled by plugs, it is deducted from app gateway on evmx
  • fees plug: removed native support. can deposit whitelisted tokens for credits and natives on evmx

App gateway:

  • users need to whitelist app gateways in fees manager or send approval data to the app gateway when used first time, once whitelisted, fees will be automatically deducted per use
  • take value from app gateway overrides
  • fees change from struct to a uint256
  • removed callFromChain, trigger can be done with original contract interface hence no need to encode decode call data

Bugs:

  • last promise from a request could be misused
  • buffer added to gas left check on socket

Fees:

  • Credits are backed by stable and used for transmitter and watcher fees which can be claimed back onchain
  • For doing txs on chain, EOA will need natives which can be gained by depositing on fees plug on chain and can be claimed back.
  • All precompiles have a constant fees
  • callbacks use a fee for constant max gas limit hardcoded in watcher
  • transmitter fee is deducted once the request is executed onchain.
  • users can deposit natives to have credits on evmx
  • withdrawTo uses uint256 instead of FeesData struct
  • Socket fees introduced, 0 for now, will be used in future (SocketFeeManager)
  • on revert, fees is refunded

Events updated:

  • event PlugAdded(address appGateway, uint32 chainSlug, address plug);
  • event ExecutionSuccess(bytes32 payloadId, bool exceededMaxCopy, bytes returnData);
  • event PlugConnected(address plug, bytes32 appGatewayId, address switchboard);
  • event CalledAppGateway(bytes32 triggerId);
  • event TimeoutRequested(bytes32 timeoutId, address target, bytes payload, uint256 executeAt);
  • event RequestCancelledFromGateway(uint40 requestCount);
  • event PlugAdded(bytes32 appGatewayId, uint32 chainSlug, address plug);
  • event TimeoutResolved(
    bytes32 timeoutId,
    address target,
    bytes payload,
    uint256 executedAt,
    bytes returnData
    );
  • event PayloadSubmitted
  • event AppGatewayCallRequested(
    bytes32 callId,
    uint32 chainSlug,
    bytes32 triggerId,
    address switchboard,
    address plug,
    address appGateway,
    bytes32 params,
    bytes overrides,
    bytes payload
    );

@ameeshaagrawal ameeshaagrawal changed the base branch from master to staging April 25, 2025 15:14
@arthcp arthcp merged commit 9fd2518 into staging May 2, 2025
1 check passed
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.

4 participants