{"id":20388217,"url":"https://github.com/chainsafe/fil-actor-states","last_synced_at":"2025-04-12T10:36:16.813Z","repository":{"id":65630295,"uuid":"569286468","full_name":"ChainSafe/fil-actor-states","owner":"ChainSafe","description":"State handling crates for the Filecoin Actors","archived":false,"fork":false,"pushed_at":"2025-04-09T08:53:12.000Z","size":2277,"stargazers_count":3,"open_issues_count":10,"forks_count":2,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-12T06:18:22.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ChainSafe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2022-11-22T13:46:26.000Z","updated_at":"2025-04-01T07:45:34.000Z","dependencies_parsed_at":"2024-04-23T01:28:55.565Z","dependency_job_id":"47566f8f-4123-41e4-a9c7-20f23fb2b2c2","html_url":"https://github.com/ChainSafe/fil-actor-states","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Ffil-actor-states","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Ffil-actor-states/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Ffil-actor-states/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Ffil-actor-states/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChainSafe","download_url":"https://codeload.github.com/ChainSafe/fil-actor-states/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248554210,"owners_count":21123617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-15T03:07:58.299Z","updated_at":"2025-04-12T10:36:16.796Z","avatar_url":"https://github.com/ChainSafe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# State-only versions of the Filecoin Actors (smart-contracts)\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ChainSafe/fil-actor-states/tests.yml?style=for-the-badge)](https://github.com/ChainSafe/fil-actor-states/actions)\n\nThese crates may be used to inspect and validate the internal state of Filecoin\nActors.\n\nFor the smart-contracts, see:\nhttps://github.com/filecoin-project/builtin-actors  \nNOTE: The code in `actors/` and `fil_actors_shared/` is copy-pasted from the\nabove repository. Therefore, it's advised to avoid refactoring such code in\norder to facilitate a smoother version upgrade process and potentially automate\nit.\n\n# Why the copy-paste?\n\nGiven the copy-paste nature of the code, it's important to understand the\nreasons behind it, as it's not obvious at first glance.\n\n## Maintenance\n\nWe copy only a small subset of the code, strictly around actor releases which\nhappen ~3 times a year. This is not a huge burden to maintain.\n\nNote that the approach here is similar to the one in\n[go-state-types](https://github.com/filecoin-project/go-state-types).\n\n## Versioning\n\nThe [builtin-actors](https://github.com/filecoin-project/builtin-actors) are not\nfollowing semver and in the current structure it would be hard to do so.\nDependency update in a particular actor version might require a major version\nbump. Dependencies of the actors code not unified and so actors `vX` might use\ncompletely different version of `cid` than actors `vX+1`. This creates\ncompilation and linking issues in the downstream projects that depend on the\nactors code.\n\n## Security\n\nIn the [builtin-actors](https://github.com/filecoin-project/builtin-actors), the\nprior versions of the actors are not maintained. Any security issues found in\nthe actors code are fixed in the latest version and the older versions are not\nupdated. This creates a security risk for the projects that depend on the actors\ncode (and not the smart-contracts). By copying the code, the projects can\nmaintain the security of the actors code by updating the code to the latest\nversion.\n\n## Tradeoff\n\nGiven the current approach, the code that exists here might not be exactly the\nsame as the one released in the WASM bundles. This shouldn't be an issue, as\nmost of it is not used for calculations but as state definitions.\n\n## Alternative approaches\n\nThe existence of most of the code in the `actors/` and `fil_actors_shared/`\ndirectories could be avoided by having different versioning in the\n[builtin-actors](https://github.com/filecoin-project/builtin-actors). Each actor\nrelease, e.g., `actors_v14`, would be a separate directory in the repository. As\nsuch, it would allow the release to follow semver and keep the dependencies\nacross all actors up-to-date. On the other hand, the code would still need to be\ncopied on new releases so it's shifting the problem rather than solving it. That\nsaid, it's a valid approach and could be considered in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Ffil-actor-states","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainsafe%2Ffil-actor-states","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Ffil-actor-states/lists"}