Skip to content

docs: CometBFT 0.37 RPC Documentation update; Events Now Use String Literals Instead of Base64 #1321

@alijnmerchant21

Description

@alijnmerchant21

Bug Report

CometBFT 0.37 introduced a change where events in RPC responses are now encoded as string literals instead of Base64. However, the documentation has not yet been updated to reflect this code change.

Setup

RPC Event Encoding in CometBFT 0.37

In previous versions of CometBFT, events in RPC responses were Base64 encoded. For example:

 {
    "events": [
      {
        "type": "app",
        "attributes": [
          {
            "key": "YWN0aW9u", 
            "value": "c2VuZA==",   
            "index": false
          }       
        ]
      }    
    ]
  }

However, in CometBFT 0.37, events are now encoded as string literals:

  {
   "events": [
     {
       "type": "app",
       "attributes": [
         {
           "key": "action",
           "value": "send",
           "index": false  
         }         
       ]
     }
   ]
  }

How to reproduce it

To verify that CometBFT 0.37 is actually using string literals for events instead of Base64, you can:

Send a transaction to CometBFT via the RPC API
Check the events field in the response
If the value attributes end in =, they are Base64 encoded
If the value attributes are strings without = at the end, string literals are being used

Anything else we need to know

Outdated Documentation

Despite the code change in CometBFT 0.37 to use string literals for events, the documentation has not yet been updated.

The RPC docs still show events encoded in Base64 even though the code was updated in CometBFT 0.37 to use string literals for events. This is due to outdated documentation that has not been updated to reflect the code changes.

PS: Thank you hdevalence for pointing out the discrepancy.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions