{"id":21995356,"url":"https://github.com/blinklabs-io/plutigo","last_synced_at":"2026-04-02T10:33:07.004Z","repository":{"id":155686102,"uuid":"632641193","full_name":"blinklabs-io/plutigo","owner":"blinklabs-io","description":"Untyped Plutus Core in Go","archived":false,"fork":false,"pushed_at":"2026-02-07T04:01:18.000Z","size":1112,"stargazers_count":37,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T14:25:10.042Z","etag":null,"topics":["blockchain","cardano","go","golang","plutus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blinklabs-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-04-25T20:39:40.000Z","updated_at":"2026-02-07T03:50:32.000Z","dependencies_parsed_at":"2024-01-29T03:26:12.199Z","dependency_job_id":"d270d38d-8a7b-467b-bbfb-99d1dc58ea07","html_url":"https://github.com/blinklabs-io/plutigo","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/blinklabs-io/plutigo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinklabs-io%2Fplutigo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinklabs-io%2Fplutigo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinklabs-io%2Fplutigo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinklabs-io%2Fplutigo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blinklabs-io","download_url":"https://codeload.github.com/blinklabs-io/plutigo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinklabs-io%2Fplutigo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29353097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"ssl_error","status_checked_at":"2026-02-12T01:00:51.346Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cardano","go","golang","plutus"],"created_at":"2024-11-29T21:14:25.366Z","updated_at":"2026-04-02T10:33:06.996Z","avatar_url":"https://github.com/blinklabs-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plutigo\n\nAn implementation of [Plutus](https://github.com/IntersectMBO/plutus) in pure Go.\n\nThis package aims to only support Untyped Plutus Core because that is all that is needed\nfor a full node. The other stuff like Typed Plutus Core and Plutus IR is for Plinth.\n\n## Features\n\n- Complete Plutus Support: Implements Untyped Plutus Core (UPLC) evaluation\n- Multi-Version Support: Compatible with Plutus V1, V2, V3, and initial Plutus V4 support\n- Cost Model Integration: Automatic cost model selection based on Plutus version (Plutus V4 cost models are placeholders)\n- High Performance: Optimized CEK machine implementation in pure Go\n- Cryptographic Operations: Full BLS12-381 support using gnark-crypto\n- Comprehensive Testing: 49.9% test coverage with fuzz testing and property-based testing\n\n## Supported CIPs\n\nplutigo implements the following Cardano Improvement Proposals (CIPs) related to Plutus Core:\n\n- [CIP-0042](https://cips.cardano.org/cips/cip42/): `serialiseData` builtin for CBOR serialization of Plutus Data\n- [CIP-0049](https://cips.cardano.org/cips/cip49/): ECDSA and Schnorr signature verification builtins\n- [CIP-0058](https://cips.cardano.org/cips/cip58/): Bitwise primitives for integers\n- [CIP-0085](https://cips.cardano.org/cips/cip85/): Sums-of-products (constructor and case expressions)\n- [CIP-0091](https://cips.cardano.org/cips/cip91/): Optimized builtin evaluation (no forced evaluation for saturated calls)\n- [CIP-0101](https://cips.cardano.org/cips/cip101/): `keccak_256` hash function\n- [CIP-0109](https://cips.cardano.org/cips/cip109/): `expModInteger` for modular exponentiation\n- [CIP-0121](https://cips.cardano.org/cips/cip121/): Integer to ByteString conversions\n- [CIP-0122](https://cips.cardano.org/cips/cip122/): Logical operations on ByteString\n- [CIP-0123](https://cips.cardano.org/cips/cip123/): Bitwise operations on ByteString\n- [CIP-0127](https://cips.cardano.org/cips/cip127/): `ripemd_160` hash function\n- [CIP-0132](https://cips.cardano.org/cips/cip132/): `dropList` builtin\n- [CIP-0133](https://cips.cardano.org/cips/cip133/): BLS12-381 multi-scalar multiplication\n- [CIP-0138](https://cips.cardano.org/cips/cip138/): Array type and operations (`lengthOfArray`, `listToArray`, `indexArray`)\n- [CIP-0153](https://cips.cardano.org/cips/cip153/): Mary-era Value builtins (`insertCoin`, `lookupCoin`, `scaleValue`, `unionValue`, `valueContains`)\n- [CIP-0156](https://cips.cardano.org/cips/cip156/): `multiIndexArray` builtin for batch array indexing\n- [CIP-0381](https://cips.cardano.org/cips/cip381/): BLS12-381 pairing operations\n\n### Testing and Conformance\nAll implemented CIPs include comprehensive conformance tests ensuring correct behavior and cost modeling.\n\n## Performance\n\nplutigo is optimized for high-performance Plutus script evaluation:\n\n### Cryptographic Operations (Go 1.24, ARM64)\n- SHA256: 96 ns/op\n- Blake2b-256: 331 ns/op\n- Ed25519 Verify: 251 μs/op\n- ECDSA Verify: 379 μs/op\n- BLS12-381 G1 Add: 3.5 μs/op\n- BLS12-381 Pairing: 3.3 ms/op\n\n### Plutus Script Evaluation\nEvaluates complex smart contracts (Uniswap, vesting, etc.) in milliseconds with accurate cost modeling.\n\n## Architecture\n\n### Core Components\n\n- CEK Machine (`cek/`): Optimized evaluation engine with object pooling and memory-efficient state management\n- Syntax Layer (`syn/`): Parser, pretty-printer, and AST transformations with De Bruijn conversion\n- Builtin Functions (`builtin/`): Complete Plutus builtin function implementations\n- Data Layer (`data/`): CBOR encoding/decoding for Plutus data types\n\n### Design Decisions\n\n- Pure Go: No CGO dependencies for better portability and security\n- Memory Safety: Comprehensive nil-pointer analysis and bounds checking\n- Version Compatibility: Automatic cost model and builtin selection by Plutus version\n- Testing First: Property-based testing and fuzzing ensure correctness\n\n## Usage\n\n### Install\n\n```sh\ngo get github.com/blinklabs-io/plutigo\n```\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/blinklabs-io/plutigo/cek\"\n\t\"github.com/blinklabs-io/plutigo/syn\"\n)\n\nfunc main() {\n\tinput := `\n\t(program 1.2.0\n\t  [\n\t    [\n\t      (builtin addInteger)\n\t      (con integer 1)\n\t    ]\n\t    (con integer 1)\n\t  ]\n\t)\n\t`\n\n\tpprogram, _ := syn.Parse(input)\n\n\tprogram, _ := syn.NameToDeBruijn(pprogram)\n\n\t// Create a machine using the default cost model at protocol major 200.\n\tctx := cek.NewDefaultEvalContext(program.Version, cek.ProtoVersion{Major: 200})\n\tmachine := cek.NewMachine[syn.DeBruijn](program.Version, 0, ctx)\n\n\tterm, _ := machine.Run(program.Term)\n\n\tprettyTerm := syn.PrettyTerm[syn.DeBruijn](term)\n\n\tfmt.Println(prettyTerm) // Output: (con integer 2)\n}\n```\n\n## Plutus Version Support\n\nplutigo supports all major Plutus protocol versions:\n\n- Plutus V1 (1.0.0): Alonzo era - Basic builtin functions\n- Plutus V2 (1.1.0): Vasil era - Additional crypto builtins\n- Plutus V3 (1.2.0+): Chang+ era - Latest features and optimizations\n- Plutus V4 (1.3.0+): Initial support with placeholder cost models\n\nThe library automatically selects appropriate cost models and builtin behavior based on the program version.\n\n## Development\n\n### Prerequisites\n\n- Go 1.24+\n- make\n\n### Setup\n\n```sh\ngit clone https://github.com/blinklabs-io/plutigo.git\ncd plutigo\ngo mod tidy\n```\n\n### Testing\n\n```sh\n# Run all tests\nmake test\n\n# Run benchmarks\nmake bench\n\n# Run fuzz tests\nmake fuzz\n```\n\n### Code Quality\n\nThe project maintains high code quality standards:\n\n- Linting: Passes golangci-lint with zero issues\n- Nil Safety: Passes nilaway static analysis\n- Test Coverage: 49.9% coverage across all packages\n- Fuzz Testing: Continuous fuzzing for parsing and evaluation\n\n## Contributing\n\nWe welcome contributions! Please see our [Development Guide](DEVELOPMENT.md) for setup, workflow, and contribution guidelines.\n\nFor organization-wide policies, see the [Blink Labs Contributing Guide](https://github.com/blinklabs-io/.github/blob/main/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinklabs-io%2Fplutigo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblinklabs-io%2Fplutigo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinklabs-io%2Fplutigo/lists"}