Uh oh!
There was an error while loading. Please reload this page.
docs(py-sdk): fix Event docstring to gl.chain.Event 📝 - #4
Conversation
Contracts copying the docstring crash at module load: Event is exported only under genlayer.chain since the v0.3 namespace rename, and the top-level lazy __getattr__ is a module loader only, so gl.Event raises AttributeError — surfacing as an opaque accepted-with-VmError deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Re-port of archived-repo PR genlayerlabs/genvm#328 (stranded OPEN by the 2026-07-22 migration), fixing genvm#327: the
Eventclass docstring shows contracts subclassinggl.Event, which raisesAttributeErrorat runtime —Eventis exported only undergenlayer.chainsince the v0.3 namespace rename, and the top-level lazy__getattr__is a module loader only. A contract following the docstring crashes at module load, and because the crashed deploy is still accepted by consensus (accepted-with-VmError), the symptom downstream is "successful deploy, zero events" — this cost the genlayer-node team a full cross-repo debugging cycle while buildinggen_getLogse2e (NOD-322/324). Verified both forms on the v0.6.0-rc1 bundle runner:gl.Event→ VmError + empty emissions;gl.chain.Event→ Return + expected emission.Decision record (carried over from genvm#327, so it isn't lost with the archive)
Restoring a top-level
gl.Eventalias (option 2 of genvm#327) was considered and REJECTED. The v0.2.x → v0.3 rename was deliberate and systematic — the whole flat namespace moved into submodules (gl.Contract→gl.contract.Contract,gl.deploy_contract→gl.contract.deploy,gl.Event→gl.chain.Event, …; see the migration table in the python-sdk v0.3 changelog). A back-alias for exactly one renamed name would erode that consistency, reintroduce two spellings of the same API for docs/examples/goldens to drift between, and create a third state across the already-shipped v0.3 rc line. The compatibility story for v0.2.x contracts is the changelog migration table.Audit
A full-repo grep for
gl.Eventfinds no other fixable site: the v0.3 changelog occurrences are labeled v0.2.x "before" examples (must stay), andtests/cases/stable/py/events/post_event.pyalready usesgl.chain.Event.🤖 Generated with Claude Code