Simplify remote data parsing - #178
Conversation
|
@hugoclrd Can you please confirm this is always the default behavior? Does the API URL ever default to testnet (e.g., when requirement contract addresses are testnet addresses) or any other URL? |
|
@BowTiedRadone |
@hugoclrd Rendezvous needs a remote data object to start an empty simnet session. Here, the remote data didn’t specify an |
|
Ok, I see. await simnet.initEmptySession({ enabled: true })So that you'll let Clarinet handle the default for the API URL, and more importantly, for the block height (which is dynamic - clarinet fetches the latest) |
|
@hugoclrd That makes sense, but only when the user does not explicitly specify an initial height and an API URL. For the rest of the cases, Rendezvous has to mimic the unit tests setup. This means I will remove this line, I will also remove the overwriting step and pass the object as-is. I'm pretty sure we still want to log the warning if enabled is |
Exactly 💯
Not sure in which case you'd want to show a warning. If enabled is |
a286e25 to
60122ab
Compare
remote_data.api_url is unsetCo-authored-by: Nikos Baxevanis <nikos.baxevanis@gmail.com>
|
Love the latest changes 👍 As a side note, rendezvous is one of the few maintained project that build a tool on top of the SDK (since 99% of the SDK users use it to write unit tests). So if you ever think that it could expose more data, or that the API should be different, or that the settings management should be better, etc, please start by opening an issue on Clarinet so that we can try to fix upstream 🙏 We can release fixes pretty quickly. Patching it in rendezvous should always be the last resort |
This PR fixes an inconsistency when users omit
repl.remote_data.api_urlfrom their Clarinet configuration, while still specifying the other fields.Clarinet defaults to the mainnet API URL when
api_urlis unset. Rendezvous treated this as if remote data was disabled and initialized an empty session without using remote data. This caused deployment failures because Rendezvous couldn't find requirements that Clarinet expected to be on mainnetThis updates Rendezvous so it matches Clarinet's behavior.