Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Fuel V1.5 | Aggregate Signature and Compressed Transaction Format #48

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

SilentCicero
Copy link
Member

@SilentCicero SilentCicero commented Aug 26, 2020

Changes

  • Integrate BLS Aggregate Signatures
  • Integrate Compressed transaction format

Abstract

This PR outlines Fuel's first steps toward 2400 TPS using BLS aggregate signatures. Here we introduce a new compressed 24 byte transaction format, in addition to BLS aggregate signatures. Combined we were able to achieve 4-5x performance gains over our previous 1.0 model.

We were able to modify our existing Fuel v1.0 model to support a new transaction and signing format.

Benchmarks

For 100k transactions, we only occupied ~3-4 Ethereum blocks total (12.5m - 8m). Which is a significant reduction over our previous 100k benchmark.

Transactions Submitted: 100000
Roots committed: 75
Blocks committed: 1
Cumulative gas used: 32590481
Ethereum blocks used: 3
@100 Gwei: 3.2590481 ETH

Benchmarked Here on Ropsten:
https://ropsten.etherscan.io/address/0x9ac1b016f9ab5aa877ea421291d33903625ecaf6

Root Header

Here we introduce our new root header format to support compressed BLS aggregated signatures.

mstruct RootHeader (
      producer: address,
      merkleTreeRoot: bytes32,
      commitmentHash: bytes32,
      length: uint256,
      feeToken: uint256,
      fee: uint256,

      // Added for compressed transaction and BLS signature support
      transactionType: uint256,
      signatureHash: bytes32
)

Packed Transaction Format

mstruct PackedTransfer (
      metadata: bytes8,
      from: uint32,
      to: uint32,
      transferAmount: uint32,
      changeAmount: uint32
    )

Message Format (for BLS Signatures)

Below is the transaction data to be signed over.

abi.encode(bytes32(packedTransfer), uint256(fee), uint256(rootFee));

Transaction Chunks

The roots are divided into chunks of transactions each containing 32 transactions. Each 32 transaction chunk contains the 2 word BLS aggregate signature for that chunk.

Address Registration

BLS public keys are registered using commitAddress by providing the 4 words in addition to their Ethereum address for registration.

This will be scraped in upcoming versions for a merkle proof oriented solution similar to Hubble's.

@SilentCicero SilentCicero changed the title BLS Integration | Fuel V1.1 Fuel V1.1 | Aggregate Signature and Compressed Transaction Format Aug 26, 2020
@adlerjohn adlerjohn marked this pull request as draft December 31, 2020 17:05
@SilentCicero SilentCicero changed the title Fuel V1.1 | Aggregate Signature and Compressed Transaction Format Fuel V1.5 | Aggregate Signature and Compressed Transaction Format Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant