oasisprotocol / oasisprotocol/oasis-core
nit: does EmitTag contract include not emitting a tag with a key that is already in the tags slice?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 369
- Forks
- 151
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Description of the bug
nit: EmitTag should either be documented as requiring as pre-condition that the key argument not already be in the c.tags slice, or enforce uniqueness and generate an error
EmitTag paired with GetTag feel inconsistent: one can emit duplicate tag entries, and not be able to find any but the first entry.
Steps to reproduce
1.
Expected behavior
Either EmitTag includes as pre-condition that keys are unique in the history of key/value pairs entered as tags to a context, or GetTag should have the ability to find all tag entries with a given key rather than just the first entry.
Environment
- OS:
- Versions of relevant software and tools:
Additional information
Anything else you think would be useful; including context and suggested fixes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read go/tendermint/abci/context.go at the linked EmitTag implementation, then compare its behavior with GetTag. Determine which tag-key contract the API should document or enforce, and verify that the chosen behavior consistently handles repeated keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100