Comments (2)
Thanks for your input! We are currently revising the the BAM-Error
frame and plan changing it into a Close
frame that can be sent by any party at any time. This Close
frame would close the substream (including a reason), thus ending the communication in cases where a message (type) cannot be understood.
The general idea of BAM-Close
(currently named BAM-Error
) was introduced to have a unified way to reject message on the messaging layer, independent of underlying protocols (such as SWAP
).
RFC-002 is already on the specific protocol (SWAP
protocol) layer, thus the error handling is defined as part of the Response
object that defines the decision in the header, which can be accepted
or declined
. If it was declined
the Response
object is defined by the DeclineBody
, which can specify a decline reason, i.e.
{
"type": "RESPONSE",
"id": 0,
"payload": {
"headers": {
"decision": "declined"
},
"body": {
"reason": "...",
"details": "..."
}
}
}
It might seem over-engineered at first. Before we actually only had Request
and Response
- and the Response
defined Error-Codes that would include errors on the messaging layer. However, the Response
is the answer to a Request
and is defined by the underlying protocols and should not leak up to the messaging layer.
Frames are made up of type
and payload
- if an incoming frame defines a type
that is not understood there should be specific error handling for it (detached from the Response
type that defines a response for frames of type Request
), thus the Error
frame was introduced.
from rfcs.
@birnbuazn you might like that: #117
from rfcs.
Related Issues (20)
- Clarify use of headers vs body HOT 2
- Bitcoin ledger definition should use "magic bytes" to identify the network HOT 2
- Add a `role` header to the SWAP REQUEST HOT 2
- Name of SWAP message HOT 1
- Lack of symmetry when processing declined responses HOT 1
- Data type for timestamps in HTLCs HOT 4
- Documentation notes HOT 5
- Public redemption with known secret HOT 3
- Introduce CLOSE frame to RFC-001 HOT 1
- Remove Error Frame from RFC-001
- Embrace libp2p and replace the frame concept with protocols HOT 5
- Establish a shared identifier for a swap as part of a swap request HOT 4
- Change the Bitcoin RFC to use miniscript
- Hackathon requirements for December HOT 2
- COMIT application expiry constraints HOT 2
- Have a concise name for the cryptographic protocol described in RFC003 HOT 11
- Design protocol for integrating LND into cnd HOT 2
- Update Ether/Erc20 HTLC HOT 1
- Update README to include `COMIT spec` header
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfcs.