altmempools

package
v0.6.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 8 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package altmempool provides functions to pull an alternative mempool config from an IPFS gateway and validate it against a schema.

Schema originally written by @dancoombs: https://hackmd.io/@dancoombs/BJYRz3h8n.

Index

Constants

This section is empty.

Variables

View Source
var (
	Schema, _ = newJSONSchema()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Id   string
	Data map[string]any
}

type Directory

type Directory struct {
	// contains filtered or unexported fields
}

Directory maintains a collection of alternative mempool configurations. It allows a consumer to check if a known alternative mempool exists that will allow specific exceptions that the canonical mempool cannot accept.

func New

func New(chain *big.Int, altMempools []*Config) (*Directory, error)

New accepts an array of alternative mempool configs and returns a Directory.

func NewFromIPFS

func NewFromIPFS(chain *big.Int, ipfsGateway string, ids []string) (*Directory, error)

NewFromIPFS will pull alternative mempool configs from IPFS and returns a Directory. The mempool id is equal to an IPFS CID.

func (*Directory) HasInvalidStorageAccessException

func (d *Directory) HasInvalidStorageAccessException(entity string, contract string, slot string) []string

HasInvalidStorageAccessException will attempt to find all mempools ids that will accept the given invalid storage access pattern and return it. If none is found, an empty array will be returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL