Được TopGit lập chỉ mục từ metadata GitHub: base/pessimism có 1.6k sao, viết chủ yếu bằng Go. Detect real-time threats and events on OP Stack compatible blockchains
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
As of May 28, 2024, Pessimism has been deprecated and is no longer being actively maintained
Because you can't always be optimistic
Pessimism is a public good monitoring service that allows for OP Stack
and EVM compatible blockchains to be
continuously assessed for real-time threats using custom defined
user heuristic rule sets. To learn about Pessimism's architecture,
please advise the documentation.
Warning:
Pessimism is currently experimental and very much in development. It means
Pessimism is currently unstable, so code will change and builds can break
over the coming months. If you come across problems, it would help greatly
to open issues so that we can fix them as quickly as possible.
Setup
To use the template, run the following command(s):
Create local config file (config.env) to store all necessary environmental variables. There's already an example config.env.template in the repo that stores default env vars.
Download or upgrade to golang 1.19.
Install all project golang dependencies by running go mod download.
To Run
Compile pessimism to machine binary by running the following project level command(s):
Using Make: make build-app
To run the compiled binary, you can use the following project level command(s):
Using Make: make run-app
Direct Call: ./bin/pessimism
Docker
Ensure docker is installed on your machine
Pull the latest image from Github container registry (ghcr) via docker pull ghcr.io/base-org/pessimism:latest
Make sure you have followed the above instructions to create a local config file (config.env) using the config.env.template
Run the following:
Without genesis.json:
docker run -p 8080:8080 -p 7300:7300 --env-file=config.env -it ghcr.io/base-org/pessimism:latest
Note: If you want to bootstrap the application and run specific heuristics/paths upon start, update config.env BOOTSTRAP_PATH value to the location of your genesis.json file then run
Building and Running New Images
Run make docker-build at the root of the repository to build a new docker image.
Run make docker-run at the root of the repository to run the new docker image.
Linting
golangci-lint is used to perform code linting.
Configurations are defined in .golangci.yml
It can be ran using the following project level command(s):
Using Make: make lint
Direct Call: golangci-lint run
Linting Markdown Files
To ensure consistent formatting and avoid common mistakes in our Markdown documents,
we use markdownlint. Before submitting a pull request, you can check your Markdown
files for compliance.
Installation
Install Node.js:
If you haven't already, install Node.js.
Install markdownlint CLI globally:
npm install -g markdownlint-cli
Linting with markdownlint
To lint your Markdown files, navigate to the root directory of the project and run:
markdownlint '**/*.md'
If markdownlint reports any issues, please fix them before submitting your pull request.
Testing
Unit Tests
Unit tests are written using the native go test library with test mocks generated using the golang native mock library. These tests live throughout the project's /internal directory and are named with the suffix _test.go.
Unit tests can run using the following project level command(s):
Using Make: make test
Direct Call: go test ./...
Integration Tests
Integration tests are written that leverage the existing op-e2e testing framework for spinning up pieces of the bedrock system. Additionally, the httptest library is used to mock downstream alerting services (e.g. Slack's webhook API). These tests live in the project's /e2e directory.
Running integration tests requires generating devnet allocation files for compatibility with the Optimism monorepo. The following scripts/devnet_allocs.sh can be run to do this generation. If successful, a new .devnet directory will be created in the project's root directory. These allocations should only be regenerated when go.mod rebases to a new monorepo release.
Integration tests can run using the following project level command(s):
Using Make: make e2e-test
Direct Call: go test ./e2e/...
Bootstrap Config
A bootstrap config file is used to define the initial state of the pessimism service. The file must be json formatted with its directive defined in the BOOTSTRAP_PATH env var. (e.g. BOOTSTRAP_PATH=./genesis.json)
base/pessimism có 1.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/base/pessimism. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
base/pessimism có phải mã nguồn mở không?
Có — base/pessimism phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/base/pessimism.
base/pessimism có trang demo không?
Dự án có trang chủ ở https://base-org.github.io/pessimism/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
base/pessimism là gì?
base/pessimism (base/pessimism) là dự án Go trên GitHub. Theo mô tả gốc: Detect real-time threats and events on OP Stack compatible blockchains
Đọc thêm về base/pessimism ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/base/pessimism là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về pessimism?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về pessimism.