Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

sdk/state: add min and max observation periods #284

@leighmcculloch

Description

@leighmcculloch

The open proposal is included in the open agreement proposal created by the initiator.
https://github.com/stellar/experimental-payment-channels/blob/99c2143a18ae5f389e85ffc488ed220b7d5348c5/sdk/state/open.go#L14-L16

The state.Channel accepts any open proposal regardless of its observation period.
https://github.com/stellar/experimental-payment-channels/blob/99c2143a18ae5f389e85ffc488ed220b7d5348c5/sdk/state/open.go#L228-L245

The channel should have a minimum observation period that represents the minimum time the participant needs to be able to observe changes in the network. Without this an initiator could cause a responder to agree to a channel that the responder is not capable of contesting an early close.

The channel should have a maximum observation period that represents the maximum time the participants is willing to lock up their assets. Without this an initiator could cause a responders assets to be locked up indefinitely.

The open expiry works similar to what we need for the observation period:

https://github.com/stellar/experimental-payment-channels/blob/99c2143a18ae5f389e85ffc488ed220b7d5348c5/sdk/state/state.go#L13-L15

https://github.com/stellar/experimental-payment-channels/blob/99c2143a18ae5f389e85ffc488ed220b7d5348c5/sdk/state/open.go#L239-L242

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions