diff --git a/agreement/msgp_gen.go b/agreement/msgp_gen.go index 5a5efa7ddc..794a9f1bc5 100644 --- a/agreement/msgp_gen.go +++ b/agreement/msgp_gen.go @@ -20,6 +20,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -29,6 +30,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -38,6 +40,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -47,6 +50,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -56,6 +60,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -65,6 +70,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -74,6 +80,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -83,6 +90,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -92,6 +100,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -101,6 +110,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -110,6 +120,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -119,6 +130,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -128,6 +140,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -137,6 +150,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -146,6 +160,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -155,6 +170,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -164,6 +180,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -173,6 +190,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -182,6 +200,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -191,6 +210,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -200,6 +220,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -209,6 +230,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -218,6 +240,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -227,6 +250,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -236,6 +260,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -245,6 +270,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -254,6 +280,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -263,6 +290,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -272,6 +300,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -281,6 +310,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -290,6 +320,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -299,6 +330,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -308,6 +340,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -317,6 +350,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -326,6 +360,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -335,6 +370,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -344,6 +380,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -353,6 +390,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -362,6 +400,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -371,6 +410,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -380,6 +420,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -389,6 +430,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -398,6 +440,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -407,6 +450,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -416,6 +460,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -425,6 +470,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -434,6 +480,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -443,6 +490,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -452,6 +500,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -461,6 +510,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -554,7 +604,12 @@ func (_ *Certificate) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Certificate) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -568,7 +623,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -600,7 +655,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -628,7 +683,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]voteAuthenticator, zb0007) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Votes", zb0001) return @@ -657,7 +712,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVoteAuthenticator, zb0009) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EquivocationVotes", zb0002) return @@ -688,7 +743,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -714,7 +769,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Step = step(zb0012) } case "prop": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return @@ -740,7 +795,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]voteAuthenticator, zb0013) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Votes", zb0001) return @@ -767,7 +822,7 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVoteAuthenticator, zb0015) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EquivocationVotes", zb0002) return @@ -786,6 +841,9 @@ func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Certificate) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Certificate) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Certificate) return ok @@ -843,7 +901,12 @@ func (_ *ConsensusVersionView) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ConsensusVersionView) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ConsensusVersionView) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -880,7 +943,7 @@ func (z *ConsensusVersionView) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Version.UnmarshalMsg(bts) + bts, err = (*z).Version.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Version") return @@ -931,7 +994,7 @@ func (z *ConsensusVersionView) UnmarshalMsg(bts []byte) (o []byte, err error) { } } case "Version": - bts, err = (*z).Version.UnmarshalMsg(bts) + bts, err = (*z).Version.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Version") return @@ -949,6 +1012,9 @@ func (z *ConsensusVersionView) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ConsensusVersionView) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ConsensusVersionView) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ConsensusVersionView) return ok @@ -998,7 +1064,12 @@ func (_ *Deadline) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Deadline) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Deadline) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1082,6 +1153,9 @@ func (z *Deadline) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Deadline) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Deadline) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Deadline) return ok @@ -1120,7 +1194,12 @@ func (_ TimeoutType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TimeoutType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TimeoutType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 int8 zb0001, bts, err = msgp.ReadInt8Bytes(bts) @@ -1134,6 +1213,9 @@ func (z *TimeoutType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TimeoutType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TimeoutType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TimeoutType) return ok @@ -1172,7 +1254,12 @@ func (_ actionType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *actionType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *actionType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint8 zb0001, bts, err = msgp.ReadUint8Bytes(bts) @@ -1186,6 +1273,9 @@ func (z *actionType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *actionType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *actionType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*actionType) return ok @@ -1243,7 +1333,12 @@ func (_ *blockAssembler) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *blockAssembler) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -1257,7 +1352,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Pipeline.UnmarshalMsg(bts) + bts, err = (*z).Pipeline.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Pipeline") return @@ -1273,7 +1368,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Payload.UnmarshalMsg(bts) + bts, err = (*z).Payload.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Payload") return @@ -1304,7 +1399,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Authenticators = make([]vote, zb0004) } for zb0001 := range (*z).Authenticators { - bts, err = (*z).Authenticators[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Authenticators[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Authenticators", zb0001) return @@ -1335,7 +1430,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Pipeline": - bts, err = (*z).Pipeline.UnmarshalMsg(bts) + bts, err = (*z).Pipeline.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Pipeline") return @@ -1347,7 +1442,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "Payload": - bts, err = (*z).Payload.UnmarshalMsg(bts) + bts, err = (*z).Payload.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Payload") return @@ -1374,7 +1469,7 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Authenticators = make([]vote, zb0006) } for zb0001 := range (*z).Authenticators { - bts, err = (*z).Authenticators[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Authenticators[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Authenticators", zb0001) return @@ -1393,6 +1488,9 @@ func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *blockAssembler) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *blockAssembler) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*blockAssembler) return ok @@ -1480,7 +1578,12 @@ func (_ *bundle) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *bundle) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -1494,7 +1597,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).U.UnmarshalMsg(bts) + bts, err = (*z).U.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "U") return @@ -1522,7 +1625,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]vote, zb0005) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Votes", zb0001) return @@ -1551,7 +1654,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVote, zb0007) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EquivocationVotes", zb0002) return @@ -1582,7 +1685,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "u": - bts, err = (*z).U.UnmarshalMsg(bts) + bts, err = (*z).U.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "U") return @@ -1608,7 +1711,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]vote, zb0009) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Votes", zb0001) return @@ -1635,7 +1738,7 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVote, zb0011) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EquivocationVotes", zb0002) return @@ -1654,6 +1757,9 @@ func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *bundle) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *bundle) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*bundle) return ok @@ -1707,7 +1813,12 @@ func (_ *compoundMessage) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *compoundMessage) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1721,7 +1832,7 @@ func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Vote.UnmarshalMsg(bts) + bts, err = (*z).Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Vote") return @@ -1729,7 +1840,7 @@ func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -1759,13 +1870,13 @@ func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Vote": - bts, err = (*z).Vote.UnmarshalMsg(bts) + bts, err = (*z).Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Vote") return } case "Proposal": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return @@ -1783,6 +1894,9 @@ func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *compoundMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *compoundMessage) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*compoundMessage) return ok @@ -1847,7 +1961,12 @@ func (_ *diskState) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *diskState) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *diskState) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -2037,6 +2156,9 @@ func (z *diskState) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *diskState) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *diskState) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*diskState) return ok @@ -2161,7 +2283,12 @@ func (_ *equivocationVote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *equivocationVote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -2175,7 +2302,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -2183,7 +2310,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -2215,7 +2342,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -2234,7 +2361,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } for zb0001 := 0; zb0001 < zb0007; zb0001++ { - bts, err = (*z).Proposals[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposals", zb0001) return @@ -2254,7 +2381,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } for zb0002 := 0; zb0002 < zb0008; zb0002++ { - bts, err = (*z).Sigs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sigs", zb0002) return @@ -2285,13 +2412,13 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -2317,7 +2444,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Step = step(zb0010) } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return @@ -2334,7 +2461,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } for zb0001 := 0; zb0001 < zb0011; zb0001++ { - bts, err = (*z).Proposals[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposals", zb0001) return @@ -2352,7 +2479,7 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } for zb0002 := 0; zb0002 < zb0012; zb0002++ { - bts, err = (*z).Sigs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sigs", zb0002) return @@ -2371,6 +2498,9 @@ func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *equivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *equivocationVote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*equivocationVote) return ok @@ -2441,7 +2571,12 @@ func (_ *equivocationVoteAuthenticator) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *equivocationVoteAuthenticator) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -2455,7 +2590,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err } if zb0003 > 0 { zb0003-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -2463,7 +2598,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err } if zb0003 > 0 { zb0003-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -2482,7 +2617,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err return } for zb0001 := 0; zb0001 < zb0005; zb0001++ { - bts, err = (*z).Sigs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sigs", zb0001) return @@ -2502,7 +2637,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err return } for zb0002 := 0; zb0002 < zb0006; zb0002++ { - bts, err = (*z).Proposals[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposals", zb0002) return @@ -2533,13 +2668,13 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return @@ -2556,7 +2691,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err return } for zb0001 := 0; zb0001 < zb0007; zb0001++ { - bts, err = (*z).Sigs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sigs", zb0001) return @@ -2574,7 +2709,7 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err return } for zb0002 := 0; zb0002 < zb0008; zb0002++ { - bts, err = (*z).Proposals[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposals", zb0002) return @@ -2593,6 +2728,9 @@ func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err return } +func (z *equivocationVoteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *equivocationVoteAuthenticator) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*equivocationVoteAuthenticator) return ok @@ -2643,7 +2781,12 @@ func (_ eventType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *eventType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *eventType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint8 zb0001, bts, err = msgp.ReadUint8Bytes(bts) @@ -2657,6 +2800,9 @@ func (z *eventType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *eventType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *eventType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*eventType) return ok @@ -2704,7 +2850,12 @@ func (_ *freshnessData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *freshnessData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *freshnessData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2718,7 +2869,7 @@ func (z *freshnessData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).PlayerRound.UnmarshalMsg(bts) + bts, err = (*z).PlayerRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "PlayerRound") return @@ -2784,7 +2935,7 @@ func (z *freshnessData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "PlayerRound": - bts, err = (*z).PlayerRound.UnmarshalMsg(bts) + bts, err = (*z).PlayerRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "PlayerRound") return @@ -2832,6 +2983,9 @@ func (z *freshnessData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *freshnessData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *freshnessData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*freshnessData) return ok @@ -2912,7 +3066,12 @@ func (_ *message) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *message) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2926,7 +3085,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).MessageHandle.UnmarshalMsg(bts) + bts, err = (*z).MessageHandle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MessageHandle") return @@ -2934,7 +3093,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Tag.UnmarshalMsg(bts) + bts, err = (*z).Tag.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Tag") return @@ -2942,7 +3101,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Vote.UnmarshalMsg(bts) + bts, err = (*z).Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Vote") return @@ -2950,7 +3109,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -2958,7 +3117,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Bundle.UnmarshalMsg(bts) + bts, err = (*z).Bundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Bundle") return @@ -2966,7 +3125,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UnauthenticatedVote.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedVote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UnauthenticatedVote") return @@ -2974,7 +3133,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UnauthenticatedProposal.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedProposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UnauthenticatedProposal") return @@ -2982,7 +3141,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UnauthenticatedBundle.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedBundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UnauthenticatedBundle") return @@ -3001,7 +3160,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).CompoundMessage.Vote.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CompoundMessage", "struct-from-array", "Vote") return @@ -3009,7 +3168,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CompoundMessage", "struct-from-array", "Proposal") return @@ -3039,13 +3198,13 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Vote": - bts, err = (*z).CompoundMessage.Vote.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CompoundMessage", "Vote") return } case "Proposal": - bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CompoundMessage", "Proposal") return @@ -3084,49 +3243,49 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "MessageHandle": - bts, err = (*z).MessageHandle.UnmarshalMsg(bts) + bts, err = (*z).MessageHandle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MessageHandle") return } case "Tag": - bts, err = (*z).Tag.UnmarshalMsg(bts) + bts, err = (*z).Tag.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Tag") return } case "Vote": - bts, err = (*z).Vote.UnmarshalMsg(bts) + bts, err = (*z).Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Vote") return } case "Proposal": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return } case "Bundle": - bts, err = (*z).Bundle.UnmarshalMsg(bts) + bts, err = (*z).Bundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Bundle") return } case "UnauthenticatedVote": - bts, err = (*z).UnauthenticatedVote.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedVote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UnauthenticatedVote") return } case "UnauthenticatedProposal": - bts, err = (*z).UnauthenticatedProposal.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedProposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UnauthenticatedProposal") return } case "UnauthenticatedBundle": - bts, err = (*z).UnauthenticatedBundle.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedBundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UnauthenticatedBundle") return @@ -3143,7 +3302,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).CompoundMessage.Vote.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CompoundMessage", "struct-from-array", "Vote") return @@ -3151,7 +3310,7 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CompoundMessage", "struct-from-array", "Proposal") return @@ -3181,13 +3340,13 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Vote": - bts, err = (*z).CompoundMessage.Vote.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Vote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CompoundMessage", "Vote") return } case "Proposal": - bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsg(bts) + bts, err = (*z).CompoundMessage.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CompoundMessage", "Proposal") return @@ -3214,6 +3373,9 @@ func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *message) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *message) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*message) return ok @@ -3280,7 +3442,12 @@ func (_ *messageEvent) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *messageEvent) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3306,7 +3473,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Input.UnmarshalMsg(bts) + bts, err = (*z).Input.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Input") return @@ -3355,7 +3522,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Tail == nil { (*z).Tail = new(messageEvent) } - bts, err = (*z).Tail.UnmarshalMsg(bts) + bts, err = (*z).Tail.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Tail") return @@ -3372,7 +3539,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proto") return @@ -3412,7 +3579,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).T = eventType(zb0005) } case "Input": - bts, err = (*z).Input.UnmarshalMsg(bts) + bts, err = (*z).Input.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Input") return @@ -3455,7 +3622,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Tail == nil { (*z).Tail = new(messageEvent) } - bts, err = (*z).Tail.UnmarshalMsg(bts) + bts, err = (*z).Tail.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Tail") return @@ -3468,7 +3635,7 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "Proto": - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proto") return @@ -3486,6 +3653,9 @@ func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *messageEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *messageEvent) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*messageEvent) return ok @@ -3543,7 +3713,12 @@ func (_ *nextThresholdStatusEvent) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *nextThresholdStatusEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *nextThresholdStatusEvent) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3565,7 +3740,7 @@ func (z *nextThresholdStatusEvent) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -3601,7 +3776,7 @@ func (z *nextThresholdStatusEvent) UnmarshalMsg(bts []byte) (o []byte, err error return } case "Proposal": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return @@ -3619,6 +3794,9 @@ func (z *nextThresholdStatusEvent) UnmarshalMsg(bts []byte) (o []byte, err error return } +func (z *nextThresholdStatusEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *nextThresholdStatusEvent) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*nextThresholdStatusEvent) return ok @@ -3657,7 +3835,12 @@ func (_ period) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *period) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *period) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -3671,6 +3854,9 @@ func (z *period) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *period) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *period) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*period) return ok @@ -3737,7 +3923,12 @@ func (_ *periodRouter) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *periodRouter) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -3751,7 +3942,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).ProposalTracker.UnmarshalMsg(bts) + bts, err = (*z).ProposalTracker.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ProposalTracker") return @@ -3759,7 +3950,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).VoteTrackerPeriod.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerPeriod.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteTrackerPeriod") return @@ -3767,7 +3958,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).ProposalTrackerContract.UnmarshalMsg(bts) + bts, err = (*z).ProposalTrackerContract.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ProposalTrackerContract") return @@ -3791,7 +3982,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 step var zb0002 *stepRouter zb0005-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children") return @@ -3806,7 +3997,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(stepRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children", zb0001) return @@ -3839,19 +4030,19 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "ProposalTracker": - bts, err = (*z).ProposalTracker.UnmarshalMsg(bts) + bts, err = (*z).ProposalTracker.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ProposalTracker") return } case "VoteTrackerPeriod": - bts, err = (*z).VoteTrackerPeriod.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerPeriod.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteTrackerPeriod") return } case "ProposalTrackerContract": - bts, err = (*z).ProposalTrackerContract.UnmarshalMsg(bts) + bts, err = (*z).ProposalTrackerContract.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ProposalTrackerContract") return @@ -3873,7 +4064,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 step var zb0002 *stepRouter zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children") return @@ -3888,7 +4079,7 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(stepRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children", zb0001) return @@ -3909,6 +4100,9 @@ func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *periodRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *periodRouter) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*periodRouter) return ok @@ -3997,7 +4191,12 @@ func (_ *player) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *player) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4011,7 +4210,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -4055,7 +4254,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Deadline.UnmarshalMsg(bts) + bts, err = (*z).Deadline.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Deadline") return @@ -4087,7 +4286,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Pending.UnmarshalMsg(bts) + bts, err = (*z).Pending.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Pending") return @@ -4117,7 +4316,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Round": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -4153,7 +4352,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).LastConcluding = step(zb0008) } case "TimersDeadline": - bts, err = (*z).Deadline.UnmarshalMsg(bts) + bts, err = (*z).Deadline.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Deadline") return @@ -4177,7 +4376,7 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "Pending": - bts, err = (*z).Pending.UnmarshalMsg(bts) + bts, err = (*z).Pending.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Pending") return @@ -4195,6 +4394,9 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *player) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*player) return ok @@ -4519,7 +4721,12 @@ func (_ *proposal) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposal) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -4533,7 +4740,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -4541,7 +4748,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Branch") return @@ -4549,7 +4756,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -4557,7 +4764,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -4565,7 +4772,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -4599,7 +4806,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -4607,7 +4814,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -4615,7 +4822,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -4647,7 +4854,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -4655,7 +4862,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -4663,7 +4870,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocol") return @@ -4679,7 +4886,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolVoteBefore") return @@ -4687,7 +4894,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolSwitchOn") return @@ -4695,7 +4902,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -4703,7 +4910,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -4748,12 +4955,12 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking", zb0001) return @@ -4783,7 +4990,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0009) } for zb0003 := range (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0003) return @@ -4792,7 +4999,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Payset") return @@ -4800,7 +5007,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SeedProof") return @@ -4820,7 +5027,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OriginalProposer") return @@ -4850,31 +5057,31 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "prev": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Branch") return } case "seed": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "txn": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -4902,19 +5109,19 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "fees": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -4938,19 +5145,19 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rwcalr": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return } case "proto": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return } case "nextproto": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocol") return @@ -4962,25 +5169,25 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "nextbefore": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolVoteBefore") return } case "nextswitch": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolSwitchOn") return } case "upgradeprop": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -5019,12 +5226,12 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0013-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking", zb0001) return @@ -5052,20 +5259,20 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0015) } for zb0003 := range (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0003) return } } case "txns": - bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Payset") return } case "sdpf": - bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SeedProof") return @@ -5081,7 +5288,7 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.OriginalPeriod = period(zb0017) } case "oprop": - bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "OriginalProposer") return @@ -5099,6 +5306,9 @@ func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposal) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposal) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposal) return ok @@ -5159,7 +5369,12 @@ func (_ *proposalManager) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalManager) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalManager) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -5207,6 +5422,9 @@ func (z *proposalManager) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalManager) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalManager) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalManager) return ok @@ -5251,7 +5469,12 @@ func (_ *proposalSeeker) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalSeeker) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalSeeker) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -5265,7 +5488,7 @@ func (z *proposalSeeker) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Lowest.UnmarshalMsg(bts) + bts, err = (*z).Lowest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Lowest") return @@ -5311,7 +5534,7 @@ func (z *proposalSeeker) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Lowest": - bts, err = (*z).Lowest.UnmarshalMsg(bts) + bts, err = (*z).Lowest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Lowest") return @@ -5341,6 +5564,9 @@ func (z *proposalSeeker) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalSeeker) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalSeeker) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalSeeker) return ok @@ -5415,7 +5641,12 @@ func (_ *proposalStore) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalStore) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0005 int @@ -5445,12 +5676,12 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 period var zb0002 proposalValue zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Relevant") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Relevant", zb0001) return @@ -5460,7 +5691,7 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).Pinned.UnmarshalMsg(bts) + bts, err = (*z).Pinned.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Pinned") return @@ -5484,12 +5715,12 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 proposalValue var zb0004 blockAssembler zb0009-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Assemblers") return } - bts, err = zb0004.UnmarshalMsg(bts) + bts, err = zb0004.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Assemblers", zb0003) return @@ -5537,12 +5768,12 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 period var zb0002 proposalValue zb0011-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Relevant") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Relevant", zb0001) return @@ -5550,7 +5781,7 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Relevant[zb0001] = zb0002 } case "Pinned": - bts, err = (*z).Pinned.UnmarshalMsg(bts) + bts, err = (*z).Pinned.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Pinned") return @@ -5572,12 +5803,12 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 proposalValue var zb0004 blockAssembler zb0013-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Assemblers") return } - bts, err = zb0004.UnmarshalMsg(bts) + bts, err = zb0004.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Assemblers", zb0003) return @@ -5597,6 +5828,9 @@ func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalStore) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalStore) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalStore) return ok @@ -5695,7 +5929,12 @@ func (_ *proposalTable) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalTable) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalTable) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -5740,7 +5979,7 @@ func (z *proposalTable) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(messageEvent) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Pending", zb0001) return @@ -5812,7 +6051,7 @@ func (z *proposalTable) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(messageEvent) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Pending", zb0001) return @@ -5839,6 +6078,9 @@ func (z *proposalTable) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalTable) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalTable) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalTable) return ok @@ -5914,7 +6156,12 @@ func (_ *proposalTracker) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalTracker) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -5944,7 +6191,7 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 bool zb0005-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Duplicate") return @@ -5959,7 +6206,7 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Freezer.UnmarshalMsg(bts) + bts, err = (*z).Freezer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Freezer") return @@ -5967,7 +6214,7 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Staging.UnmarshalMsg(bts) + bts, err = (*z).Staging.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Staging") return @@ -6013,7 +6260,7 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 bool zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Duplicate") return @@ -6026,13 +6273,13 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Duplicate[zb0001] = zb0002 } case "Freezer": - bts, err = (*z).Freezer.UnmarshalMsg(bts) + bts, err = (*z).Freezer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Freezer") return } case "Staging": - bts, err = (*z).Staging.UnmarshalMsg(bts) + bts, err = (*z).Staging.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Staging") return @@ -6050,6 +6297,9 @@ func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalTracker) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalTracker) return ok @@ -6108,7 +6358,12 @@ func (_ *proposalTrackerContract) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalTrackerContract) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -6212,6 +6467,9 @@ func (z *proposalTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *proposalTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalTrackerContract) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalTrackerContract) return ok @@ -6289,7 +6547,12 @@ func (_ *proposalValue) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalValue) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -6315,7 +6578,7 @@ func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OriginalProposer") return @@ -6323,7 +6586,7 @@ func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BlockDigest.UnmarshalMsg(bts) + bts, err = (*z).BlockDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "BlockDigest") return @@ -6331,7 +6594,7 @@ func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).EncodingDigest.UnmarshalMsg(bts) + bts, err = (*z).EncodingDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EncodingDigest") return @@ -6371,19 +6634,19 @@ func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).OriginalPeriod = period(zb0004) } case "oprop": - bts, err = (*z).OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "OriginalProposer") return } case "dig": - bts, err = (*z).BlockDigest.UnmarshalMsg(bts) + bts, err = (*z).BlockDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "BlockDigest") return } case "encdig": - bts, err = (*z).EncodingDigest.UnmarshalMsg(bts) + bts, err = (*z).EncodingDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EncodingDigest") return @@ -6401,6 +6664,9 @@ func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalValue) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalValue) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalValue) return ok @@ -6457,7 +6723,12 @@ func (_ *proposalVoteCounter) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposalVoteCounter) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposalVoteCounter) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -6495,12 +6766,12 @@ func (z *proposalVoteCounter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 vote zb0005-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Votes") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Votes", zb0001) return @@ -6554,12 +6825,12 @@ func (z *proposalVoteCounter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 vote zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Votes") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Votes", zb0001) return @@ -6579,6 +6850,9 @@ func (z *proposalVoteCounter) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposalVoteCounter) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposalVoteCounter) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposalVoteCounter) return ok @@ -6629,7 +6903,12 @@ func (_ *proposerSeed) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *proposerSeed) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -6643,7 +6922,7 @@ func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Addr.UnmarshalMsg(bts) + bts, err = (*z).Addr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Addr") return @@ -6651,7 +6930,7 @@ func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VRF.UnmarshalMsg(bts) + bts, err = (*z).VRF.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VRF") return @@ -6681,13 +6960,13 @@ func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "addr": - bts, err = (*z).Addr.UnmarshalMsg(bts) + bts, err = (*z).Addr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Addr") return } case "vrf": - bts, err = (*z).VRF.UnmarshalMsg(bts) + bts, err = (*z).VRF.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VRF") return @@ -6705,6 +6984,9 @@ func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *proposerSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *proposerSeed) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*proposerSeed) return ok @@ -6791,7 +7073,12 @@ func (_ *rawVote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *rawVote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -6805,7 +7092,7 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -6813,7 +7100,7 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -6845,7 +7132,7 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -6875,13 +7162,13 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -6907,7 +7194,7 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Step = step(zb0006) } case "prop": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return @@ -6925,6 +7212,9 @@ func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *rawVote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *rawVote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*rawVote) return ok @@ -6990,7 +7280,12 @@ func (_ *rootRouter) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *rootRouter) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -7108,7 +7403,7 @@ func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Round var zb0002 *roundRouter zb0009-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children") return @@ -7123,7 +7418,7 @@ func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(roundRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children", zb0001) return @@ -7256,7 +7551,7 @@ func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Round var zb0002 *roundRouter zb0015-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children") return @@ -7271,7 +7566,7 @@ func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(roundRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children", zb0001) return @@ -7292,6 +7587,9 @@ func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *rootRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *rootRouter) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*rootRouter) return ok @@ -7375,7 +7673,12 @@ func (_ *roundRouter) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *roundRouter) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -7389,7 +7692,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).ProposalStore.UnmarshalMsg(bts) + bts, err = (*z).ProposalStore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ProposalStore") return @@ -7408,7 +7711,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteTrackerRound", "struct-from-array", "Freshest") return @@ -7446,7 +7749,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Freshest": - bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteTrackerRound", "Freshest") return @@ -7485,7 +7788,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 period var zb0002 *periodRouter zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children") return @@ -7500,7 +7803,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(periodRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Children", zb0001) return @@ -7533,7 +7836,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "ProposalStore": - bts, err = (*z).ProposalStore.UnmarshalMsg(bts) + bts, err = (*z).ProposalStore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ProposalStore") return @@ -7550,7 +7853,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteTrackerRound", "struct-from-array", "Freshest") return @@ -7588,7 +7891,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Freshest": - bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerRound.Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteTrackerRound", "Freshest") return @@ -7625,7 +7928,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 period var zb0002 *periodRouter zb0011-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children") return @@ -7640,7 +7943,7 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { if zb0002 == nil { zb0002 = new(periodRouter) } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Children", zb0001) return @@ -7661,6 +7964,9 @@ func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *roundRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *roundRouter) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*roundRouter) return ok @@ -7716,7 +8022,12 @@ func (_ *seedInput) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *seedInput) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -7730,7 +8041,7 @@ func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Alpha.UnmarshalMsg(bts) + bts, err = (*z).Alpha.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Alpha") return @@ -7738,7 +8049,7 @@ func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).History.UnmarshalMsg(bts) + bts, err = (*z).History.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "History") return @@ -7768,13 +8079,13 @@ func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "alpha": - bts, err = (*z).Alpha.UnmarshalMsg(bts) + bts, err = (*z).Alpha.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Alpha") return } case "hist": - bts, err = (*z).History.UnmarshalMsg(bts) + bts, err = (*z).History.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "History") return @@ -7792,6 +8103,9 @@ func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *seedInput) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *seedInput) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*seedInput) return ok @@ -7839,7 +8153,12 @@ func (_ *selector) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *selector) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -7853,7 +8172,7 @@ func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -7861,7 +8180,7 @@ func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -7915,13 +8234,13 @@ func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "seed": - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -7959,6 +8278,9 @@ func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *selector) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *selector) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*selector) return ok @@ -7997,7 +8319,12 @@ func (_ serializableError) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *serializableError) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *serializableError) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -8011,6 +8338,9 @@ func (z *serializableError) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *serializableError) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *serializableError) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*serializableError) return ok @@ -8049,7 +8379,12 @@ func (_ step) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *step) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *step) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -8063,6 +8398,9 @@ func (z *step) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *step) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *step) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*step) return ok @@ -8104,7 +8442,12 @@ func (_ *stepRouter) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *stepRouter) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -8118,7 +8461,7 @@ func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteTracker.UnmarshalMsg(bts) + bts, err = (*z).VoteTracker.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteTracker") return @@ -8126,7 +8469,7 @@ func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteTrackerContract.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerContract.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteTrackerContract") return @@ -8156,13 +8499,13 @@ func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "VoteTracker": - bts, err = (*z).VoteTracker.UnmarshalMsg(bts) + bts, err = (*z).VoteTracker.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteTracker") return } case "VoteTrackerContract": - bts, err = (*z).VoteTrackerContract.UnmarshalMsg(bts) + bts, err = (*z).VoteTrackerContract.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteTrackerContract") return @@ -8180,6 +8523,9 @@ func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *stepRouter) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *stepRouter) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*stepRouter) return ok @@ -8236,7 +8582,12 @@ func (_ *thresholdEvent) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *thresholdEvent) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -8262,7 +8613,7 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -8294,7 +8645,7 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -8302,7 +8653,7 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Bundle.UnmarshalMsg(bts) + bts, err = (*z).Bundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Bundle") return @@ -8310,7 +8661,7 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proto") return @@ -8350,7 +8701,7 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).T = eventType(zb0006) } case "Round": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -8376,19 +8727,19 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Step = step(zb0008) } case "Proposal": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return } case "Bundle": - bts, err = (*z).Bundle.UnmarshalMsg(bts) + bts, err = (*z).Bundle.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Bundle") return } case "Proto": - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proto") return @@ -8406,6 +8757,9 @@ func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *thresholdEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *thresholdEvent) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*thresholdEvent) return ok @@ -8739,7 +9093,12 @@ func (_ *transmittedPayload) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *transmittedPayload) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -8753,7 +9112,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -8761,7 +9120,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Branch") return @@ -8769,7 +9128,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -8777,7 +9136,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -8785,7 +9144,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -8819,7 +9178,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -8827,7 +9186,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -8835,7 +9194,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -8867,7 +9226,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -8875,7 +9234,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -8883,7 +9242,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocol") return @@ -8899,7 +9258,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolVoteBefore") return @@ -8907,7 +9266,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolSwitchOn") return @@ -8915,7 +9274,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -8923,7 +9282,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -8968,12 +9327,12 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking", zb0001) return @@ -9003,7 +9362,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0009) } for zb0003 := range (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0003) return @@ -9012,7 +9371,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Payset") return @@ -9020,7 +9379,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SeedProof") return @@ -9040,7 +9399,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OriginalProposer") return @@ -9048,7 +9407,7 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).PriorVote.UnmarshalMsg(bts) + bts, err = (*z).PriorVote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "PriorVote") return @@ -9078,31 +9437,31 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "prev": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Branch") return } case "seed": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "txn": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -9130,19 +9489,19 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "fees": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -9166,19 +9525,19 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rwcalr": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return } case "proto": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return } case "nextproto": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocol") return @@ -9190,25 +9549,25 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "nextbefore": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolVoteBefore") return } case "nextswitch": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolSwitchOn") return } case "upgradeprop": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -9247,12 +9606,12 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0013-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking", zb0001) return @@ -9280,20 +9639,20 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0015) } for zb0003 := range (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0003) return } } case "txns": - bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Payset") return } case "sdpf": - bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SeedProof") return @@ -9309,13 +9668,13 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).unauthenticatedProposal.OriginalPeriod = period(zb0017) } case "oprop": - bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).unauthenticatedProposal.OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "OriginalProposer") return } case "pv": - bts, err = (*z).PriorVote.UnmarshalMsg(bts) + bts, err = (*z).PriorVote.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "PriorVote") return @@ -9333,6 +9692,9 @@ func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *transmittedPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *transmittedPayload) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*transmittedPayload) return ok @@ -9466,7 +9828,12 @@ func (_ *unauthenticatedBundle) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *unauthenticatedBundle) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -9480,7 +9847,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -9512,7 +9879,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposal") return @@ -9540,7 +9907,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]voteAuthenticator, zb0007) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Votes", zb0001) return @@ -9569,7 +9936,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVoteAuthenticator, zb0009) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EquivocationVotes", zb0002) return @@ -9600,7 +9967,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -9626,7 +9993,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Step = step(zb0012) } case "prop": - bts, err = (*z).Proposal.UnmarshalMsg(bts) + bts, err = (*z).Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposal") return @@ -9652,7 +10019,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Votes = make([]voteAuthenticator, zb0013) } for zb0001 := range (*z).Votes { - bts, err = (*z).Votes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Votes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Votes", zb0001) return @@ -9679,7 +10046,7 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).EquivocationVotes = make([]equivocationVoteAuthenticator, zb0015) } for zb0002 := range (*z).EquivocationVotes { - bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsg(bts) + bts, err = (*z).EquivocationVotes[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EquivocationVotes", zb0002) return @@ -9698,6 +10065,9 @@ func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *unauthenticatedBundle) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *unauthenticatedBundle) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*unauthenticatedBundle) return ok @@ -9820,7 +10190,12 @@ func (_ *unauthenticatedEquivocationVote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *unauthenticatedEquivocationVote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -9834,7 +10209,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er } if zb0003 > 0 { zb0003-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -9842,7 +10217,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er } if zb0003 > 0 { zb0003-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -9874,7 +10249,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er } if zb0003 > 0 { zb0003-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -9893,7 +10268,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er return } for zb0001 := 0; zb0001 < zb0007; zb0001++ { - bts, err = (*z).Proposals[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proposals", zb0001) return @@ -9913,7 +10288,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er return } for zb0002 := 0; zb0002 < zb0008; zb0002++ { - bts, err = (*z).Sigs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sigs", zb0002) return @@ -9944,13 +10319,13 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return @@ -9976,7 +10351,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er (*z).Step = step(zb0010) } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return @@ -9993,7 +10368,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er return } for zb0001 := 0; zb0001 < zb0011; zb0001++ { - bts, err = (*z).Proposals[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proposals[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proposals", zb0001) return @@ -10011,7 +10386,7 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er return } for zb0002 := 0; zb0002 < zb0012; zb0002++ { - bts, err = (*z).Sigs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Sigs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sigs", zb0002) return @@ -10030,6 +10405,9 @@ func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, er return } +func (z *unauthenticatedEquivocationVote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *unauthenticatedEquivocationVote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*unauthenticatedEquivocationVote) return ok @@ -10366,7 +10744,12 @@ func (_ *unauthenticatedProposal) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *unauthenticatedProposal) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -10380,7 +10763,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -10388,7 +10771,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Branch") return @@ -10396,7 +10779,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -10404,7 +10787,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -10412,7 +10795,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -10446,7 +10829,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -10454,7 +10837,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -10462,7 +10845,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -10494,7 +10877,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -10502,7 +10885,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -10510,7 +10893,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocol") return @@ -10526,7 +10909,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolVoteBefore") return @@ -10534,7 +10917,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolSwitchOn") return @@ -10542,7 +10925,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -10550,7 +10933,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -10595,12 +10978,12 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking", zb0001) return @@ -10630,7 +11013,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0009) } for zb0003 := range (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0003) return @@ -10639,7 +11022,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Payset") return @@ -10647,7 +11030,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).SeedProof.UnmarshalMsg(bts) + bts, err = (*z).SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SeedProof") return @@ -10667,7 +11050,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0004 > 0 { zb0004-- - bts, err = (*z).OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OriginalProposer") return @@ -10697,31 +11080,31 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) } switch string(field) { case "rnd": - bts, err = (*z).Block.BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "prev": - bts, err = (*z).Block.BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Branch") return } case "seed": - bts, err = (*z).Block.BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "txn": - bts, err = (*z).Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -10749,19 +11132,19 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) return } case "gh": - bts, err = (*z).Block.BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "fees": - bts, err = (*z).Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -10785,19 +11168,19 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) return } case "rwcalr": - bts, err = (*z).Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return } case "proto": - bts, err = (*z).Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return } case "nextproto": - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocol") return @@ -10809,25 +11192,25 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) return } case "nextbefore": - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolVoteBefore") return } case "nextswitch": - bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolSwitchOn") return } case "upgradeprop": - bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -10866,12 +11249,12 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) var zb0001 protocol.StateProofType var zb0002 bookkeeping.StateProofTrackingData zb0013-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking", zb0001) return @@ -10899,20 +11282,20 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0015) } for zb0003 := range (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0003) return } } case "txns": - bts, err = (*z).Block.Payset.UnmarshalMsg(bts) + bts, err = (*z).Block.Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Payset") return } case "sdpf": - bts, err = (*z).SeedProof.UnmarshalMsg(bts) + bts, err = (*z).SeedProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SeedProof") return @@ -10928,7 +11311,7 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).OriginalPeriod = period(zb0017) } case "oprop": - bts, err = (*z).OriginalProposer.UnmarshalMsg(bts) + bts, err = (*z).OriginalProposer.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "OriginalProposer") return @@ -10946,6 +11329,9 @@ func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *unauthenticatedProposal) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *unauthenticatedProposal) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*unauthenticatedProposal) return ok @@ -11038,7 +11424,12 @@ func (_ *unauthenticatedVote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *unauthenticatedVote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -11052,7 +11443,7 @@ func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).R.UnmarshalMsg(bts) + bts, err = (*z).R.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "R") return @@ -11060,7 +11451,7 @@ func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -11068,7 +11459,7 @@ func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -11098,19 +11489,19 @@ func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "r": - bts, err = (*z).R.UnmarshalMsg(bts) + bts, err = (*z).R.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "R") return } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return } case "sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -11128,6 +11519,9 @@ func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *unauthenticatedVote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *unauthenticatedVote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*unauthenticatedVote) return ok @@ -11196,7 +11590,12 @@ func (_ *vote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *vote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -11210,7 +11609,7 @@ func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).R.UnmarshalMsg(bts) + bts, err = (*z).R.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "R") return @@ -11218,7 +11617,7 @@ func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -11226,7 +11625,7 @@ func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -11256,19 +11655,19 @@ func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "r": - bts, err = (*z).R.UnmarshalMsg(bts) + bts, err = (*z).R.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "R") return } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return } case "sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -11286,6 +11685,9 @@ func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *vote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *vote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*vote) return ok @@ -11322,7 +11724,12 @@ func (_ *voteAggregator) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteAggregator) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteAggregator) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -11370,6 +11777,9 @@ func (z *voteAggregator) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteAggregator) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteAggregator) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteAggregator) return ok @@ -11426,7 +11836,12 @@ func (_ *voteAuthenticator) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteAuthenticator) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -11440,7 +11855,7 @@ func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -11448,7 +11863,7 @@ func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cred") return @@ -11456,7 +11871,7 @@ func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -11486,19 +11901,19 @@ func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "cred": - bts, err = (*z).Cred.UnmarshalMsg(bts) + bts, err = (*z).Cred.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cred") return } case "sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -11516,6 +11931,9 @@ func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteAuthenticator) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteAuthenticator) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteAuthenticator) return ok @@ -11608,7 +12026,12 @@ func (_ *voteTracker) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteTracker) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0007 int @@ -11638,12 +12061,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 vote zb0009-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Voters") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Voters", zb0001) return @@ -11669,12 +12092,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 proposalValue var zb0004 proposalVoteCounter zb0011-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Counts") return } - bts, err = zb0004.UnmarshalMsg(bts) + bts, err = zb0004.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Counts", zb0003) return @@ -11700,12 +12123,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 basics.Address var zb0006 equivocationVote zb0013-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Equivocators") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Equivocators", zb0005) return @@ -11761,12 +12184,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 vote zb0015-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Voters") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Voters", zb0001) return @@ -11790,12 +12213,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 proposalValue var zb0004 proposalVoteCounter zb0017-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Counts") return } - bts, err = zb0004.UnmarshalMsg(bts) + bts, err = zb0004.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Counts", zb0003) return @@ -11819,12 +12242,12 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 basics.Address var zb0006 equivocationVote zb0019-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Equivocators") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Equivocators", zb0005) return @@ -11850,6 +12273,9 @@ func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteTracker) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteTracker) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteTracker) return ok @@ -11927,7 +12353,12 @@ func (_ *voteTrackerContract) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteTrackerContract) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -12025,6 +12456,9 @@ func (z *voteTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteTrackerContract) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteTrackerContract) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteTrackerContract) return ok @@ -12069,7 +12503,12 @@ func (_ *voteTrackerPeriod) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteTrackerPeriod) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -12102,7 +12541,7 @@ func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Cached.Proposal.UnmarshalMsg(bts) + bts, err = (*z).Cached.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cached", "struct-from-array", "Proposal") return @@ -12138,7 +12577,7 @@ func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "Proposal": - bts, err = (*z).Cached.Proposal.UnmarshalMsg(bts) + bts, err = (*z).Cached.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Cached", "Proposal") return @@ -12196,7 +12635,7 @@ func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).Cached.Proposal.UnmarshalMsg(bts) + bts, err = (*z).Cached.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cached", "struct-from-array", "Proposal") return @@ -12232,7 +12671,7 @@ func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "Proposal": - bts, err = (*z).Cached.Proposal.UnmarshalMsg(bts) + bts, err = (*z).Cached.Proposal.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Cached", "Proposal") return @@ -12259,6 +12698,9 @@ func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteTrackerPeriod) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteTrackerPeriod) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteTrackerPeriod) return ok @@ -12300,7 +12742,12 @@ func (_ *voteTrackerRound) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *voteTrackerRound) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *voteTrackerRound) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -12314,7 +12761,7 @@ func (z *voteTrackerRound) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Freshest.UnmarshalMsg(bts) + bts, err = (*z).Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Freshest") return @@ -12352,7 +12799,7 @@ func (z *voteTrackerRound) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Freshest": - bts, err = (*z).Freshest.UnmarshalMsg(bts) + bts, err = (*z).Freshest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Freshest") return @@ -12376,6 +12823,9 @@ func (z *voteTrackerRound) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *voteTrackerRound) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *voteTrackerRound) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*voteTrackerRound) return ok diff --git a/crypto/merklearray/msgp_gen.go b/crypto/merklearray/msgp_gen.go index 35aa264fb1..db308439e0 100644 --- a/crypto/merklearray/msgp_gen.go +++ b/crypto/merklearray/msgp_gen.go @@ -13,6 +13,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -22,6 +23,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -31,6 +33,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -39,6 +42,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -68,7 +72,12 @@ func (_ Layer) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Layer) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Layer) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0002 int var zb0003 bool zb0002, zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) @@ -89,7 +98,7 @@ func (z *Layer) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z) = make(Layer, zb0002) } for zb0001 := range *z { - bts, err = (*z)[zb0001].UnmarshalMsg(bts) + bts, err = (*z)[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, zb0001) return @@ -99,6 +108,9 @@ func (z *Layer) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Layer) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Layer) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Layer) return ok @@ -178,7 +190,12 @@ func (_ *Proof) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Proof) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -212,7 +229,7 @@ func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Path = make([]crypto.GenericDigest, zb0004) } for zb0001 := range (*z).Path { - bts, err = (*z).Path[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Path[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Path", zb0001) return @@ -221,7 +238,7 @@ func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).HashFactory.UnmarshalMsg(bts) + bts, err = (*z).HashFactory.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "HashFactory") return @@ -279,14 +296,14 @@ func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Path = make([]crypto.GenericDigest, zb0006) } for zb0001 := range (*z).Path { - bts, err = (*z).Path[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Path[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Path", zb0001) return } } case "hsh": - bts, err = (*z).HashFactory.UnmarshalMsg(bts) + bts, err = (*z).HashFactory.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "HashFactory") return @@ -310,6 +327,9 @@ func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Proof) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Proof) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Proof) return ok @@ -392,7 +412,12 @@ func (_ *SingleLeafProof) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SingleLeafProof) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -426,7 +451,7 @@ func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Proof.Path = make([]crypto.GenericDigest, zb0004) } for zb0001 := range (*z).Proof.Path { - bts, err = (*z).Proof.Path[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proof.Path[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Path", zb0001) return @@ -435,7 +460,7 @@ func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Proof.HashFactory.UnmarshalMsg(bts) + bts, err = (*z).Proof.HashFactory.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "HashFactory") return @@ -493,14 +518,14 @@ func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Proof.Path = make([]crypto.GenericDigest, zb0006) } for zb0001 := range (*z).Proof.Path { - bts, err = (*z).Proof.Path[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Proof.Path[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Path", zb0001) return } } case "hsh": - bts, err = (*z).Proof.HashFactory.UnmarshalMsg(bts) + bts, err = (*z).Proof.HashFactory.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "HashFactory") return @@ -524,6 +549,9 @@ func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SingleLeafProof) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SingleLeafProof) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SingleLeafProof) return ok @@ -613,7 +641,12 @@ func (_ *Tree) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Tree) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -667,7 +700,7 @@ func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Levels[zb0001] = make(Layer, zb0007) } for zb0002 := range (*z).Levels[zb0001] { - bts, err = (*z).Levels[zb0001][zb0002].UnmarshalMsg(bts) + bts, err = (*z).Levels[zb0001][zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Levels", zb0001, zb0002) return @@ -685,7 +718,7 @@ func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Hash.UnmarshalMsg(bts) + bts, err = (*z).Hash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Hash") return @@ -763,7 +796,7 @@ func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Levels[zb0001] = make(Layer, zb0011) } for zb0002 := range (*z).Levels[zb0001] { - bts, err = (*z).Levels[zb0001][zb0002].UnmarshalMsg(bts) + bts, err = (*z).Levels[zb0001][zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Levels", zb0001, zb0002) return @@ -777,7 +810,7 @@ func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "hsh": - bts, err = (*z).Hash.UnmarshalMsg(bts) + bts, err = (*z).Hash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Hash") return @@ -801,6 +834,9 @@ func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Tree) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Tree) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Tree) return ok diff --git a/crypto/merklesignature/msgp_gen.go b/crypto/merklesignature/msgp_gen.go index cd8a00d4e8..8cac8a7395 100644 --- a/crypto/merklesignature/msgp_gen.go +++ b/crypto/merklesignature/msgp_gen.go @@ -14,6 +14,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -23,6 +24,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -32,6 +34,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -41,6 +44,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -50,6 +54,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -59,6 +64,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -78,7 +84,12 @@ func (_ *Commitment) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Commitment) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Commitment) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -88,6 +99,9 @@ func (z *Commitment) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Commitment) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Commitment) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Commitment) return ok @@ -152,7 +166,12 @@ func (_ *KeyRoundPair) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *KeyRoundPair) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *KeyRoundPair) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -184,7 +203,7 @@ func (z *KeyRoundPair) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Key == nil { (*z).Key = new(crypto.FalconSigner) } - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Key") return @@ -231,7 +250,7 @@ func (z *KeyRoundPair) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Key == nil { (*z).Key = new(crypto.FalconSigner) } - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Key") return @@ -250,6 +269,9 @@ func (z *KeyRoundPair) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *KeyRoundPair) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *KeyRoundPair) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*KeyRoundPair) return ok @@ -324,7 +346,12 @@ func (_ *Secrets) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Secrets) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Secrets) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -354,7 +381,7 @@ func (z *Secrets) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).SignerContext.Tree.UnmarshalMsg(bts) + bts, err = (*z).SignerContext.Tree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Tree") return @@ -396,7 +423,7 @@ func (z *Secrets) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "tree": - bts, err = (*z).SignerContext.Tree.UnmarshalMsg(bts) + bts, err = (*z).SignerContext.Tree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Tree") return @@ -414,6 +441,9 @@ func (z *Secrets) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Secrets) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Secrets) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Secrets) return ok @@ -491,7 +521,12 @@ func (_ *Signature) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Signature) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -505,7 +540,7 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Signature") return @@ -521,7 +556,7 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proof.UnmarshalMsg(bts) + bts, err = (*z).Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proof") return @@ -529,7 +564,7 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VerifyingKey.UnmarshalMsg(bts) + bts, err = (*z).VerifyingKey.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VerifyingKey") return @@ -559,7 +594,7 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "sig": - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Signature") return @@ -571,13 +606,13 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "prf": - bts, err = (*z).Proof.UnmarshalMsg(bts) + bts, err = (*z).Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proof") return } case "vkey": - bts, err = (*z).VerifyingKey.UnmarshalMsg(bts) + bts, err = (*z).VerifyingKey.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VerifyingKey") return @@ -595,6 +630,9 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Signature) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Signature) return ok @@ -663,7 +701,12 @@ func (_ *SignerContext) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SignerContext) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SignerContext) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -693,7 +736,7 @@ func (z *SignerContext) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Tree.UnmarshalMsg(bts) + bts, err = (*z).Tree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Tree") return @@ -735,7 +778,7 @@ func (z *SignerContext) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "tree": - bts, err = (*z).Tree.UnmarshalMsg(bts) + bts, err = (*z).Tree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Tree") return @@ -753,6 +796,9 @@ func (z *SignerContext) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SignerContext) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SignerContext) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SignerContext) return ok @@ -812,7 +858,12 @@ func (_ *Verifier) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Verifier) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Verifier) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -888,6 +939,9 @@ func (z *Verifier) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Verifier) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Verifier) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Verifier) return ok diff --git a/crypto/msgp_gen.go b/crypto/msgp_gen.go index 7d7364de88..ab5bdceb88 100644 --- a/crypto/msgp_gen.go +++ b/crypto/msgp_gen.go @@ -15,6 +15,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -24,6 +25,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -33,6 +35,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -42,6 +45,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -51,6 +55,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -60,6 +65,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -69,6 +75,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -78,6 +85,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -87,6 +95,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -96,6 +105,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -105,6 +115,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -114,6 +125,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -123,6 +135,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -132,6 +145,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -141,6 +155,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -150,6 +165,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -159,6 +175,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -168,6 +185,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -177,6 +195,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -186,6 +205,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -195,6 +215,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -204,6 +225,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -213,6 +235,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -222,6 +245,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -231,6 +255,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -240,6 +265,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -249,6 +275,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -258,6 +285,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -267,6 +295,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -276,6 +305,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -285,6 +315,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -294,6 +325,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -303,6 +335,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -312,6 +345,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -331,7 +365,12 @@ func (_ *Digest) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Digest) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Digest) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -341,6 +380,9 @@ func (z *Digest) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Digest) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Digest) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Digest) return ok @@ -377,7 +419,12 @@ func (_ *FalconPrivateKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconPrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconPrivateKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -387,6 +434,9 @@ func (z *FalconPrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconPrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconPrivateKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconPrivateKey) return ok @@ -423,7 +473,12 @@ func (_ *FalconPublicKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconPublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconPublicKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -433,6 +488,9 @@ func (z *FalconPublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconPublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconPublicKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconPublicKey) return ok @@ -469,7 +527,12 @@ func (_ *FalconSeed) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconSeed) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -479,6 +542,9 @@ func (z *FalconSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconSeed) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconSeed) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconSeed) return ok @@ -518,7 +584,12 @@ func (_ FalconSignature) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconSignature) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 []byte var zb0002 int @@ -542,6 +613,9 @@ func (z *FalconSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconSignature) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconSignature) return ok @@ -601,7 +675,12 @@ func (_ *FalconSigner) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconSigner) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconSigner) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -677,6 +756,9 @@ func (z *FalconSigner) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconSigner) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconSigner) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconSigner) return ok @@ -732,7 +814,12 @@ func (_ *FalconVerifier) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *FalconVerifier) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *FalconVerifier) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -794,6 +881,9 @@ func (z *FalconVerifier) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *FalconVerifier) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *FalconVerifier) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*FalconVerifier) return ok @@ -834,7 +924,12 @@ func (_ GenericDigest) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *GenericDigest) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *GenericDigest) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 []byte var zb0002 int @@ -858,6 +953,9 @@ func (z *GenericDigest) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *GenericDigest) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *GenericDigest) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*GenericDigest) return ok @@ -908,7 +1006,12 @@ func (_ *HashFactory) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *HashFactory) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *HashFactory) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -981,6 +1084,9 @@ func (z *HashFactory) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *HashFactory) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *HashFactory) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*HashFactory) return ok @@ -1019,7 +1125,12 @@ func (_ HashType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *HashType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *HashType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint16 zb0001, bts, err = msgp.ReadUint16Bytes(bts) @@ -1033,6 +1144,9 @@ func (z *HashType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *HashType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *HashType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*HashType) return ok @@ -1068,7 +1182,12 @@ func (_ *MasterDerivationKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *MasterDerivationKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *MasterDerivationKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -1078,6 +1197,9 @@ func (z *MasterDerivationKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *MasterDerivationKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *MasterDerivationKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*MasterDerivationKey) return ok @@ -1154,7 +1276,12 @@ func (_ *MultisigSig) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *MultisigSig) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *MultisigSig) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -1204,7 +1331,7 @@ func (z *MultisigSig) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Subsigs = make([]MultisigSubsig, zb0004) } for zb0001 := range (*z).Subsigs { - bts, err = (*z).Subsigs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Subsigs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Subsigs", zb0001) return @@ -1267,7 +1394,7 @@ func (z *MultisigSig) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Subsigs = make([]MultisigSubsig, zb0006) } for zb0001 := range (*z).Subsigs { - bts, err = (*z).Subsigs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Subsigs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Subsigs", zb0001) return @@ -1286,6 +1413,9 @@ func (z *MultisigSig) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *MultisigSig) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *MultisigSig) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*MultisigSig) return ok @@ -1350,7 +1480,12 @@ func (_ *MultisigSubsig) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *MultisigSubsig) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *MultisigSubsig) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -1426,6 +1561,9 @@ func (z *MultisigSubsig) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *MultisigSubsig) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *MultisigSubsig) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*MultisigSubsig) return ok @@ -1484,7 +1622,12 @@ func (_ *OneTimeSignature) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignature) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0007 int @@ -1616,6 +1759,9 @@ func (z *OneTimeSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *OneTimeSignature) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignature) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignature) return ok @@ -1751,7 +1897,12 @@ func (_ *OneTimeSignatureSecrets) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignatureSecrets) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0006 int @@ -1796,7 +1947,7 @@ func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).OneTimeSignatureSecretsPersistent.Batches = make([]ephemeralSubkey, zb0008) } for zb0002 := range (*z).OneTimeSignatureSecretsPersistent.Batches { - bts, err = (*z).OneTimeSignatureSecretsPersistent.Batches[zb0002].UnmarshalMsg(bts) + bts, err = (*z).OneTimeSignatureSecretsPersistent.Batches[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Batches", zb0002) return @@ -1828,7 +1979,7 @@ func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).OneTimeSignatureSecretsPersistent.Offsets = make([]ephemeralSubkey, zb0010) } for zb0003 := range (*z).OneTimeSignatureSecretsPersistent.Offsets { - bts, err = (*z).OneTimeSignatureSecretsPersistent.Offsets[zb0003].UnmarshalMsg(bts) + bts, err = (*z).OneTimeSignatureSecretsPersistent.Offsets[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Offsets", zb0003) return @@ -1902,7 +2053,7 @@ func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).OneTimeSignatureSecretsPersistent.Batches = make([]ephemeralSubkey, zb0012) } for zb0002 := range (*z).OneTimeSignatureSecretsPersistent.Batches { - bts, err = (*z).OneTimeSignatureSecretsPersistent.Batches[zb0002].UnmarshalMsg(bts) + bts, err = (*z).OneTimeSignatureSecretsPersistent.Batches[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Batches", zb0002) return @@ -1930,7 +2081,7 @@ func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) (*z).OneTimeSignatureSecretsPersistent.Offsets = make([]ephemeralSubkey, zb0014) } for zb0003 := range (*z).OneTimeSignatureSecretsPersistent.Offsets { - bts, err = (*z).OneTimeSignatureSecretsPersistent.Offsets[zb0003].UnmarshalMsg(bts) + bts, err = (*z).OneTimeSignatureSecretsPersistent.Offsets[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Offsets", zb0003) return @@ -1961,6 +2112,9 @@ func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *OneTimeSignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignatureSecrets) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignatureSecrets) return ok @@ -2101,7 +2255,12 @@ func (_ *OneTimeSignatureSecretsPersistent) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0006 int @@ -2146,7 +2305,7 @@ func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, (*z).Batches = make([]ephemeralSubkey, zb0008) } for zb0002 := range (*z).Batches { - bts, err = (*z).Batches[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Batches[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Batches", zb0002) return @@ -2178,7 +2337,7 @@ func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, (*z).Offsets = make([]ephemeralSubkey, zb0010) } for zb0003 := range (*z).Offsets { - bts, err = (*z).Offsets[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Offsets[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Offsets", zb0003) return @@ -2252,7 +2411,7 @@ func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, (*z).Batches = make([]ephemeralSubkey, zb0012) } for zb0002 := range (*z).Batches { - bts, err = (*z).Batches[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Batches[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Batches", zb0002) return @@ -2280,7 +2439,7 @@ func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, (*z).Offsets = make([]ephemeralSubkey, zb0014) } for zb0003 := range (*z).Offsets { - bts, err = (*z).Offsets[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Offsets[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Offsets", zb0003) return @@ -2311,6 +2470,9 @@ func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, return } +func (z *OneTimeSignatureSecretsPersistent) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignatureSecretsPersistent) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignatureSecretsPersistent) return ok @@ -2374,7 +2536,12 @@ func (_ *OneTimeSignatureSubkeyBatchID) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignatureSubkeyBatchID) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignatureSubkeyBatchID) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2450,6 +2617,9 @@ func (z *OneTimeSignatureSubkeyBatchID) UnmarshalMsg(bts []byte) (o []byte, err return } +func (z *OneTimeSignatureSubkeyBatchID) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignatureSubkeyBatchID) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignatureSubkeyBatchID) return ok @@ -2497,7 +2667,12 @@ func (_ *OneTimeSignatureSubkeyOffsetID) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignatureSubkeyOffsetID) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignatureSubkeyOffsetID) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2587,6 +2762,9 @@ func (z *OneTimeSignatureSubkeyOffsetID) UnmarshalMsg(bts []byte) (o []byte, err return } +func (z *OneTimeSignatureSubkeyOffsetID) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignatureSubkeyOffsetID) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignatureSubkeyOffsetID) return ok @@ -2625,7 +2803,12 @@ func (_ *OneTimeSignatureVerifier) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OneTimeSignatureVerifier) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OneTimeSignatureVerifier) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -2635,6 +2818,9 @@ func (z *OneTimeSignatureVerifier) UnmarshalMsg(bts []byte) (o []byte, err error return } +func (z *OneTimeSignatureVerifier) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OneTimeSignatureVerifier) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OneTimeSignatureVerifier) return ok @@ -2671,7 +2857,12 @@ func (_ *PrivateKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *PrivateKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -2681,6 +2872,9 @@ func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *PrivateKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*PrivateKey) return ok @@ -2717,7 +2911,12 @@ func (_ *PublicKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *PublicKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -2727,6 +2926,9 @@ func (z *PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *PublicKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*PublicKey) return ok @@ -2763,7 +2965,12 @@ func (_ *Seed) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Seed) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -2773,6 +2980,9 @@ func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Seed) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Seed) return ok @@ -2809,7 +3019,12 @@ func (_ *Signature) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Signature) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -2819,6 +3034,9 @@ func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Signature) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Signature) return ok @@ -2861,7 +3079,12 @@ func (_ *SignatureSecrets) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SignatureSecrets) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -2937,6 +3160,9 @@ func (z *SignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SignatureSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SignatureSecrets) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SignatureSecrets) return ok @@ -2983,7 +3209,12 @@ func (_ *VRFSecrets) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *VRFSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *VRFSecrets) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -3059,6 +3290,9 @@ func (z *VRFSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *VRFSecrets) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *VRFSecrets) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*VRFSecrets) return ok @@ -3099,7 +3333,12 @@ func (_ *VrfOutput) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *VrfOutput) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *VrfOutput) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3109,6 +3348,9 @@ func (z *VrfOutput) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *VrfOutput) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *VrfOutput) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*VrfOutput) return ok @@ -3145,7 +3387,12 @@ func (_ *VrfPrivkey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *VrfPrivkey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *VrfPrivkey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3155,6 +3402,9 @@ func (z *VrfPrivkey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *VrfPrivkey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *VrfPrivkey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*VrfPrivkey) return ok @@ -3191,7 +3441,12 @@ func (_ *VrfProof) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *VrfProof) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *VrfProof) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3201,6 +3456,9 @@ func (z *VrfProof) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *VrfProof) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *VrfProof) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*VrfProof) return ok @@ -3237,7 +3495,12 @@ func (_ *VrfPubkey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *VrfPubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *VrfPubkey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3247,6 +3510,9 @@ func (z *VrfPubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *VrfPubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *VrfPubkey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*VrfPubkey) return ok @@ -3283,7 +3549,12 @@ func (_ *ed25519PrivateKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ed25519PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ed25519PrivateKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3293,6 +3564,9 @@ func (z *ed25519PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ed25519PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ed25519PrivateKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ed25519PrivateKey) return ok @@ -3329,7 +3603,12 @@ func (_ *ed25519PublicKey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ed25519PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ed25519PublicKey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3339,6 +3618,9 @@ func (z *ed25519PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ed25519PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ed25519PublicKey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ed25519PublicKey) return ok @@ -3375,7 +3657,12 @@ func (_ *ed25519Seed) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ed25519Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ed25519Seed) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3385,6 +3672,9 @@ func (z *ed25519Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ed25519Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ed25519Seed) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ed25519Seed) return ok @@ -3421,7 +3711,12 @@ func (_ *ed25519Signature) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ed25519Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ed25519Signature) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -3431,6 +3726,9 @@ func (z *ed25519Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ed25519Signature) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ed25519Signature) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ed25519Signature) return ok @@ -3479,7 +3777,12 @@ func (_ *ephemeralSubkey) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ephemeralSubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ephemeralSubkey) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0005 int @@ -3583,6 +3886,9 @@ func (z *ephemeralSubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ephemeralSubkey) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ephemeralSubkey) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ephemeralSubkey) return ok diff --git a/crypto/stateproof/msgp_gen.go b/crypto/stateproof/msgp_gen.go index 94c84f000a..51b3dc3848 100644 --- a/crypto/stateproof/msgp_gen.go +++ b/crypto/stateproof/msgp_gen.go @@ -18,6 +18,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -27,6 +28,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -36,6 +38,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -45,6 +48,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -54,6 +58,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -63,6 +68,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -82,7 +88,12 @@ func (_ *MessageHash) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *MessageHash) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *MessageHash) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -92,6 +103,9 @@ func (z *MessageHash) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *MessageHash) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *MessageHash) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*MessageHash) return ok @@ -208,7 +222,12 @@ func (_ *Prover) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Prover) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -258,7 +277,7 @@ func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ProverPersistedFields.Participants = make([]basics.Participant, zb0006) } for zb0002 := range (*z).ProverPersistedFields.Participants { - bts, err = (*z).ProverPersistedFields.Participants[zb0002].UnmarshalMsg(bts) + bts, err = (*z).ProverPersistedFields.Participants[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Participants", zb0002) return @@ -277,7 +296,7 @@ func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).ProverPersistedFields.Parttree == nil { (*z).ProverPersistedFields.Parttree = new(merklearray.Tree) } - bts, err = (*z).ProverPersistedFields.Parttree.UnmarshalMsg(bts) + bts, err = (*z).ProverPersistedFields.Parttree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Parttree") return @@ -364,7 +383,7 @@ func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ProverPersistedFields.Participants = make([]basics.Participant, zb0008) } for zb0002 := range (*z).ProverPersistedFields.Participants { - bts, err = (*z).ProverPersistedFields.Participants[zb0002].UnmarshalMsg(bts) + bts, err = (*z).ProverPersistedFields.Participants[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Participants", zb0002) return @@ -381,7 +400,7 @@ func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).ProverPersistedFields.Parttree == nil { (*z).ProverPersistedFields.Parttree = new(merklearray.Tree) } - bts, err = (*z).ProverPersistedFields.Parttree.UnmarshalMsg(bts) + bts, err = (*z).ProverPersistedFields.Parttree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Parttree") return @@ -418,6 +437,9 @@ func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Prover) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Prover) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Prover) return ok @@ -551,7 +573,12 @@ func (_ *ProverPersistedFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ProverPersistedFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -601,7 +628,7 @@ func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Participants = make([]basics.Participant, zb0005) } for zb0002 := range (*z).Participants { - bts, err = (*z).Participants[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Participants[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Participants", zb0002) return @@ -620,7 +647,7 @@ func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Parttree == nil { (*z).Parttree = new(merklearray.Tree) } - bts, err = (*z).Parttree.UnmarshalMsg(bts) + bts, err = (*z).Parttree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Parttree") return @@ -707,7 +734,7 @@ func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Participants = make([]basics.Participant, zb0007) } for zb0002 := range (*z).Participants { - bts, err = (*z).Participants[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Participants[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Participants", zb0002) return @@ -724,7 +751,7 @@ func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Parttree == nil { (*z).Parttree = new(merklearray.Tree) } - bts, err = (*z).Parttree.UnmarshalMsg(bts) + bts, err = (*z).Parttree.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Parttree") return @@ -761,6 +788,9 @@ func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ProverPersistedFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ProverPersistedFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ProverPersistedFields) return ok @@ -860,7 +890,12 @@ func (_ *Reveal) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Reveal) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -885,7 +920,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).SigSlot.Sig.UnmarshalMsg(bts) + bts, err = (*z).SigSlot.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SigSlot", "struct-from-array", "Sig") return @@ -923,7 +958,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "s": - bts, err = (*z).SigSlot.Sig.UnmarshalMsg(bts) + bts, err = (*z).SigSlot.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SigSlot", "Sig") return @@ -946,7 +981,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Part.UnmarshalMsg(bts) + bts, err = (*z).Part.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Part") return @@ -987,7 +1022,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).SigSlot.Sig.UnmarshalMsg(bts) + bts, err = (*z).SigSlot.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SigSlot", "struct-from-array", "Sig") return @@ -1025,7 +1060,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "s": - bts, err = (*z).SigSlot.Sig.UnmarshalMsg(bts) + bts, err = (*z).SigSlot.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SigSlot", "Sig") return @@ -1046,7 +1081,7 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { } } case "p": - bts, err = (*z).Part.UnmarshalMsg(bts) + bts, err = (*z).Part.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Part") return @@ -1064,6 +1099,9 @@ func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Reveal) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Reveal) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Reveal) return ok @@ -1190,7 +1228,12 @@ func (_ *StateProof) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProof) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -1204,7 +1247,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).SigCommit.UnmarshalMsg(bts) + bts, err = (*z).SigCommit.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SigCommit") return @@ -1220,7 +1263,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).SigProofs.UnmarshalMsg(bts) + bts, err = (*z).SigProofs.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SigProofs") return @@ -1228,7 +1271,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).PartProofs.UnmarshalMsg(bts) + bts, err = (*z).PartProofs.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "PartProofs") return @@ -1270,7 +1313,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "struct-from-array", "Reveals") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Reveals", zb0001) return @@ -1331,7 +1374,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "c": - bts, err = (*z).SigCommit.UnmarshalMsg(bts) + bts, err = (*z).SigCommit.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SigCommit") return @@ -1343,13 +1386,13 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "S": - bts, err = (*z).SigProofs.UnmarshalMsg(bts) + bts, err = (*z).SigProofs.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SigProofs") return } case "P": - bts, err = (*z).PartProofs.UnmarshalMsg(bts) + bts, err = (*z).PartProofs.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "PartProofs") return @@ -1387,7 +1430,7 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "Reveals") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Reveals", zb0001) return @@ -1434,6 +1477,9 @@ func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateProof) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProof) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProof) return ok @@ -1515,7 +1561,12 @@ func (_ *sigslotCommit) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *sigslotCommit) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *sigslotCommit) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1529,7 +1580,7 @@ func (z *sigslotCommit) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -1567,7 +1618,7 @@ func (z *sigslotCommit) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "s": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -1591,6 +1642,9 @@ func (z *sigslotCommit) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *sigslotCommit) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *sigslotCommit) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*sigslotCommit) return ok diff --git a/daemon/algod/api/spec/v2/msgp_gen.go b/daemon/algod/api/spec/v2/msgp_gen.go index 140399c19c..f8afb04767 100644 --- a/daemon/algod/api/spec/v2/msgp_gen.go +++ b/daemon/algod/api/spec/v2/msgp_gen.go @@ -13,6 +13,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -22,6 +23,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -73,7 +75,12 @@ func (_ *AccountApplicationModel) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AccountApplicationModel) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -97,7 +104,7 @@ func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) if (*z).AppLocalState == nil { (*z).AppLocalState = new(basics.AppLocalState) } - bts, err = (*z).AppLocalState.UnmarshalMsg(bts) + bts, err = (*z).AppLocalState.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppLocalState") return @@ -116,7 +123,7 @@ func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) if (*z).AppParams == nil { (*z).AppParams = new(basics.AppParams) } - bts, err = (*z).AppParams.UnmarshalMsg(bts) + bts, err = (*z).AppParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppParams") return @@ -157,7 +164,7 @@ func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) if (*z).AppLocalState == nil { (*z).AppLocalState = new(basics.AppLocalState) } - bts, err = (*z).AppLocalState.UnmarshalMsg(bts) + bts, err = (*z).AppLocalState.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppLocalState") return @@ -174,7 +181,7 @@ func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) if (*z).AppParams == nil { (*z).AppParams = new(basics.AppParams) } - bts, err = (*z).AppParams.UnmarshalMsg(bts) + bts, err = (*z).AppParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppParams") return @@ -193,6 +200,9 @@ func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *AccountApplicationModel) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AccountApplicationModel) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AccountApplicationModel) return ok @@ -274,7 +284,12 @@ func (_ *AccountAssetModel) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AccountAssetModel) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -298,7 +313,7 @@ func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).AssetParams == nil { (*z).AssetParams = new(basics.AssetParams) } - bts, err = (*z).AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams") return @@ -317,7 +332,7 @@ func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).AssetHolding == nil { (*z).AssetHolding = new(basics.AssetHolding) } - bts, err = (*z).AssetHolding.UnmarshalMsg(bts) + bts, err = (*z).AssetHolding.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetHolding") return @@ -358,7 +373,7 @@ func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).AssetParams == nil { (*z).AssetParams = new(basics.AssetParams) } - bts, err = (*z).AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams") return @@ -375,7 +390,7 @@ func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).AssetHolding == nil { (*z).AssetHolding = new(basics.AssetHolding) } - bts, err = (*z).AssetHolding.UnmarshalMsg(bts) + bts, err = (*z).AssetHolding.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetHolding") return @@ -394,6 +409,9 @@ func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AccountAssetModel) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AccountAssetModel) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AccountAssetModel) return ok diff --git a/data/account/msgp_gen.go b/data/account/msgp_gen.go index 3bef76693b..36459a83f3 100644 --- a/data/account/msgp_gen.go +++ b/data/account/msgp_gen.go @@ -15,6 +15,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -24,6 +25,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -103,7 +105,12 @@ func (_ *ParticipationKeyIdentity) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ParticipationKeyIdentity) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -117,7 +124,7 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).Parent.UnmarshalMsg(bts) + bts, err = (*z).Parent.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Parent") return @@ -125,7 +132,7 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).VRFSK.UnmarshalMsg(bts) + bts, err = (*z).VRFSK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VRFSK") return @@ -133,7 +140,7 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -141,7 +148,7 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).FirstValid.UnmarshalMsg(bts) + bts, err = (*z).FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FirstValid") return @@ -149,7 +156,7 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).LastValid.UnmarshalMsg(bts) + bts, err = (*z).LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastValid") return @@ -187,31 +194,31 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error } switch string(field) { case "addr": - bts, err = (*z).Parent.UnmarshalMsg(bts) + bts, err = (*z).Parent.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Parent") return } case "vrfsk": - bts, err = (*z).VRFSK.UnmarshalMsg(bts) + bts, err = (*z).VRFSK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VRFSK") return } case "vote-id": - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "fv": - bts, err = (*z).FirstValid.UnmarshalMsg(bts) + bts, err = (*z).FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FirstValid") return } case "lv": - bts, err = (*z).LastValid.UnmarshalMsg(bts) + bts, err = (*z).LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LastValid") return @@ -235,6 +242,9 @@ func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error return } +func (z *ParticipationKeyIdentity) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ParticipationKeyIdentity) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ParticipationKeyIdentity) return ok @@ -280,7 +290,12 @@ func (_ StateProofKeys) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProofKeys) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProofKeys) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0002 int var zb0003 bool zb0002, zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) @@ -301,7 +316,7 @@ func (z *StateProofKeys) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z) = make(StateProofKeys, zb0002) } for zb0001 := range *z { - bts, err = (*z)[zb0001].UnmarshalMsg(bts) + bts, err = (*z)[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, zb0001) return @@ -311,6 +326,9 @@ func (z *StateProofKeys) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateProofKeys) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProofKeys) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProofKeys) return ok diff --git a/data/basics/msgp_gen.go b/data/basics/msgp_gen.go index 274b6c2b17..06190153d6 100644 --- a/data/basics/msgp_gen.go +++ b/data/basics/msgp_gen.go @@ -17,6 +17,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -26,6 +27,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -34,6 +36,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -43,6 +46,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -52,6 +56,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -61,6 +66,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -70,6 +76,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -79,6 +86,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -88,6 +96,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -97,6 +106,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -106,6 +116,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -115,6 +126,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -124,6 +136,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -133,6 +146,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -142,6 +156,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -151,6 +166,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -160,6 +176,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -169,6 +186,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -178,6 +196,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -187,6 +206,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -196,6 +216,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -205,6 +226,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -214,6 +236,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -519,7 +542,12 @@ func (_ *AccountData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AccountData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0009 int @@ -545,7 +573,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MicroAlgos") return @@ -561,7 +589,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardedMicroAlgos") return @@ -569,7 +597,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -577,7 +605,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -585,7 +613,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -646,12 +674,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 AssetIndex var zb0002 AssetParams zb0014-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams", zb0001) return @@ -682,7 +710,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 AssetIndex var zb0004 AssetHolding zb0016-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Assets") return @@ -761,7 +789,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -790,12 +818,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 AppIndex var zb0006 AppLocalState zb0020-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppLocalStates") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppLocalStates", zb0005) return @@ -826,12 +854,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0007 AppIndex var zb0008 AppParams zb0022-- - bts, err = zb0007.UnmarshalMsg(bts) + bts, err = zb0007.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppParams") return } - bts, err = zb0008.UnmarshalMsg(bts) + bts, err = zb0008.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppParams", zb0007) return @@ -969,7 +997,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Status = Status(zb0026) } case "algo": - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MicroAlgos") return @@ -981,25 +1009,25 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "ern": - bts, err = (*z).RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardedMicroAlgos") return } case "vote": - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "sel": - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "stprf": - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return @@ -1052,12 +1080,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 AssetIndex var zb0002 AssetParams zb0029-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams", zb0001) return @@ -1086,7 +1114,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 AssetIndex var zb0004 AssetHolding zb0031-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Assets") return @@ -1163,7 +1191,7 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Assets[zb0003] = zb0004 } case "spend": - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return @@ -1190,12 +1218,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 AppIndex var zb0006 AppLocalState zb0035-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppLocalStates") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppLocalStates", zb0005) return @@ -1224,12 +1252,12 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0007 AppIndex var zb0008 AppParams zb0037-- - bts, err = zb0007.UnmarshalMsg(bts) + bts, err = zb0007.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppParams") return } - bts, err = zb0008.UnmarshalMsg(bts) + bts, err = zb0008.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppParams", zb0007) return @@ -1337,6 +1365,9 @@ func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AccountData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AccountData) return ok @@ -1429,6 +1460,9 @@ func (_ *Address) CanMarshalMsg(z interface{}) bool { func (z *Address) UnmarshalMsg(bts []byte) ([]byte, error) { return ((*(crypto.Digest))(z)).UnmarshalMsg(bts) } +func (z *Address) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) ([]byte, error) { + return ((*(crypto.Digest))(z)).UnmarshalMsgWithState(bts, st) +} func (_ *Address) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Address) return ok @@ -1465,7 +1499,12 @@ func (_ AppIndex) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AppIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AppIndex) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -1479,6 +1518,9 @@ func (z *AppIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AppIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AppIndex) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AppIndex) return ok @@ -1575,7 +1617,12 @@ func (_ *AppLocalState) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AppLocalState) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -1687,7 +1734,7 @@ func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "struct-from-array", "KeyValue") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "KeyValue", zb0001) return @@ -1815,7 +1862,7 @@ func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "KeyValue") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "KeyValue", zb0001) return @@ -1835,6 +1882,9 @@ func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AppLocalState) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AppLocalState) return ok @@ -2001,7 +2051,12 @@ func (_ *AppParams) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AppParams) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -2077,7 +2132,7 @@ func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "struct-from-array", "GlobalState") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GlobalState", zb0001) return @@ -2319,7 +2374,7 @@ func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "GlobalState") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GlobalState", zb0001) return @@ -2485,6 +2540,9 @@ func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AppParams) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AppParams) return ok @@ -2558,7 +2616,12 @@ func (_ *AssetHolding) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetHolding) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetHolding) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2634,6 +2697,9 @@ func (z *AssetHolding) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AssetHolding) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetHolding) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetHolding) return ok @@ -2672,7 +2738,12 @@ func (_ AssetIndex) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetIndex) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -2686,6 +2757,9 @@ func (z *AssetIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AssetIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetIndex) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetIndex) return ok @@ -2826,7 +2900,12 @@ func (_ *AssetParams) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetParams) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2926,7 +3005,7 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Manager.UnmarshalMsg(bts) + bts, err = (*z).Manager.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Manager") return @@ -2934,7 +3013,7 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Reserve.UnmarshalMsg(bts) + bts, err = (*z).Reserve.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Reserve") return @@ -2942,7 +3021,7 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Freeze.UnmarshalMsg(bts) + bts, err = (*z).Freeze.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Freeze") return @@ -2950,7 +3029,7 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Clawback.UnmarshalMsg(bts) + bts, err = (*z).Clawback.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Clawback") return @@ -3052,25 +3131,25 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "m": - bts, err = (*z).Manager.UnmarshalMsg(bts) + bts, err = (*z).Manager.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Manager") return } case "r": - bts, err = (*z).Reserve.UnmarshalMsg(bts) + bts, err = (*z).Reserve.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Reserve") return } case "f": - bts, err = (*z).Freeze.UnmarshalMsg(bts) + bts, err = (*z).Freeze.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Freeze") return } case "c": - bts, err = (*z).Clawback.UnmarshalMsg(bts) + bts, err = (*z).Clawback.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Clawback") return @@ -3088,6 +3167,9 @@ func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetParams) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetParams) return ok @@ -3418,7 +3500,12 @@ func (_ *BalanceRecord) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BalanceRecord) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0009 int @@ -3432,7 +3519,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).Addr.UnmarshalMsg(bts) + bts, err = (*z).Addr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Addr") return @@ -3452,7 +3539,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).AccountData.MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MicroAlgos") return @@ -3468,7 +3555,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).AccountData.RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardedMicroAlgos") return @@ -3476,7 +3563,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -3484,7 +3571,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -3492,7 +3579,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -3553,12 +3640,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 AssetIndex var zb0002 AssetParams zb0014-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams", zb0001) return @@ -3589,7 +3676,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 AssetIndex var zb0004 AssetHolding zb0016-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Assets") return @@ -3668,7 +3755,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).AccountData.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AccountData.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -3697,12 +3784,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 AppIndex var zb0006 AppLocalState zb0020-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppLocalStates") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppLocalStates", zb0005) return @@ -3733,12 +3820,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0007 AppIndex var zb0008 AppParams zb0022-- - bts, err = zb0007.UnmarshalMsg(bts) + bts, err = zb0007.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppParams") return } - bts, err = zb0008.UnmarshalMsg(bts) + bts, err = zb0008.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AppParams", zb0007) return @@ -3866,7 +3953,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "addr": - bts, err = (*z).Addr.UnmarshalMsg(bts) + bts, err = (*z).Addr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Addr") return @@ -3882,7 +3969,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).AccountData.Status = Status(zb0026) } case "algo": - bts, err = (*z).AccountData.MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).AccountData.MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MicroAlgos") return @@ -3894,25 +3981,25 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "ern": - bts, err = (*z).AccountData.RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).AccountData.RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardedMicroAlgos") return } case "vote": - bts, err = (*z).AccountData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "sel": - bts, err = (*z).AccountData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "stprf": - bts, err = (*z).AccountData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).AccountData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return @@ -3965,12 +4052,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 AssetIndex var zb0002 AssetParams zb0029-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams", zb0001) return @@ -3999,7 +4086,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0003 AssetIndex var zb0004 AssetHolding zb0031-- - bts, err = zb0003.UnmarshalMsg(bts) + bts, err = zb0003.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Assets") return @@ -4076,7 +4163,7 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).AccountData.Assets[zb0003] = zb0004 } case "spend": - bts, err = (*z).AccountData.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AccountData.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return @@ -4103,12 +4190,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0005 AppIndex var zb0006 AppLocalState zb0035-- - bts, err = zb0005.UnmarshalMsg(bts) + bts, err = zb0005.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppLocalStates") return } - bts, err = zb0006.UnmarshalMsg(bts) + bts, err = zb0006.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppLocalStates", zb0005) return @@ -4137,12 +4224,12 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0007 AppIndex var zb0008 AppParams zb0037-- - bts, err = zb0007.UnmarshalMsg(bts) + bts, err = zb0007.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppParams") return } - bts, err = zb0008.UnmarshalMsg(bts) + bts, err = zb0008.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AppParams", zb0007) return @@ -4250,6 +4337,9 @@ func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BalanceRecord) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BalanceRecord) return ok @@ -4345,7 +4435,12 @@ func (_ CreatableIndex) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *CreatableIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *CreatableIndex) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -4359,6 +4454,9 @@ func (z *CreatableIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *CreatableIndex) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *CreatableIndex) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*CreatableIndex) return ok @@ -4397,7 +4495,12 @@ func (_ CreatableType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *CreatableType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *CreatableType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -4411,6 +4514,9 @@ func (z *CreatableType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *CreatableType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *CreatableType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*CreatableType) return ok @@ -4449,7 +4555,12 @@ func (_ DeltaAction) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *DeltaAction) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *DeltaAction) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -4463,6 +4574,9 @@ func (z *DeltaAction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *DeltaAction) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *DeltaAction) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*DeltaAction) return ok @@ -4522,7 +4636,12 @@ func (_ *Participant) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Participant) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Participant) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4536,7 +4655,7 @@ func (z *Participant) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).PK.UnmarshalMsg(bts) + bts, err = (*z).PK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "PK") return @@ -4574,7 +4693,7 @@ func (z *Participant) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "p": - bts, err = (*z).PK.UnmarshalMsg(bts) + bts, err = (*z).PK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "PK") return @@ -4598,6 +4717,9 @@ func (z *Participant) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Participant) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Participant) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Participant) return ok @@ -4636,7 +4758,12 @@ func (_ Round) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Round) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Round) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -4650,6 +4777,9 @@ func (z *Round) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Round) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Round) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Round) return ok @@ -4688,7 +4818,12 @@ func (_ RoundInterval) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *RoundInterval) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *RoundInterval) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -4702,6 +4837,9 @@ func (z *RoundInterval) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *RoundInterval) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *RoundInterval) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*RoundInterval) return ok @@ -4755,7 +4893,12 @@ func (_ StateDelta) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateDelta) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0003 int var zb0004 bool zb0003, zb0004, bts, err = msgp.ReadMapHeaderBytes(bts) @@ -4782,7 +4925,7 @@ func (z *StateDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err) return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, zb0001) return @@ -4793,6 +4936,9 @@ func (z *StateDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateDelta) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateDelta) return ok @@ -4863,7 +5009,12 @@ func (_ *StateSchema) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateSchema) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateSchema) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4939,6 +5090,9 @@ func (z *StateSchema) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateSchema) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateSchema) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateSchema) return ok @@ -5042,7 +5196,12 @@ func (_ *StateSchemas) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateSchemas) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateSchemas) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -5374,6 +5533,9 @@ func (z *StateSchemas) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateSchemas) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateSchemas) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateSchemas) return ok @@ -5412,7 +5574,12 @@ func (_ Status) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Status) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Status) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 byte zb0001, bts, err = msgp.ReadByteBytes(bts) @@ -5426,6 +5593,9 @@ func (z *Status) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Status) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Status) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Status) return ok @@ -5479,7 +5649,12 @@ func (_ TealKeyValue) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TealKeyValue) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TealKeyValue) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0003 int var zb0004 bool zb0003, zb0004, bts, err = msgp.ReadMapHeaderBytes(bts) @@ -5506,7 +5681,7 @@ func (z *TealKeyValue) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err) return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, zb0001) return @@ -5517,6 +5692,9 @@ func (z *TealKeyValue) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TealKeyValue) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TealKeyValue) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TealKeyValue) return ok @@ -5566,7 +5744,12 @@ func (_ TealType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TealType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TealType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -5580,6 +5763,9 @@ func (z *TealType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TealType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TealType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TealType) return ok @@ -5648,7 +5834,12 @@ func (_ *TealValue) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TealValue) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TealValue) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -5746,6 +5937,9 @@ func (z *TealValue) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TealValue) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TealValue) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TealValue) return ok @@ -5816,7 +6010,12 @@ func (_ *ValueDelta) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ValueDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ValueDelta) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -5934,6 +6133,9 @@ func (z *ValueDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ValueDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ValueDelta) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ValueDelta) return ok diff --git a/data/basics/units.go b/data/basics/units.go index fbbb55eb92..c1b8f413b2 100644 --- a/data/basics/units.go +++ b/data/basics/units.go @@ -94,6 +94,14 @@ func (*MicroAlgos) CanUnmarshalMsg(z interface{}) bool { // UnmarshalMsg implements msgp.Unmarshaler func (a *MicroAlgos) UnmarshalMsg(bts []byte) (o []byte, err error) { + return a.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} + +// UnmarshalMsgWithState implements msgp.Unmarshaler +func (a *MicroAlgos) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + return nil, msgp.ErrMaxDepthExceeded{} + } a.Raw, o, err = msgp.ReadUint64Bytes(bts) return } diff --git a/data/bookkeeping/msgp_gen.go b/data/bookkeeping/msgp_gen.go index 6ccafb53ad..7eda4de555 100644 --- a/data/bookkeeping/msgp_gen.go +++ b/data/bookkeeping/msgp_gen.go @@ -20,6 +20,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -29,6 +30,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -37,6 +39,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -46,6 +49,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -55,6 +59,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -64,6 +69,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -73,6 +79,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -82,6 +89,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -91,6 +99,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -100,6 +109,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -109,6 +119,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -118,6 +129,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -402,7 +414,12 @@ func (_ *Block) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Block) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -416,7 +433,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -424,7 +441,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Branch") return @@ -432,7 +449,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -440,7 +457,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -448,7 +465,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -482,7 +499,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -490,7 +507,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -498,7 +515,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -530,7 +547,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -538,7 +555,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -546,7 +563,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocol") return @@ -562,7 +579,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolVoteBefore") return @@ -570,7 +587,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolSwitchOn") return @@ -578,7 +595,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -586,7 +603,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -631,12 +648,12 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 StateProofTrackingData zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking", zb0001) return @@ -666,7 +683,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0009) } for zb0003 := range (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0003) return @@ -675,7 +692,7 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).Payset.UnmarshalMsg(bts) + bts, err = (*z).Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Payset") return @@ -705,31 +722,31 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).BlockHeader.Round.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "prev": - bts, err = (*z).BlockHeader.Branch.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Branch") return } case "seed": - bts, err = (*z).BlockHeader.Seed.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "txn": - bts, err = (*z).BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -757,19 +774,19 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).BlockHeader.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "fees": - bts, err = (*z).BlockHeader.RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).BlockHeader.RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -793,19 +810,19 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rwcalr": - bts, err = (*z).BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return } case "proto": - bts, err = (*z).BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return } case "nextproto": - bts, err = (*z).BlockHeader.UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocol") return @@ -817,25 +834,25 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "nextbefore": - bts, err = (*z).BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolVoteBefore") return } case "nextswitch": - bts, err = (*z).BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolSwitchOn") return } case "upgradeprop": - bts, err = (*z).BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -874,12 +891,12 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 StateProofTrackingData zb0012-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking", zb0001) return @@ -907,14 +924,14 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0014) } for zb0003 := range (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0003) return } } case "txns": - bts, err = (*z).Payset.UnmarshalMsg(bts) + bts, err = (*z).Payset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Payset") return @@ -932,6 +949,9 @@ func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Block) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Block) return ok @@ -990,6 +1010,9 @@ func (_ *BlockHash) CanMarshalMsg(z interface{}) bool { func (z *BlockHash) UnmarshalMsg(bts []byte) ([]byte, error) { return ((*(crypto.Digest))(z)).UnmarshalMsg(bts) } +func (z *BlockHash) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) ([]byte, error) { + return ((*(crypto.Digest))(z)).UnmarshalMsgWithState(bts, st) +} func (_ *BlockHash) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BlockHash) return ok @@ -1276,7 +1299,12 @@ func (_ *BlockHeader) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BlockHeader) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -1290,7 +1318,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -1298,7 +1326,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).Branch.UnmarshalMsg(bts) + bts, err = (*z).Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Branch") return @@ -1306,7 +1334,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -1314,7 +1342,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -1322,7 +1350,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -1356,7 +1384,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -1364,7 +1392,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -1372,7 +1400,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -1404,7 +1432,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -1412,7 +1440,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -1420,7 +1448,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocol") return @@ -1436,7 +1464,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolVoteBefore") return @@ -1444,7 +1472,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NextProtocolSwitchOn") return @@ -1452,7 +1480,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -1460,7 +1488,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -1505,12 +1533,12 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 StateProofTrackingData zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofTracking", zb0001) return @@ -1540,7 +1568,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0009) } for zb0003 := range (*z).ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0003) return @@ -1571,31 +1599,31 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rnd": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "prev": - bts, err = (*z).Branch.UnmarshalMsg(bts) + bts, err = (*z).Branch.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Branch") return } case "seed": - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "txn": - bts, err = (*z).TxnCommitments.NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).TxnCommitments.NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).TxnCommitments.Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).TxnCommitments.Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -1623,19 +1651,19 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "fees": - bts, err = (*z).RewardsState.FeeSink.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).RewardsState.RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -1659,19 +1687,19 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rwcalr": - bts, err = (*z).RewardsState.RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).RewardsState.RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return } case "proto": - bts, err = (*z).UpgradeState.CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return } case "nextproto": - bts, err = (*z).UpgradeState.NextProtocol.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocol") return @@ -1683,25 +1711,25 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "nextbefore": - bts, err = (*z).UpgradeState.NextProtocolVoteBefore.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocolVoteBefore.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolVoteBefore") return } case "nextswitch": - bts, err = (*z).UpgradeState.NextProtocolSwitchOn.UnmarshalMsg(bts) + bts, err = (*z).UpgradeState.NextProtocolSwitchOn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NextProtocolSwitchOn") return } case "upgradeprop": - bts, err = (*z).UpgradeVote.UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).UpgradeVote.UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).UpgradeVote.UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).UpgradeVote.UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -1740,12 +1768,12 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 protocol.StateProofType var zb0002 StateProofTrackingData zb0012-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofTracking", zb0001) return @@ -1773,7 +1801,7 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ParticipationUpdates.ExpiredParticipationAccounts = make([]basics.Address, zb0014) } for zb0003 := range (*z).ParticipationUpdates.ExpiredParticipationAccounts { - bts, err = (*z).ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ParticipationUpdates.ExpiredParticipationAccounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0003) return @@ -1792,6 +1820,9 @@ func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BlockHeader) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BlockHeader) return ok @@ -1940,7 +1971,12 @@ func (_ *Genesis) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Genesis) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -1962,7 +1998,7 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Network.UnmarshalMsg(bts) + bts, err = (*z).Network.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Network") return @@ -1970,7 +2006,7 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proto") return @@ -1998,7 +2034,7 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Allocation = make([]GenesisAllocation, zb0004) } for zb0001 := range (*z).Allocation { - bts, err = (*z).Allocation[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Allocation[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Allocation", zb0001) return @@ -2075,13 +2111,13 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "network": - bts, err = (*z).Network.UnmarshalMsg(bts) + bts, err = (*z).Network.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Network") return } case "proto": - bts, err = (*z).Proto.UnmarshalMsg(bts) + bts, err = (*z).Proto.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proto") return @@ -2107,7 +2143,7 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Allocation = make([]GenesisAllocation, zb0006) } for zb0001 := range (*z).Allocation { - bts, err = (*z).Allocation[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Allocation[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Allocation", zb0001) return @@ -2156,6 +2192,9 @@ func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Genesis) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Genesis) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Genesis) return ok @@ -2284,7 +2323,12 @@ func (_ *GenesisAccountData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *GenesisAccountData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2298,7 +2342,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Status.UnmarshalMsg(bts) + bts, err = (*z).Status.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Status") return @@ -2306,7 +2350,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MicroAlgos") return @@ -2314,7 +2358,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -2322,7 +2366,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -2330,7 +2374,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -2338,7 +2382,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirstValid") return @@ -2346,7 +2390,7 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLastValid") return @@ -2384,43 +2428,43 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "onl": - bts, err = (*z).Status.UnmarshalMsg(bts) + bts, err = (*z).Status.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Status") return } case "algo": - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MicroAlgos") return } case "vote": - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "stprf": - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return } case "sel": - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "voteFst": - bts, err = (*z).VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirstValid") return } case "voteLst": - bts, err = (*z).VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLastValid") return @@ -2444,6 +2488,9 @@ func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *GenesisAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *GenesisAccountData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*GenesisAccountData) return ok @@ -2488,7 +2535,12 @@ func (_ *GenesisAllocation) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *GenesisAllocation) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *GenesisAllocation) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2518,7 +2570,7 @@ func (z *GenesisAllocation) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).State.UnmarshalMsg(bts) + bts, err = (*z).State.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "State") return @@ -2560,7 +2612,7 @@ func (z *GenesisAllocation) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "state": - bts, err = (*z).State.UnmarshalMsg(bts) + bts, err = (*z).State.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "State") return @@ -2578,6 +2630,9 @@ func (z *GenesisAllocation) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *GenesisAllocation) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *GenesisAllocation) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*GenesisAllocation) return ok @@ -2659,7 +2714,12 @@ func (_ *LightBlockHeader) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *LightBlockHeader) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2673,7 +2733,7 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Seed") return @@ -2681,7 +2741,7 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -2689,7 +2749,7 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -2697,7 +2757,7 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sha256TxnCommitment.UnmarshalMsg(bts) + bts, err = (*z).Sha256TxnCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256TxnCommitment") return @@ -2727,25 +2787,25 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "0": - bts, err = (*z).Seed.UnmarshalMsg(bts) + bts, err = (*z).Seed.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Seed") return } case "r": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "gh": - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "tc": - bts, err = (*z).Sha256TxnCommitment.UnmarshalMsg(bts) + bts, err = (*z).Sha256TxnCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256TxnCommitment") return @@ -2763,6 +2823,9 @@ func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *LightBlockHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *LightBlockHeader) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*LightBlockHeader) return ok @@ -2820,7 +2883,12 @@ func (_ *ParticipationUpdates) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ParticipationUpdates) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ParticipationUpdates) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2854,7 +2922,7 @@ func (z *ParticipationUpdates) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ExpiredParticipationAccounts = make([]basics.Address, zb0004) } for zb0001 := range (*z).ExpiredParticipationAccounts { - bts, err = (*z).ExpiredParticipationAccounts[zb0001].UnmarshalMsg(bts) + bts, err = (*z).ExpiredParticipationAccounts[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ExpiredParticipationAccounts", zb0001) return @@ -2905,7 +2973,7 @@ func (z *ParticipationUpdates) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ExpiredParticipationAccounts = make([]basics.Address, zb0006) } for zb0001 := range (*z).ExpiredParticipationAccounts { - bts, err = (*z).ExpiredParticipationAccounts[zb0001].UnmarshalMsg(bts) + bts, err = (*z).ExpiredParticipationAccounts[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ExpiredParticipationAccounts", zb0001) return @@ -2924,6 +2992,9 @@ func (z *ParticipationUpdates) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ParticipationUpdates) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ParticipationUpdates) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ParticipationUpdates) return ok @@ -3024,7 +3095,12 @@ func (_ *RewardsState) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *RewardsState) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3038,7 +3114,7 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).FeeSink.UnmarshalMsg(bts) + bts, err = (*z).FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FeeSink") return @@ -3046,7 +3122,7 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsPool") return @@ -3078,7 +3154,7 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardsRecalculationRound") return @@ -3108,13 +3184,13 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "fees": - bts, err = (*z).FeeSink.UnmarshalMsg(bts) + bts, err = (*z).FeeSink.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FeeSink") return } case "rwd": - bts, err = (*z).RewardsPool.UnmarshalMsg(bts) + bts, err = (*z).RewardsPool.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsPool") return @@ -3138,7 +3214,7 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rwcalr": - bts, err = (*z).RewardsRecalculationRound.UnmarshalMsg(bts) + bts, err = (*z).RewardsRecalculationRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardsRecalculationRound") return @@ -3156,6 +3232,9 @@ func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *RewardsState) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *RewardsState) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*RewardsState) return ok @@ -3224,7 +3303,12 @@ func (_ *StateProofTrackingData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProofTrackingData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3238,7 +3322,7 @@ func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofVotersCommitment.UnmarshalMsg(bts) + bts, err = (*z).StateProofVotersCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofVotersCommitment") return @@ -3246,7 +3330,7 @@ func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofOnlineTotalWeight.UnmarshalMsg(bts) + bts, err = (*z).StateProofOnlineTotalWeight.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofOnlineTotalWeight") return @@ -3254,7 +3338,7 @@ func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofNextRound.UnmarshalMsg(bts) + bts, err = (*z).StateProofNextRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofNextRound") return @@ -3284,19 +3368,19 @@ func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) } switch string(field) { case "v": - bts, err = (*z).StateProofVotersCommitment.UnmarshalMsg(bts) + bts, err = (*z).StateProofVotersCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofVotersCommitment") return } case "t": - bts, err = (*z).StateProofOnlineTotalWeight.UnmarshalMsg(bts) + bts, err = (*z).StateProofOnlineTotalWeight.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofOnlineTotalWeight") return } case "n": - bts, err = (*z).StateProofNextRound.UnmarshalMsg(bts) + bts, err = (*z).StateProofNextRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofNextRound") return @@ -3314,6 +3398,9 @@ func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *StateProofTrackingData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProofTrackingData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProofTrackingData) return ok @@ -3373,7 +3460,12 @@ func (_ *TxnCommitments) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TxnCommitments) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3387,7 +3479,7 @@ func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NativeSha512_256Commitment") return @@ -3395,7 +3487,7 @@ func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sha256Commitment") return @@ -3425,13 +3517,13 @@ func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "txn": - bts, err = (*z).NativeSha512_256Commitment.UnmarshalMsg(bts) + bts, err = (*z).NativeSha512_256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NativeSha512_256Commitment") return } case "txn256": - bts, err = (*z).Sha256Commitment.UnmarshalMsg(bts) + bts, err = (*z).Sha256Commitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sha256Commitment") return @@ -3449,6 +3541,9 @@ func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TxnCommitments) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TxnCommitments) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TxnCommitments) return ok @@ -3517,7 +3612,12 @@ func (_ *UpgradeVote) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *UpgradeVote) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3531,7 +3631,7 @@ func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradePropose") return @@ -3539,7 +3639,7 @@ func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "UpgradeDelay") return @@ -3577,13 +3677,13 @@ func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "upgradeprop": - bts, err = (*z).UpgradePropose.UnmarshalMsg(bts) + bts, err = (*z).UpgradePropose.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradePropose") return } case "upgradedelay": - bts, err = (*z).UpgradeDelay.UnmarshalMsg(bts) + bts, err = (*z).UpgradeDelay.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "UpgradeDelay") return @@ -3607,6 +3707,9 @@ func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *UpgradeVote) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *UpgradeVote) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*UpgradeVote) return ok diff --git a/data/committee/msgp_gen.go b/data/committee/msgp_gen.go index 6427f3eb8a..9af6fdd4d8 100644 --- a/data/committee/msgp_gen.go +++ b/data/committee/msgp_gen.go @@ -14,6 +14,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -23,6 +24,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -32,6 +34,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -41,6 +44,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -111,7 +115,12 @@ func (_ *Credential) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Credential) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -133,7 +142,7 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VrfOut.UnmarshalMsg(bts) + bts, err = (*z).VrfOut.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VrfOut") return @@ -149,7 +158,7 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Hashable.UnmarshalMsg(bts) + bts, err = (*z).Hashable.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Hashable") return @@ -157,7 +166,7 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).UnauthenticatedCredential.Proof.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedCredential.Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proof") return @@ -193,7 +202,7 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "h": - bts, err = (*z).VrfOut.UnmarshalMsg(bts) + bts, err = (*z).VrfOut.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VrfOut") return @@ -205,13 +214,13 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "hc": - bts, err = (*z).Hashable.UnmarshalMsg(bts) + bts, err = (*z).Hashable.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Hashable") return } case "pf": - bts, err = (*z).UnauthenticatedCredential.Proof.UnmarshalMsg(bts) + bts, err = (*z).UnauthenticatedCredential.Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proof") return @@ -229,6 +238,9 @@ func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Credential) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Credential) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Credential) return ok @@ -264,7 +276,12 @@ func (_ *Seed) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Seed) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -274,6 +291,9 @@ func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Seed) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Seed) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Seed) return ok @@ -325,7 +345,12 @@ func (_ *UnauthenticatedCredential) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *UnauthenticatedCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *UnauthenticatedCredential) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -339,7 +364,7 @@ func (z *UnauthenticatedCredential) UnmarshalMsg(bts []byte) (o []byte, err erro } if zb0001 > 0 { zb0001-- - bts, err = (*z).Proof.UnmarshalMsg(bts) + bts, err = (*z).Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Proof") return @@ -369,7 +394,7 @@ func (z *UnauthenticatedCredential) UnmarshalMsg(bts []byte) (o []byte, err erro } switch string(field) { case "pf": - bts, err = (*z).Proof.UnmarshalMsg(bts) + bts, err = (*z).Proof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Proof") return @@ -387,6 +412,9 @@ func (z *UnauthenticatedCredential) UnmarshalMsg(bts []byte) (o []byte, err erro return } +func (z *UnauthenticatedCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *UnauthenticatedCredential) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*UnauthenticatedCredential) return ok @@ -455,7 +483,12 @@ func (_ *hashableCredential) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *hashableCredential) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -469,7 +502,7 @@ func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).RawOut.UnmarshalMsg(bts) + bts, err = (*z).RawOut.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RawOut") return @@ -477,7 +510,7 @@ func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Member.UnmarshalMsg(bts) + bts, err = (*z).Member.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Member") return @@ -515,13 +548,13 @@ func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "v": - bts, err = (*z).RawOut.UnmarshalMsg(bts) + bts, err = (*z).RawOut.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RawOut") return } case "m": - bts, err = (*z).Member.UnmarshalMsg(bts) + bts, err = (*z).Member.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Member") return @@ -545,6 +578,9 @@ func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *hashableCredential) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *hashableCredential) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*hashableCredential) return ok diff --git a/data/hashable/msgp_gen.go b/data/hashable/msgp_gen.go index 74707f076a..6906f7528f 100644 --- a/data/hashable/msgp_gen.go +++ b/data/hashable/msgp_gen.go @@ -11,6 +11,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -45,7 +46,12 @@ func (_ *Message) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Message) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -107,6 +113,9 @@ func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Message) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Message) return ok diff --git a/data/stateproofmsg/msgp_gen.go b/data/stateproofmsg/msgp_gen.go index 02a17491bf..c6d6396a2b 100644 --- a/data/stateproofmsg/msgp_gen.go +++ b/data/stateproofmsg/msgp_gen.go @@ -13,6 +13,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -83,7 +84,12 @@ func (_ *Message) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Message) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -241,6 +247,9 @@ func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Message) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Message) return ok diff --git a/data/transactions/msgp_gen.go b/data/transactions/msgp_gen.go index 1dd4a0930a..7cc22db08a 100644 --- a/data/transactions/msgp_gen.go +++ b/data/transactions/msgp_gen.go @@ -21,6 +21,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -30,6 +31,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -39,6 +41,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -48,6 +51,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -57,6 +61,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -66,6 +71,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -75,6 +81,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -84,6 +91,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -93,6 +101,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -102,6 +111,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -111,6 +121,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -120,6 +131,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -129,6 +141,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -138,6 +151,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -147,6 +161,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -156,6 +171,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -165,6 +181,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -174,6 +191,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -183,6 +201,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -192,6 +211,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -384,7 +404,12 @@ func (_ *ApplicationCallTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ApplicationCallTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0006 int @@ -398,7 +423,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0006 > 0 { zb0006-- - bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ApplicationID") return @@ -467,7 +492,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).Accounts = make([]basics.Address, zb0011) } for zb0002 := range (*z).Accounts { - bts, err = (*z).Accounts[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Accounts[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Accounts", zb0002) return @@ -496,7 +521,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).ForeignApps = make([]basics.AppIndex, zb0013) } for zb0003 := range (*z).ForeignApps { - bts, err = (*z).ForeignApps[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ForeignApps[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ForeignApps", zb0003) return @@ -638,7 +663,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).ForeignAssets = make([]basics.AssetIndex, zb0021) } for zb0005 := range (*z).ForeignAssets { - bts, err = (*z).ForeignAssets[zb0005].UnmarshalMsg(bts) + bts, err = (*z).ForeignAssets[zb0005].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ForeignAssets", zb0005) return @@ -647,7 +672,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0006 > 0 { zb0006-- - bts, err = (*z).LocalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).LocalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LocalStateSchema") return @@ -655,7 +680,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0006 > 0 { zb0006-- - bts, err = (*z).GlobalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).GlobalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GlobalStateSchema") return @@ -729,7 +754,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error } switch string(field) { case "apid": - bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ApplicationID") return @@ -792,7 +817,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).Accounts = make([]basics.Address, zb0028) } for zb0002 := range (*z).Accounts { - bts, err = (*z).Accounts[zb0002].UnmarshalMsg(bts) + bts, err = (*z).Accounts[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Accounts", zb0002) return @@ -819,7 +844,7 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).ForeignApps = make([]basics.AppIndex, zb0030) } for zb0003 := range (*z).ForeignApps { - bts, err = (*z).ForeignApps[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ForeignApps[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ForeignApps", zb0003) return @@ -957,20 +982,20 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error (*z).ForeignAssets = make([]basics.AssetIndex, zb0038) } for zb0005 := range (*z).ForeignAssets { - bts, err = (*z).ForeignAssets[zb0005].UnmarshalMsg(bts) + bts, err = (*z).ForeignAssets[zb0005].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ForeignAssets", zb0005) return } } case "apls": - bts, err = (*z).LocalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).LocalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LocalStateSchema") return } case "apgs": - bts, err = (*z).GlobalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).GlobalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GlobalStateSchema") return @@ -1026,6 +1051,9 @@ func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error return } +func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ApplicationCallTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ApplicationCallTxnFields) return ok @@ -1173,7 +1201,12 @@ func (_ *ApplyData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ApplyData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1187,7 +1220,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ClosingAmount") return @@ -1203,7 +1236,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SenderRewards") return @@ -1211,7 +1244,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ReceiverRewards") return @@ -1219,7 +1252,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CloseRewards") return @@ -1227,7 +1260,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EvalDelta") return @@ -1235,7 +1268,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") return @@ -1243,7 +1276,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ApplicationID") return @@ -1273,7 +1306,7 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "ca": - bts, err = (*z).ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ClosingAmount") return @@ -1285,37 +1318,37 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rs": - bts, err = (*z).SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SenderRewards") return } case "rr": - bts, err = (*z).ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ReceiverRewards") return } case "rc": - bts, err = (*z).CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CloseRewards") return } case "dt": - bts, err = (*z).EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EvalDelta") return } case "caid": - bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ConfigAsset") return } case "apid": - bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ApplicationID") return @@ -1333,6 +1366,9 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ApplyData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ApplyData) return ok @@ -1392,7 +1428,12 @@ func (_ *AssetConfigTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetConfigTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1406,7 +1447,7 @@ func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") return @@ -1414,7 +1455,7 @@ func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams") return @@ -1444,13 +1485,13 @@ func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "caid": - bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ConfigAsset") return } case "apar": - bts, err = (*z).AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams") return @@ -1468,6 +1509,9 @@ func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetConfigTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetConfigTxnFields) return ok @@ -1536,7 +1580,12 @@ func (_ *AssetFreezeTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetFreezeTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1550,7 +1599,7 @@ func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).FreezeAccount.UnmarshalMsg(bts) + bts, err = (*z).FreezeAccount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FreezeAccount") return @@ -1558,7 +1607,7 @@ func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).FreezeAsset.UnmarshalMsg(bts) + bts, err = (*z).FreezeAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FreezeAsset") return @@ -1596,13 +1645,13 @@ func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "fadd": - bts, err = (*z).FreezeAccount.UnmarshalMsg(bts) + bts, err = (*z).FreezeAccount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FreezeAccount") return } case "faid": - bts, err = (*z).FreezeAsset.UnmarshalMsg(bts) + bts, err = (*z).FreezeAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FreezeAsset") return @@ -1626,6 +1675,9 @@ func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetFreezeTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetFreezeTxnFields) return ok @@ -1712,7 +1764,12 @@ func (_ *AssetTransferTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AssetTransferTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1726,7 +1783,7 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).XferAsset.UnmarshalMsg(bts) + bts, err = (*z).XferAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "XferAsset") return @@ -1742,7 +1799,7 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).AssetSender.UnmarshalMsg(bts) + bts, err = (*z).AssetSender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetSender") return @@ -1750,7 +1807,7 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).AssetReceiver.UnmarshalMsg(bts) + bts, err = (*z).AssetReceiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetReceiver") return @@ -1758,7 +1815,7 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).AssetCloseTo.UnmarshalMsg(bts) + bts, err = (*z).AssetCloseTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetCloseTo") return @@ -1788,7 +1845,7 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) } switch string(field) { case "xaid": - bts, err = (*z).XferAsset.UnmarshalMsg(bts) + bts, err = (*z).XferAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "XferAsset") return @@ -1800,19 +1857,19 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) return } case "asnd": - bts, err = (*z).AssetSender.UnmarshalMsg(bts) + bts, err = (*z).AssetSender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetSender") return } case "arcv": - bts, err = (*z).AssetReceiver.UnmarshalMsg(bts) + bts, err = (*z).AssetReceiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetReceiver") return } case "aclose": - bts, err = (*z).AssetCloseTo.UnmarshalMsg(bts) + bts, err = (*z).AssetCloseTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetCloseTo") return @@ -1830,6 +1887,9 @@ func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AssetTransferTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AssetTransferTxnFields) return ok @@ -1889,7 +1949,12 @@ func (_ *BoxRef) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BoxRef) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BoxRef) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1985,6 +2050,9 @@ func (z *BoxRef) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BoxRef) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BoxRef) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BoxRef) return ok @@ -2107,7 +2175,12 @@ func (_ *EvalDelta) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *EvalDelta) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0006 int @@ -2121,7 +2194,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0006 > 0 { zb0006-- - bts, err = (*z).GlobalDelta.UnmarshalMsg(bts) + bts, err = (*z).GlobalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GlobalDelta") return @@ -2155,7 +2228,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "struct-from-array", "LocalDeltas") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LocalDeltas", zb0001) return @@ -2185,7 +2258,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).SharedAccts = make([]basics.Address, zb0010) } for zb0003 := range (*z).SharedAccts { - bts, err = (*z).SharedAccts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).SharedAccts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SharedAccts", zb0003) return @@ -2243,7 +2316,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).InnerTxns = make([]SignedTxnWithAD, zb0014) } for zb0005 := range (*z).InnerTxns { - bts, err = (*z).InnerTxns[zb0005].UnmarshalMsg(bts) + bts, err = (*z).InnerTxns[zb0005].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "InnerTxns", zb0005) return @@ -2274,7 +2347,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "gd": - bts, err = (*z).GlobalDelta.UnmarshalMsg(bts) + bts, err = (*z).GlobalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GlobalDelta") return @@ -2306,7 +2379,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "LocalDeltas") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LocalDeltas", zb0001) return @@ -2334,7 +2407,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).SharedAccts = make([]basics.Address, zb0018) } for zb0003 := range (*z).SharedAccts { - bts, err = (*z).SharedAccts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).SharedAccts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SharedAccts", zb0003) return @@ -2388,7 +2461,7 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).InnerTxns = make([]SignedTxnWithAD, zb0022) } for zb0005 := range (*z).InnerTxns { - bts, err = (*z).InnerTxns[zb0005].UnmarshalMsg(bts) + bts, err = (*z).InnerTxns[zb0005].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "InnerTxns", zb0005) return @@ -2407,6 +2480,9 @@ func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *EvalDelta) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*EvalDelta) return ok @@ -2570,7 +2646,12 @@ func (_ *Header) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Header) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2584,7 +2665,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -2592,7 +2673,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Fee.UnmarshalMsg(bts) + bts, err = (*z).Fee.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Fee") return @@ -2600,7 +2681,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).FirstValid.UnmarshalMsg(bts) + bts, err = (*z).FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FirstValid") return @@ -2608,7 +2689,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).LastValid.UnmarshalMsg(bts) + bts, err = (*z).LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastValid") return @@ -2652,7 +2733,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -2660,7 +2741,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Group.UnmarshalMsg(bts) + bts, err = (*z).Group.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Group") return @@ -2676,7 +2757,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).RekeyTo.UnmarshalMsg(bts) + bts, err = (*z).RekeyTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RekeyTo") return @@ -2706,25 +2787,25 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "snd": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "fee": - bts, err = (*z).Fee.UnmarshalMsg(bts) + bts, err = (*z).Fee.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Fee") return } case "fv": - bts, err = (*z).FirstValid.UnmarshalMsg(bts) + bts, err = (*z).FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FirstValid") return } case "lv": - bts, err = (*z).LastValid.UnmarshalMsg(bts) + bts, err = (*z).LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LastValid") return @@ -2762,13 +2843,13 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "grp": - bts, err = (*z).Group.UnmarshalMsg(bts) + bts, err = (*z).Group.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Group") return @@ -2780,7 +2861,7 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rekey": - bts, err = (*z).RekeyTo.UnmarshalMsg(bts) + bts, err = (*z).RekeyTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RekeyTo") return @@ -2798,6 +2879,9 @@ func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Header) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Header) return ok @@ -2905,7 +2989,12 @@ func (_ *KeyregTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *KeyregTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -2919,7 +3008,7 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VotePK.UnmarshalMsg(bts) + bts, err = (*z).VotePK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VotePK") return @@ -2927,7 +3016,7 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SelectionPK.UnmarshalMsg(bts) + bts, err = (*z).SelectionPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionPK") return @@ -2935,7 +3024,7 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofPK.UnmarshalMsg(bts) + bts, err = (*z).StateProofPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofPK") return @@ -2943,7 +3032,7 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteFirst.UnmarshalMsg(bts) + bts, err = (*z).VoteFirst.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirst") return @@ -2951,7 +3040,7 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteLast.UnmarshalMsg(bts) + bts, err = (*z).VoteLast.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLast") return @@ -2997,31 +3086,31 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "votekey": - bts, err = (*z).VotePK.UnmarshalMsg(bts) + bts, err = (*z).VotePK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VotePK") return } case "selkey": - bts, err = (*z).SelectionPK.UnmarshalMsg(bts) + bts, err = (*z).SelectionPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionPK") return } case "sprfkey": - bts, err = (*z).StateProofPK.UnmarshalMsg(bts) + bts, err = (*z).StateProofPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofPK") return } case "votefst": - bts, err = (*z).VoteFirst.UnmarshalMsg(bts) + bts, err = (*z).VoteFirst.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirst") return } case "votelst": - bts, err = (*z).VoteLast.UnmarshalMsg(bts) + bts, err = (*z).VoteLast.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLast") return @@ -3051,6 +3140,9 @@ func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *KeyregTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*KeyregTxnFields) return ok @@ -3135,7 +3227,12 @@ func (_ *LogicSig) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *LogicSig) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -3167,7 +3264,7 @@ func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -3175,7 +3272,7 @@ func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Msig.UnmarshalMsg(bts) + bts, err = (*z).Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msig") return @@ -3260,13 +3357,13 @@ func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return } case "msig": - bts, err = (*z).Msig.UnmarshalMsg(bts) + bts, err = (*z).Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msig") return @@ -3321,6 +3418,9 @@ func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *LogicSig) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*LogicSig) return ok @@ -3364,7 +3464,12 @@ func (_ OnCompletion) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OnCompletion) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OnCompletion) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -3378,6 +3483,9 @@ func (z *OnCompletion) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *OnCompletion) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OnCompletion) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OnCompletion) return ok @@ -3446,7 +3554,12 @@ func (_ *PaymentTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *PaymentTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3460,7 +3573,7 @@ func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Receiver.UnmarshalMsg(bts) + bts, err = (*z).Receiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Receiver") return @@ -3468,7 +3581,7 @@ func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Amount.UnmarshalMsg(bts) + bts, err = (*z).Amount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Amount") return @@ -3476,7 +3589,7 @@ func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).CloseRemainderTo.UnmarshalMsg(bts) + bts, err = (*z).CloseRemainderTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CloseRemainderTo") return @@ -3506,19 +3619,19 @@ func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "rcv": - bts, err = (*z).Receiver.UnmarshalMsg(bts) + bts, err = (*z).Receiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Receiver") return } case "amt": - bts, err = (*z).Amount.UnmarshalMsg(bts) + bts, err = (*z).Amount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Amount") return } case "close": - bts, err = (*z).CloseRemainderTo.UnmarshalMsg(bts) + bts, err = (*z).CloseRemainderTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CloseRemainderTo") return @@ -3536,6 +3649,9 @@ func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *PaymentTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*PaymentTxnFields) return ok @@ -3581,7 +3697,12 @@ func (_ Payset) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Payset) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Payset) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0002 int var zb0003 bool zb0002, zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) @@ -3602,7 +3723,7 @@ func (z *Payset) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z) = make(Payset, zb0002) } for zb0001 := range *z { - bts, err = (*z)[zb0001].UnmarshalMsg(bts) + bts, err = (*z)[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, zb0001) return @@ -3612,6 +3733,9 @@ func (z *Payset) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Payset) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Payset) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Payset) return ok @@ -3702,7 +3826,12 @@ func (_ *SignedTxn) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SignedTxn) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -3716,7 +3845,7 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -3724,7 +3853,7 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Msig.UnmarshalMsg(bts) + bts, err = (*z).Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msig") return @@ -3732,7 +3861,7 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Lsig.UnmarshalMsg(bts) + bts, err = (*z).Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Lsig") return @@ -3740,7 +3869,7 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Txn.UnmarshalMsg(bts) + bts, err = (*z).Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Txn") return @@ -3748,7 +3877,7 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -3778,31 +3907,31 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return } case "msig": - bts, err = (*z).Msig.UnmarshalMsg(bts) + bts, err = (*z).Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msig") return } case "lsig": - bts, err = (*z).Lsig.UnmarshalMsg(bts) + bts, err = (*z).Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Lsig") return } case "txn": - bts, err = (*z).Txn.UnmarshalMsg(bts) + bts, err = (*z).Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Txn") return } case "sgnr": - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return @@ -3820,6 +3949,9 @@ func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SignedTxn) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SignedTxn) return ok @@ -3996,7 +4128,12 @@ func (_ *SignedTxnInBlock) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SignedTxnInBlock) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4010,7 +4147,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.SignedTxn.Sig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -4018,7 +4155,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.SignedTxn.Msig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msig") return @@ -4026,7 +4163,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.SignedTxn.Lsig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Lsig") return @@ -4034,7 +4171,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.SignedTxn.Txn.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Txn") return @@ -4042,7 +4179,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.SignedTxn.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -4050,7 +4187,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ClosingAmount") return @@ -4066,7 +4203,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SenderRewards") return @@ -4074,7 +4211,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ReceiverRewards") return @@ -4082,7 +4219,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CloseRewards") return @@ -4090,7 +4227,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EvalDelta") return @@ -4098,7 +4235,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") return @@ -4106,7 +4243,7 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ApplicationID") return @@ -4152,37 +4289,37 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "sig": - bts, err = (*z).SignedTxnWithAD.SignedTxn.Sig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return } case "msig": - bts, err = (*z).SignedTxnWithAD.SignedTxn.Msig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msig") return } case "lsig": - bts, err = (*z).SignedTxnWithAD.SignedTxn.Lsig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Lsig") return } case "txn": - bts, err = (*z).SignedTxnWithAD.SignedTxn.Txn.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Txn") return } case "sgnr": - bts, err = (*z).SignedTxnWithAD.SignedTxn.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.SignedTxn.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return } case "ca": - bts, err = (*z).SignedTxnWithAD.ApplyData.ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ClosingAmount") return @@ -4194,37 +4331,37 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rs": - bts, err = (*z).SignedTxnWithAD.ApplyData.SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SenderRewards") return } case "rr": - bts, err = (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ReceiverRewards") return } case "rc": - bts, err = (*z).SignedTxnWithAD.ApplyData.CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CloseRewards") return } case "dt": - bts, err = (*z).SignedTxnWithAD.ApplyData.EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EvalDelta") return } case "caid": - bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ConfigAsset") return } case "apid": - bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ApplicationID") return @@ -4254,6 +4391,9 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SignedTxnInBlock) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SignedTxnInBlock) return ok @@ -4412,7 +4552,12 @@ func (_ *SignedTxnWithAD) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *SignedTxnWithAD) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4426,7 +4571,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxn.Sig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -4434,7 +4579,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxn.Msig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msig") return @@ -4442,7 +4587,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxn.Lsig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Lsig") return @@ -4450,7 +4595,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxn.Txn.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Txn") return @@ -4458,7 +4603,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignedTxn.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -4466,7 +4611,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ClosingAmount") return @@ -4482,7 +4627,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SenderRewards") return @@ -4490,7 +4635,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ReceiverRewards") return @@ -4498,7 +4643,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CloseRewards") return @@ -4506,7 +4651,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "EvalDelta") return @@ -4514,7 +4659,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") return @@ -4522,7 +4667,7 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ApplicationID") return @@ -4552,37 +4697,37 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "sig": - bts, err = (*z).SignedTxn.Sig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return } case "msig": - bts, err = (*z).SignedTxn.Msig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Msig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msig") return } case "lsig": - bts, err = (*z).SignedTxn.Lsig.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Lsig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Lsig") return } case "txn": - bts, err = (*z).SignedTxn.Txn.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.Txn.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Txn") return } case "sgnr": - bts, err = (*z).SignedTxn.AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).SignedTxn.AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return } case "ca": - bts, err = (*z).ApplyData.ClosingAmount.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ClosingAmount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ClosingAmount") return @@ -4594,37 +4739,37 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rs": - bts, err = (*z).ApplyData.SenderRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.SenderRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SenderRewards") return } case "rr": - bts, err = (*z).ApplyData.ReceiverRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ReceiverRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ReceiverRewards") return } case "rc": - bts, err = (*z).ApplyData.CloseRewards.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.CloseRewards.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CloseRewards") return } case "dt": - bts, err = (*z).ApplyData.EvalDelta.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.EvalDelta.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "EvalDelta") return } case "caid": - bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ConfigAsset") return } case "apid": - bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ApplicationID") return @@ -4642,6 +4787,9 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *SignedTxnWithAD) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*SignedTxnWithAD) return ok @@ -4710,7 +4858,12 @@ func (_ *StateProofTxnFields) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProofTxnFields) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -4724,7 +4877,7 @@ func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofType.UnmarshalMsg(bts) + bts, err = (*z).StateProofType.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofType") return @@ -4732,7 +4885,7 @@ func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProof.UnmarshalMsg(bts) + bts, err = (*z).StateProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProof") return @@ -4740,7 +4893,7 @@ func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Message.UnmarshalMsg(bts) + bts, err = (*z).Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Message") return @@ -4770,19 +4923,19 @@ func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "sptype": - bts, err = (*z).StateProofType.UnmarshalMsg(bts) + bts, err = (*z).StateProofType.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofType") return } case "sp": - bts, err = (*z).StateProof.UnmarshalMsg(bts) + bts, err = (*z).StateProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProof") return } case "spmsg": - bts, err = (*z).Message.UnmarshalMsg(bts) + bts, err = (*z).Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Message") return @@ -4800,6 +4953,9 @@ func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateProofTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProofTxnFields) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProofTxnFields) return ok @@ -5312,7 +5468,12 @@ func (_ *Transaction) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Transaction) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0007 int @@ -5326,7 +5487,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Type.UnmarshalMsg(bts) + bts, err = (*z).Type.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Type") return @@ -5334,7 +5495,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.Sender.UnmarshalMsg(bts) + bts, err = (*z).Header.Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -5342,7 +5503,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.Fee.UnmarshalMsg(bts) + bts, err = (*z).Header.Fee.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Fee") return @@ -5350,7 +5511,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.FirstValid.UnmarshalMsg(bts) + bts, err = (*z).Header.FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FirstValid") return @@ -5358,7 +5519,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.LastValid.UnmarshalMsg(bts) + bts, err = (*z).Header.LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastValid") return @@ -5402,7 +5563,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).Header.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GenesisHash") return @@ -5410,7 +5571,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.Group.UnmarshalMsg(bts) + bts, err = (*z).Header.Group.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Group") return @@ -5426,7 +5587,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).Header.RekeyTo.UnmarshalMsg(bts) + bts, err = (*z).Header.RekeyTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RekeyTo") return @@ -5434,7 +5595,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).KeyregTxnFields.VotePK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VotePK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VotePK") return @@ -5442,7 +5603,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).KeyregTxnFields.SelectionPK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.SelectionPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionPK") return @@ -5450,7 +5611,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).KeyregTxnFields.StateProofPK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.StateProofPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofPK") return @@ -5458,7 +5619,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).KeyregTxnFields.VoteFirst.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VoteFirst.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirst") return @@ -5466,7 +5627,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).KeyregTxnFields.VoteLast.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VoteLast.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLast") return @@ -5490,7 +5651,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).PaymentTxnFields.Receiver.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.Receiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Receiver") return @@ -5498,7 +5659,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).PaymentTxnFields.Amount.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.Amount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Amount") return @@ -5506,7 +5667,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).PaymentTxnFields.CloseRemainderTo.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.CloseRemainderTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CloseRemainderTo") return @@ -5514,7 +5675,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetConfigTxnFields.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetConfigTxnFields.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") return @@ -5522,7 +5683,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetConfigTxnFields.AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetConfigTxnFields.AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetParams") return @@ -5530,7 +5691,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetTransferTxnFields.XferAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.XferAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "XferAsset") return @@ -5546,7 +5707,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetTransferTxnFields.AssetSender.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetSender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetSender") return @@ -5554,7 +5715,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetTransferTxnFields.AssetReceiver.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetReceiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetReceiver") return @@ -5562,7 +5723,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetTransferTxnFields.AssetCloseTo.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetCloseTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AssetCloseTo") return @@ -5570,7 +5731,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetFreezeTxnFields.FreezeAccount.UnmarshalMsg(bts) + bts, err = (*z).AssetFreezeTxnFields.FreezeAccount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FreezeAccount") return @@ -5578,7 +5739,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).AssetFreezeTxnFields.FreezeAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetFreezeTxnFields.FreezeAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FreezeAsset") return @@ -5594,7 +5755,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).ApplicationCallTxnFields.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ApplicationID") return @@ -5663,7 +5824,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.Accounts = make([]basics.Address, zb0014) } for zb0003 := range (*z).ApplicationCallTxnFields.Accounts { - bts, err = (*z).ApplicationCallTxnFields.Accounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.Accounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Accounts", zb0003) return @@ -5692,7 +5853,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.ForeignApps = make([]basics.AppIndex, zb0016) } for zb0004 := range (*z).ApplicationCallTxnFields.ForeignApps { - bts, err = (*z).ApplicationCallTxnFields.ForeignApps[zb0004].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ForeignApps[zb0004].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ForeignApps", zb0004) return @@ -5834,7 +5995,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.ForeignAssets = make([]basics.AssetIndex, zb0024) } for zb0006 := range (*z).ApplicationCallTxnFields.ForeignAssets { - bts, err = (*z).ApplicationCallTxnFields.ForeignAssets[zb0006].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ForeignAssets[zb0006].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "ForeignAssets", zb0006) return @@ -5843,7 +6004,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).ApplicationCallTxnFields.LocalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.LocalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LocalStateSchema") return @@ -5851,7 +6012,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).ApplicationCallTxnFields.GlobalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.GlobalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GlobalStateSchema") return @@ -5903,7 +6064,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).StateProofTxnFields.StateProofType.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.StateProofType.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofType") return @@ -5911,7 +6072,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).StateProofTxnFields.StateProof.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.StateProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProof") return @@ -5919,7 +6080,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).StateProofTxnFields.Message.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Message") return @@ -5949,31 +6110,31 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "type": - bts, err = (*z).Type.UnmarshalMsg(bts) + bts, err = (*z).Type.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Type") return } case "snd": - bts, err = (*z).Header.Sender.UnmarshalMsg(bts) + bts, err = (*z).Header.Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "fee": - bts, err = (*z).Header.Fee.UnmarshalMsg(bts) + bts, err = (*z).Header.Fee.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Fee") return } case "fv": - bts, err = (*z).Header.FirstValid.UnmarshalMsg(bts) + bts, err = (*z).Header.FirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FirstValid") return } case "lv": - bts, err = (*z).Header.LastValid.UnmarshalMsg(bts) + bts, err = (*z).Header.LastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LastValid") return @@ -6011,13 +6172,13 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "gh": - bts, err = (*z).Header.GenesisHash.UnmarshalMsg(bts) + bts, err = (*z).Header.GenesisHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GenesisHash") return } case "grp": - bts, err = (*z).Header.Group.UnmarshalMsg(bts) + bts, err = (*z).Header.Group.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Group") return @@ -6029,37 +6190,37 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rekey": - bts, err = (*z).Header.RekeyTo.UnmarshalMsg(bts) + bts, err = (*z).Header.RekeyTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RekeyTo") return } case "votekey": - bts, err = (*z).KeyregTxnFields.VotePK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VotePK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VotePK") return } case "selkey": - bts, err = (*z).KeyregTxnFields.SelectionPK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.SelectionPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionPK") return } case "sprfkey": - bts, err = (*z).KeyregTxnFields.StateProofPK.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.StateProofPK.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofPK") return } case "votefst": - bts, err = (*z).KeyregTxnFields.VoteFirst.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VoteFirst.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirst") return } case "votelst": - bts, err = (*z).KeyregTxnFields.VoteLast.UnmarshalMsg(bts) + bts, err = (*z).KeyregTxnFields.VoteLast.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLast") return @@ -6077,37 +6238,37 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "rcv": - bts, err = (*z).PaymentTxnFields.Receiver.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.Receiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Receiver") return } case "amt": - bts, err = (*z).PaymentTxnFields.Amount.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.Amount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Amount") return } case "close": - bts, err = (*z).PaymentTxnFields.CloseRemainderTo.UnmarshalMsg(bts) + bts, err = (*z).PaymentTxnFields.CloseRemainderTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CloseRemainderTo") return } case "caid": - bts, err = (*z).AssetConfigTxnFields.ConfigAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetConfigTxnFields.ConfigAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ConfigAsset") return } case "apar": - bts, err = (*z).AssetConfigTxnFields.AssetParams.UnmarshalMsg(bts) + bts, err = (*z).AssetConfigTxnFields.AssetParams.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetParams") return } case "xaid": - bts, err = (*z).AssetTransferTxnFields.XferAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.XferAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "XferAsset") return @@ -6119,31 +6280,31 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "asnd": - bts, err = (*z).AssetTransferTxnFields.AssetSender.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetSender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetSender") return } case "arcv": - bts, err = (*z).AssetTransferTxnFields.AssetReceiver.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetReceiver.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetReceiver") return } case "aclose": - bts, err = (*z).AssetTransferTxnFields.AssetCloseTo.UnmarshalMsg(bts) + bts, err = (*z).AssetTransferTxnFields.AssetCloseTo.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AssetCloseTo") return } case "fadd": - bts, err = (*z).AssetFreezeTxnFields.FreezeAccount.UnmarshalMsg(bts) + bts, err = (*z).AssetFreezeTxnFields.FreezeAccount.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FreezeAccount") return } case "faid": - bts, err = (*z).AssetFreezeTxnFields.FreezeAsset.UnmarshalMsg(bts) + bts, err = (*z).AssetFreezeTxnFields.FreezeAsset.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "FreezeAsset") return @@ -6155,7 +6316,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "apid": - bts, err = (*z).ApplicationCallTxnFields.ApplicationID.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ApplicationID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ApplicationID") return @@ -6218,7 +6379,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.Accounts = make([]basics.Address, zb0033) } for zb0003 := range (*z).ApplicationCallTxnFields.Accounts { - bts, err = (*z).ApplicationCallTxnFields.Accounts[zb0003].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.Accounts[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Accounts", zb0003) return @@ -6245,7 +6406,7 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.ForeignApps = make([]basics.AppIndex, zb0035) } for zb0004 := range (*z).ApplicationCallTxnFields.ForeignApps { - bts, err = (*z).ApplicationCallTxnFields.ForeignApps[zb0004].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ForeignApps[zb0004].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ForeignApps", zb0004) return @@ -6383,20 +6544,20 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).ApplicationCallTxnFields.ForeignAssets = make([]basics.AssetIndex, zb0043) } for zb0006 := range (*z).ApplicationCallTxnFields.ForeignAssets { - bts, err = (*z).ApplicationCallTxnFields.ForeignAssets[zb0006].UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.ForeignAssets[zb0006].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "ForeignAssets", zb0006) return } } case "apls": - bts, err = (*z).ApplicationCallTxnFields.LocalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.LocalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LocalStateSchema") return } case "apgs": - bts, err = (*z).ApplicationCallTxnFields.GlobalStateSchema.UnmarshalMsg(bts) + bts, err = (*z).ApplicationCallTxnFields.GlobalStateSchema.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GlobalStateSchema") return @@ -6440,19 +6601,19 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "sptype": - bts, err = (*z).StateProofTxnFields.StateProofType.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.StateProofType.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofType") return } case "sp": - bts, err = (*z).StateProofTxnFields.StateProof.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.StateProof.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProof") return } case "spmsg": - bts, err = (*z).StateProofTxnFields.Message.UnmarshalMsg(bts) + bts, err = (*z).StateProofTxnFields.Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Message") return @@ -6470,6 +6631,9 @@ func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Transaction) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Transaction) return ok @@ -6564,7 +6728,12 @@ func (_ *TxGroup) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TxGroup) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -6598,7 +6767,7 @@ func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).TxGroupHashes = make([]crypto.Digest, zb0004) } for zb0001 := range (*z).TxGroupHashes { - bts, err = (*z).TxGroupHashes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).TxGroupHashes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "TxGroupHashes", zb0001) return @@ -6649,7 +6818,7 @@ func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).TxGroupHashes = make([]crypto.Digest, zb0006) } for zb0001 := range (*z).TxGroupHashes { - bts, err = (*z).TxGroupHashes[zb0001].UnmarshalMsg(bts) + bts, err = (*z).TxGroupHashes[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "TxGroupHashes", zb0001) return @@ -6668,6 +6837,9 @@ func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TxGroup) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TxGroup) return ok @@ -6708,6 +6880,9 @@ func (_ *Txid) CanMarshalMsg(z interface{}) bool { func (z *Txid) UnmarshalMsg(bts []byte) ([]byte, error) { return ((*(crypto.Digest))(z)).UnmarshalMsg(bts) } +func (z *Txid) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) ([]byte, error) { + return ((*(crypto.Digest))(z)).UnmarshalMsgWithState(bts, st) +} func (_ *Txid) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Txid) return ok diff --git a/go.mod b/go.mod index 271ce29211..50d63ab397 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/algorand/go-deadlock v0.2.3 github.com/algorand/go-sumhash v0.1.0 github.com/algorand/graphtrace v0.1.0 - github.com/algorand/msgp v1.1.55 + github.com/algorand/msgp v1.1.60 github.com/algorand/oapi-codegen v1.12.0-algorand.0 github.com/algorand/sortition v1.0.0 github.com/algorand/websocket v1.4.6 diff --git a/go.sum b/go.sum index 6c9d5f8827..0d8dd8635b 100644 --- a/go.sum +++ b/go.sum @@ -67,8 +67,8 @@ github.com/algorand/go-sumhash v0.1.0 h1:b/QRhyLuF//vOcicBIxBXYW8bERNoeLxieht/dU github.com/algorand/go-sumhash v0.1.0/go.mod h1:OOe7jdDWUhLkuP1XytkK5gnLu9entAviN5DfDZh6XAc= github.com/algorand/graphtrace v0.1.0 h1:QemP1iT0W56SExD0NfiU6rsG34/v0Je6bg5UZnptEUM= github.com/algorand/graphtrace v0.1.0/go.mod h1:HscLQrzBdH1BH+5oehs3ICd8SYcXvnSL9BjfTu8WHCc= -github.com/algorand/msgp v1.1.55 h1:kWc9Xc08xtxCTWUiq1cRW5XGF+DFcfSGihYf0IZ/ivs= -github.com/algorand/msgp v1.1.55/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= +github.com/algorand/msgp v1.1.60 h1:+IVUC34+tSj1P2M1mkYtl4GLyfzdzXfBLSw6TDT19M8= +github.com/algorand/msgp v1.1.60/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= github.com/algorand/oapi-codegen v1.12.0-algorand.0 h1:W9PvED+wAJc+9EeXPONnA+0zE9UhynEqoDs4OgAxKhk= github.com/algorand/oapi-codegen v1.12.0-algorand.0/go.mod h1:tIWJ9K/qrLDVDt5A1p82UmxZIEGxv2X+uoujdhEAL48= github.com/algorand/sortition v1.0.0 h1:PJiZtdSTBm4nArQrZXBnhlljHXhuyAXRJBqVWowQu3E= diff --git a/ledger/encoded/msgp_gen.go b/ledger/encoded/msgp_gen.go index cd9c99aaa2..cc2422ded0 100644 --- a/ledger/encoded/msgp_gen.go +++ b/ledger/encoded/msgp_gen.go @@ -15,6 +15,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -24,6 +25,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -33,6 +35,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -76,7 +79,12 @@ func (_ *BalanceRecordV5) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BalanceRecordV5) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -90,7 +98,7 @@ func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Address.UnmarshalMsg(bts) + bts, err = (*z).Address.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Address") return @@ -98,7 +106,7 @@ func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).AccountData.UnmarshalMsg(bts) + bts, err = (*z).AccountData.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AccountData") return @@ -128,13 +136,13 @@ func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "pk": - bts, err = (*z).Address.UnmarshalMsg(bts) + bts, err = (*z).Address.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Address") return } case "ad": - bts, err = (*z).AccountData.UnmarshalMsg(bts) + bts, err = (*z).AccountData.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AccountData") return @@ -152,6 +160,9 @@ func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BalanceRecordV5) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BalanceRecordV5) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BalanceRecordV5) return ok @@ -245,7 +256,12 @@ func (_ *BalanceRecordV6) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BalanceRecordV6) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -259,7 +275,7 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Address.UnmarshalMsg(bts) + bts, err = (*z).Address.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Address") return @@ -267,7 +283,7 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).AccountData.UnmarshalMsg(bts) + bts, err = (*z).AccountData.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AccountData") return @@ -301,7 +317,7 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "struct-from-array", "Resources") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Resources", zb0001) return @@ -341,13 +357,13 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "a": - bts, err = (*z).Address.UnmarshalMsg(bts) + bts, err = (*z).Address.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Address") return } case "b": - bts, err = (*z).AccountData.UnmarshalMsg(bts) + bts, err = (*z).AccountData.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AccountData") return @@ -379,7 +395,7 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "Resources") return } - bts, err = zb0002.UnmarshalMsg(bts) + bts, err = zb0002.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Resources", zb0001) return @@ -405,6 +421,9 @@ func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BalanceRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BalanceRecordV6) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BalanceRecordV6) return ok @@ -481,7 +500,12 @@ func (_ *KVRecordV6) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *KVRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *KVRecordV6) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -597,6 +621,9 @@ func (z *KVRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *KVRecordV6) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *KVRecordV6) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*KVRecordV6) return ok diff --git a/ledger/ledgercore/msgp_gen.go b/ledger/ledgercore/msgp_gen.go index b0b8bdd280..0f89af32aa 100644 --- a/ledger/ledgercore/msgp_gen.go +++ b/ledger/ledgercore/msgp_gen.go @@ -15,6 +15,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -24,6 +25,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -33,6 +35,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -42,6 +45,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -169,7 +173,12 @@ func (_ *AccountTotals) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AccountTotals) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -194,7 +203,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Online.Money.UnmarshalMsg(bts) + bts, err = (*z).Online.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Online", "struct-from-array", "Money") return @@ -232,7 +241,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).Online.Money.UnmarshalMsg(bts) + bts, err = (*z).Online.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Online", "Money") return @@ -266,7 +275,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0005 > 0 { zb0005-- - bts, err = (*z).Offline.Money.UnmarshalMsg(bts) + bts, err = (*z).Offline.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Offline", "struct-from-array", "Money") return @@ -304,7 +313,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).Offline.Money.UnmarshalMsg(bts) + bts, err = (*z).Offline.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Offline", "Money") return @@ -338,7 +347,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0007 > 0 { zb0007-- - bts, err = (*z).NotParticipating.Money.UnmarshalMsg(bts) + bts, err = (*z).NotParticipating.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NotParticipating", "struct-from-array", "Money") return @@ -376,7 +385,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).NotParticipating.Money.UnmarshalMsg(bts) + bts, err = (*z).NotParticipating.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "NotParticipating", "Money") return @@ -440,7 +449,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0009 > 0 { zb0009-- - bts, err = (*z).Online.Money.UnmarshalMsg(bts) + bts, err = (*z).Online.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Online", "struct-from-array", "Money") return @@ -478,7 +487,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).Online.Money.UnmarshalMsg(bts) + bts, err = (*z).Online.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Online", "Money") return @@ -510,7 +519,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0011 > 0 { zb0011-- - bts, err = (*z).Offline.Money.UnmarshalMsg(bts) + bts, err = (*z).Offline.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Offline", "struct-from-array", "Money") return @@ -548,7 +557,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).Offline.Money.UnmarshalMsg(bts) + bts, err = (*z).Offline.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Offline", "Money") return @@ -580,7 +589,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0013 > 0 { zb0013-- - bts, err = (*z).NotParticipating.Money.UnmarshalMsg(bts) + bts, err = (*z).NotParticipating.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NotParticipating", "struct-from-array", "Money") return @@ -618,7 +627,7 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).NotParticipating.Money.UnmarshalMsg(bts) + bts, err = (*z).NotParticipating.Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "NotParticipating", "Money") return @@ -657,6 +666,9 @@ func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AccountTotals) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AccountTotals) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AccountTotals) return ok @@ -716,7 +728,12 @@ func (_ *AlgoCount) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *AlgoCount) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *AlgoCount) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -730,7 +747,7 @@ func (z *AlgoCount) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Money.UnmarshalMsg(bts) + bts, err = (*z).Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Money") return @@ -768,7 +785,7 @@ func (z *AlgoCount) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "mon": - bts, err = (*z).Money.UnmarshalMsg(bts) + bts, err = (*z).Money.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Money") return @@ -792,6 +809,9 @@ func (z *AlgoCount) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *AlgoCount) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *AlgoCount) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*AlgoCount) return ok @@ -860,7 +880,12 @@ func (_ *OnlineRoundParamsData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *OnlineRoundParamsData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *OnlineRoundParamsData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -890,7 +915,7 @@ func (z *OnlineRoundParamsData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "CurrentProtocol") return @@ -932,7 +957,7 @@ func (z *OnlineRoundParamsData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "proto": - bts, err = (*z).CurrentProtocol.UnmarshalMsg(bts) + bts, err = (*z).CurrentProtocol.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "CurrentProtocol") return @@ -950,6 +975,9 @@ func (z *OnlineRoundParamsData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *OnlineRoundParamsData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *OnlineRoundParamsData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*OnlineRoundParamsData) return ok @@ -1027,7 +1055,12 @@ func (_ *StateProofVerificationContext) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProofVerificationContext) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1041,7 +1074,7 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err } if zb0001 > 0 { zb0001-- - bts, err = (*z).LastAttestedRound.UnmarshalMsg(bts) + bts, err = (*z).LastAttestedRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastAttestedRound") return @@ -1049,7 +1082,7 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err } if zb0001 > 0 { zb0001-- - bts, err = (*z).VotersCommitment.UnmarshalMsg(bts) + bts, err = (*z).VotersCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VotersCommitment") return @@ -1057,7 +1090,7 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err } if zb0001 > 0 { zb0001-- - bts, err = (*z).OnlineTotalWeight.UnmarshalMsg(bts) + bts, err = (*z).OnlineTotalWeight.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OnlineTotalWeight") return @@ -1065,7 +1098,7 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err } if zb0001 > 0 { zb0001-- - bts, err = (*z).Version.UnmarshalMsg(bts) + bts, err = (*z).Version.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Version") return @@ -1095,25 +1128,25 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err } switch string(field) { case "spround": - bts, err = (*z).LastAttestedRound.UnmarshalMsg(bts) + bts, err = (*z).LastAttestedRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LastAttestedRound") return } case "vc": - bts, err = (*z).VotersCommitment.UnmarshalMsg(bts) + bts, err = (*z).VotersCommitment.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VotersCommitment") return } case "pw": - bts, err = (*z).OnlineTotalWeight.UnmarshalMsg(bts) + bts, err = (*z).OnlineTotalWeight.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "OnlineTotalWeight") return } case "v": - bts, err = (*z).Version.UnmarshalMsg(bts) + bts, err = (*z).Version.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Version") return @@ -1131,6 +1164,9 @@ func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err return } +func (z *StateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProofVerificationContext) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProofVerificationContext) return ok diff --git a/ledger/msgp_gen.go b/ledger/msgp_gen.go index 7148edfa68..603c83fdcc 100644 --- a/ledger/msgp_gen.go +++ b/ledger/msgp_gen.go @@ -16,6 +16,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -25,6 +26,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -34,6 +36,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -43,6 +46,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -52,6 +56,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -74,7 +79,12 @@ func (_ CatchpointCatchupState) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *CatchpointCatchupState) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *CatchpointCatchupState) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 int32 zb0001, bts, err = msgp.ReadInt32Bytes(bts) @@ -88,6 +98,9 @@ func (z *CatchpointCatchupState) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *CatchpointCatchupState) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *CatchpointCatchupState) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*CatchpointCatchupState) return ok @@ -210,7 +223,12 @@ func (_ *CatchpointFileHeader) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *CatchpointFileHeader) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -232,7 +250,7 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BalancesRound.UnmarshalMsg(bts) + bts, err = (*z).BalancesRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "BalancesRound") return @@ -240,7 +258,7 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BlocksRound.UnmarshalMsg(bts) + bts, err = (*z).BlocksRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "BlocksRound") return @@ -248,7 +266,7 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Totals.UnmarshalMsg(bts) + bts, err = (*z).Totals.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Totals") return @@ -288,7 +306,7 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BlockHeaderDigest.UnmarshalMsg(bts) + bts, err = (*z).BlockHeaderDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "BlockHeaderDigest") return @@ -324,19 +342,19 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "balancesRound": - bts, err = (*z).BalancesRound.UnmarshalMsg(bts) + bts, err = (*z).BalancesRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "BalancesRound") return } case "blocksRound": - bts, err = (*z).BlocksRound.UnmarshalMsg(bts) + bts, err = (*z).BlocksRound.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "BlocksRound") return } case "accountTotals": - bts, err = (*z).Totals.UnmarshalMsg(bts) + bts, err = (*z).Totals.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Totals") return @@ -366,7 +384,7 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "blockHeaderDigest": - bts, err = (*z).BlockHeaderDigest.UnmarshalMsg(bts) + bts, err = (*z).BlockHeaderDigest.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "BlockHeaderDigest") return @@ -384,6 +402,9 @@ func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *CatchpointFileHeader) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *CatchpointFileHeader) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*CatchpointFileHeader) return ok @@ -443,7 +464,12 @@ func (_ *catchpointFileBalancesChunkV5) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *catchpointFileBalancesChunkV5) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *catchpointFileBalancesChunkV5) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -477,7 +503,7 @@ func (z *catchpointFileBalancesChunkV5) UnmarshalMsg(bts []byte) (o []byte, err (*z).Balances = make([]encoded.BalanceRecordV5, zb0004) } for zb0001 := range (*z).Balances { - bts, err = (*z).Balances[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Balances[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Balances", zb0001) return @@ -528,7 +554,7 @@ func (z *catchpointFileBalancesChunkV5) UnmarshalMsg(bts []byte) (o []byte, err (*z).Balances = make([]encoded.BalanceRecordV5, zb0006) } for zb0001 := range (*z).Balances { - bts, err = (*z).Balances[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Balances[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Balances", zb0001) return @@ -547,6 +573,9 @@ func (z *catchpointFileBalancesChunkV5) UnmarshalMsg(bts []byte) (o []byte, err return } +func (z *catchpointFileBalancesChunkV5) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *catchpointFileBalancesChunkV5) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*catchpointFileBalancesChunkV5) return ok @@ -625,7 +654,12 @@ func (_ *catchpointFileChunkV6) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *catchpointFileChunkV6) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -659,7 +693,7 @@ func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Balances = make([]encoded.BalanceRecordV6, zb0005) } for zb0001 := range (*z).Balances { - bts, err = (*z).Balances[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Balances[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Balances", zb0001) return @@ -688,7 +722,7 @@ func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).KVs = make([]encoded.KVRecordV6, zb0007) } for zb0002 := range (*z).KVs { - bts, err = (*z).KVs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).KVs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "KVs", zb0002) return @@ -739,7 +773,7 @@ func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Balances = make([]encoded.BalanceRecordV6, zb0009) } for zb0001 := range (*z).Balances { - bts, err = (*z).Balances[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Balances[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Balances", zb0001) return @@ -766,7 +800,7 @@ func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).KVs = make([]encoded.KVRecordV6, zb0011) } for zb0002 := range (*z).KVs { - bts, err = (*z).KVs[zb0002].UnmarshalMsg(bts) + bts, err = (*z).KVs[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "KVs", zb0002) return @@ -785,6 +819,9 @@ func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *catchpointFileChunkV6) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *catchpointFileChunkV6) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*catchpointFileChunkV6) return ok @@ -854,7 +891,12 @@ func (_ *catchpointStateProofVerificationContext) CanMarshalMsg(z interface{}) b } // UnmarshalMsg implements msgp.Unmarshaler -func (z *catchpointStateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *catchpointStateProofVerificationContext) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -888,7 +930,7 @@ func (z *catchpointStateProofVerificationContext) UnmarshalMsg(bts []byte) (o [] (*z).Data = make([]ledgercore.StateProofVerificationContext, zb0004) } for zb0001 := range (*z).Data { - bts, err = (*z).Data[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Data[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Data", zb0001) return @@ -939,7 +981,7 @@ func (z *catchpointStateProofVerificationContext) UnmarshalMsg(bts []byte) (o [] (*z).Data = make([]ledgercore.StateProofVerificationContext, zb0006) } for zb0001 := range (*z).Data { - bts, err = (*z).Data[zb0001].UnmarshalMsg(bts) + bts, err = (*z).Data[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Data", zb0001) return @@ -958,6 +1000,9 @@ func (z *catchpointStateProofVerificationContext) UnmarshalMsg(bts []byte) (o [] return } +func (z *catchpointStateProofVerificationContext) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *catchpointStateProofVerificationContext) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*catchpointStateProofVerificationContext) return ok diff --git a/ledger/store/trackerdb/generickv/msgp_gen.go b/ledger/store/trackerdb/generickv/msgp_gen.go index 4f5cba66b1..026677c1bc 100644 --- a/ledger/store/trackerdb/generickv/msgp_gen.go +++ b/ledger/store/trackerdb/generickv/msgp_gen.go @@ -13,6 +13,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -56,7 +57,12 @@ func (_ *creatableEntry) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *creatableEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *creatableEntry) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -70,7 +76,7 @@ func (z *creatableEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Ctype.UnmarshalMsg(bts) + bts, err = (*z).Ctype.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Ctype") return @@ -108,7 +114,7 @@ func (z *creatableEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "Ctype": - bts, err = (*z).Ctype.UnmarshalMsg(bts) + bts, err = (*z).Ctype.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Ctype") return @@ -132,6 +138,9 @@ func (z *creatableEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *creatableEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *creatableEntry) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*creatableEntry) return ok diff --git a/ledger/store/trackerdb/msgp_gen.go b/ledger/store/trackerdb/msgp_gen.go index 203fd9fdba..a13469c0ab 100644 --- a/ledger/store/trackerdb/msgp_gen.go +++ b/ledger/store/trackerdb/msgp_gen.go @@ -19,6 +19,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -28,6 +29,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -37,6 +39,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -46,6 +49,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -55,6 +59,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -64,6 +69,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -73,6 +79,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -82,6 +89,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -296,7 +304,12 @@ func (_ *BaseAccountData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BaseAccountData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -310,7 +323,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Status.UnmarshalMsg(bts) + bts, err = (*z).Status.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Status") return @@ -318,7 +331,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MicroAlgos") return @@ -334,7 +347,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "RewardedMicroAlgos") return @@ -342,7 +355,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AuthAddr") return @@ -422,7 +435,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -430,7 +443,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -438,7 +451,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirstValid") return @@ -446,7 +459,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLastValid") return @@ -462,7 +475,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -500,13 +513,13 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "a": - bts, err = (*z).Status.UnmarshalMsg(bts) + bts, err = (*z).Status.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Status") return } case "b": - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MicroAlgos") return @@ -518,13 +531,13 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "d": - bts, err = (*z).RewardedMicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).RewardedMicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "RewardedMicroAlgos") return } case "e": - bts, err = (*z).AuthAddr.UnmarshalMsg(bts) + bts, err = (*z).AuthAddr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AuthAddr") return @@ -584,25 +597,25 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "A": - bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "B": - bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "C": - bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirstValid") return } case "D": - bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLastValid") return @@ -614,7 +627,7 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "F": - bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return @@ -638,6 +651,9 @@ func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BaseAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BaseAccountData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BaseAccountData) return ok @@ -751,7 +767,12 @@ func (_ *BaseOnlineAccountData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BaseOnlineAccountData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -765,7 +786,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -773,7 +794,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -781,7 +802,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirstValid") return @@ -789,7 +810,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLastValid") return @@ -805,7 +826,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -813,7 +834,7 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "MicroAlgos") return @@ -851,25 +872,25 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "A": - bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "B": - bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "C": - bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirstValid") return } case "D": - bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLastValid") return @@ -881,13 +902,13 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "F": - bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsg(bts) + bts, err = (*z).BaseVotingData.StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return } case "Y": - bts, err = (*z).MicroAlgos.UnmarshalMsg(bts) + bts, err = (*z).MicroAlgos.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "MicroAlgos") return @@ -911,6 +932,9 @@ func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BaseOnlineAccountData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BaseOnlineAccountData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BaseOnlineAccountData) return ok @@ -1006,7 +1030,12 @@ func (_ *BaseVotingData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *BaseVotingData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1020,7 +1049,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteID") return @@ -1028,7 +1057,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SelectionID") return @@ -1036,7 +1065,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteFirstValid") return @@ -1044,7 +1073,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VoteLastValid") return @@ -1060,7 +1089,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofID") return @@ -1090,25 +1119,25 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "A": - bts, err = (*z).VoteID.UnmarshalMsg(bts) + bts, err = (*z).VoteID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteID") return } case "B": - bts, err = (*z).SelectionID.UnmarshalMsg(bts) + bts, err = (*z).SelectionID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SelectionID") return } case "C": - bts, err = (*z).VoteFirstValid.UnmarshalMsg(bts) + bts, err = (*z).VoteFirstValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteFirstValid") return } case "D": - bts, err = (*z).VoteLastValid.UnmarshalMsg(bts) + bts, err = (*z).VoteLastValid.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VoteLastValid") return @@ -1120,7 +1149,7 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "F": - bts, err = (*z).StateProofID.UnmarshalMsg(bts) + bts, err = (*z).StateProofID.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofID") return @@ -1138,6 +1167,9 @@ func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *BaseVotingData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *BaseVotingData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*BaseVotingData) return ok @@ -1242,7 +1274,12 @@ func (_ *CatchpointFirstStageInfo) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *CatchpointFirstStageInfo) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -1256,7 +1293,7 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).Totals.UnmarshalMsg(bts) + bts, err = (*z).Totals.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Totals") return @@ -1264,7 +1301,7 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).TrieBalancesHash.UnmarshalMsg(bts) + bts, err = (*z).TrieBalancesHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "TrieBalancesHash") return @@ -1304,7 +1341,7 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error } if zb0001 > 0 { zb0001-- - bts, err = (*z).StateProofVerificationHash.UnmarshalMsg(bts) + bts, err = (*z).StateProofVerificationHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "StateProofVerificationHash") return @@ -1334,13 +1371,13 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error } switch string(field) { case "accountTotals": - bts, err = (*z).Totals.UnmarshalMsg(bts) + bts, err = (*z).Totals.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Totals") return } case "trieBalancesHash": - bts, err = (*z).TrieBalancesHash.UnmarshalMsg(bts) + bts, err = (*z).TrieBalancesHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "TrieBalancesHash") return @@ -1370,7 +1407,7 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error return } case "spVerificationHash": - bts, err = (*z).StateProofVerificationHash.UnmarshalMsg(bts) + bts, err = (*z).StateProofVerificationHash.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "StateProofVerificationHash") return @@ -1388,6 +1425,9 @@ func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error return } +func (z *CatchpointFirstStageInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *CatchpointFirstStageInfo) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*CatchpointFirstStageInfo) return ok @@ -1426,7 +1466,12 @@ func (_ ResourceFlags) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ResourceFlags) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ResourceFlags) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint8 zb0001, bts, err = msgp.ReadUint8Bytes(bts) @@ -1440,6 +1485,9 @@ func (z *ResourceFlags) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ResourceFlags) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ResourceFlags) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ResourceFlags) return ok @@ -1715,7 +1763,12 @@ func (_ *ResourcesData) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ResourcesData) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -1785,7 +1838,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Manager.UnmarshalMsg(bts) + bts, err = (*z).Manager.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Manager") return @@ -1793,7 +1846,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Reserve.UnmarshalMsg(bts) + bts, err = (*z).Reserve.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Reserve") return @@ -1801,7 +1854,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Freeze.UnmarshalMsg(bts) + bts, err = (*z).Freeze.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Freeze") return @@ -1809,7 +1862,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Clawback.UnmarshalMsg(bts) + bts, err = (*z).Clawback.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Clawback") return @@ -1849,7 +1902,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).KeyValue.UnmarshalMsg(bts) + bts, err = (*z).KeyValue.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "KeyValue") return @@ -1893,7 +1946,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).GlobalState.UnmarshalMsg(bts) + bts, err = (*z).GlobalState.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "GlobalState") return @@ -2025,25 +2078,25 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "h": - bts, err = (*z).Manager.UnmarshalMsg(bts) + bts, err = (*z).Manager.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Manager") return } case "i": - bts, err = (*z).Reserve.UnmarshalMsg(bts) + bts, err = (*z).Reserve.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Reserve") return } case "j": - bts, err = (*z).Freeze.UnmarshalMsg(bts) + bts, err = (*z).Freeze.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Freeze") return } case "k": - bts, err = (*z).Clawback.UnmarshalMsg(bts) + bts, err = (*z).Clawback.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Clawback") return @@ -2073,7 +2126,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "p": - bts, err = (*z).KeyValue.UnmarshalMsg(bts) + bts, err = (*z).KeyValue.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "KeyValue") return @@ -2111,7 +2164,7 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } case "s": - bts, err = (*z).GlobalState.UnmarshalMsg(bts) + bts, err = (*z).GlobalState.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "GlobalState") return @@ -2175,6 +2228,9 @@ func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ResourcesData) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ResourcesData) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ResourcesData) return ok @@ -2282,7 +2338,12 @@ func (_ *TxTailRound) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TxTailRound) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0004 int @@ -2311,7 +2372,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).TxnIDs = make([]transactions.Txid, zb0006) } for zb0001 := range (*z).TxnIDs { - bts, err = (*z).TxnIDs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).TxnIDs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "TxnIDs", zb0001) return @@ -2335,7 +2396,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).LastValid = make([]basics.Round, zb0008) } for zb0002 := range (*z).LastValid { - bts, err = (*z).LastValid[zb0002].UnmarshalMsg(bts) + bts, err = (*z).LastValid[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastValid", zb0002) return @@ -2359,7 +2420,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Leases = make([]TxTailRoundLease, zb0010) } for zb0003 := range (*z).Leases { - bts, err = (*z).Leases[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Leases[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Leases", zb0003) return @@ -2368,7 +2429,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0004 > 0 { zb0004-- - bts, err = (*z).Hdr.UnmarshalMsg(bts) + bts, err = (*z).Hdr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Hdr") return @@ -2413,7 +2474,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).TxnIDs = make([]transactions.Txid, zb0012) } for zb0001 := range (*z).TxnIDs { - bts, err = (*z).TxnIDs[zb0001].UnmarshalMsg(bts) + bts, err = (*z).TxnIDs[zb0001].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "TxnIDs", zb0001) return @@ -2435,7 +2496,7 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).LastValid = make([]basics.Round, zb0014) } for zb0002 := range (*z).LastValid { - bts, err = (*z).LastValid[zb0002].UnmarshalMsg(bts) + bts, err = (*z).LastValid[zb0002].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "LastValid", zb0002) return @@ -2457,14 +2518,14 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).Leases = make([]TxTailRoundLease, zb0016) } for zb0003 := range (*z).Leases { - bts, err = (*z).Leases[zb0003].UnmarshalMsg(bts) + bts, err = (*z).Leases[zb0003].UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Leases", zb0003) return } } case "h": - bts, err = (*z).Hdr.UnmarshalMsg(bts) + bts, err = (*z).Hdr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Hdr") return @@ -2482,6 +2543,9 @@ func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TxTailRound) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TxTailRound) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TxTailRound) return ok @@ -2571,7 +2635,12 @@ func (_ *TxTailRoundLease) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TxTailRoundLease) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TxTailRoundLease) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -2585,7 +2654,7 @@ func (z *TxTailRoundLease) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -2631,7 +2700,7 @@ func (z *TxTailRoundLease) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "s": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return @@ -2661,6 +2730,9 @@ func (z *TxTailRoundLease) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TxTailRoundLease) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TxTailRoundLease) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TxTailRoundLease) return ok diff --git a/network/msgp_gen.go b/network/msgp_gen.go index 8c32ee026f..df423c8746 100644 --- a/network/msgp_gen.go +++ b/network/msgp_gen.go @@ -13,6 +13,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -22,6 +23,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -31,6 +33,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -40,6 +43,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -49,6 +53,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -58,6 +63,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -67,6 +73,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -76,6 +83,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -98,7 +106,12 @@ func (_ disconnectReason) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *disconnectReason) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *disconnectReason) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -112,6 +125,9 @@ func (z *disconnectReason) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *disconnectReason) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *disconnectReason) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*disconnectReason) return ok @@ -180,7 +196,12 @@ func (_ *identityChallenge) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityChallenge) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityChallenge) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -194,7 +215,7 @@ func (z *identityChallenge) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0002 > 0 { zb0002-- - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Key") return @@ -250,7 +271,7 @@ func (z *identityChallenge) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "pk": - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Key") return @@ -290,6 +311,9 @@ func (z *identityChallenge) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *identityChallenge) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityChallenge) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityChallenge) return ok @@ -361,7 +385,12 @@ func (_ *identityChallengeResponse) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityChallengeResponse) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityChallengeResponse) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -375,7 +404,7 @@ func (z *identityChallengeResponse) UnmarshalMsg(bts []byte) (o []byte, err erro } if zb0003 > 0 { zb0003-- - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Key") return @@ -421,7 +450,7 @@ func (z *identityChallengeResponse) UnmarshalMsg(bts []byte) (o []byte, err erro } switch string(field) { case "pk": - bts, err = (*z).Key.UnmarshalMsg(bts) + bts, err = (*z).Key.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Key") return @@ -451,6 +480,9 @@ func (z *identityChallengeResponse) UnmarshalMsg(bts []byte) (o []byte, err erro return } +func (z *identityChallengeResponse) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityChallengeResponse) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityChallengeResponse) return ok @@ -515,7 +547,12 @@ func (_ *identityChallengeResponseSigned) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityChallengeResponseSigned) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -529,7 +566,7 @@ func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, er } if zb0001 > 0 { zb0001-- - bts, err = (*z).Msg.UnmarshalMsg(bts) + bts, err = (*z).Msg.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msg") return @@ -537,7 +574,7 @@ func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, er } if zb0001 > 0 { zb0001-- - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Signature") return @@ -567,13 +604,13 @@ func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, er } switch string(field) { case "icr": - bts, err = (*z).Msg.UnmarshalMsg(bts) + bts, err = (*z).Msg.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msg") return } case "sig": - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Signature") return @@ -591,6 +628,9 @@ func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, er return } +func (z *identityChallengeResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityChallengeResponseSigned) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityChallengeResponseSigned) return ok @@ -650,7 +690,12 @@ func (_ *identityChallengeSigned) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityChallengeSigned) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -664,7 +709,7 @@ func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).Msg.UnmarshalMsg(bts) + bts, err = (*z).Msg.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Msg") return @@ -672,7 +717,7 @@ func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) } if zb0001 > 0 { zb0001-- - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Signature") return @@ -702,13 +747,13 @@ func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) } switch string(field) { case "ic": - bts, err = (*z).Msg.UnmarshalMsg(bts) + bts, err = (*z).Msg.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Msg") return } case "sig": - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Signature") return @@ -726,6 +771,9 @@ func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *identityChallengeSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityChallengeSigned) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityChallengeSigned) return ok @@ -761,7 +809,12 @@ func (_ *identityChallengeValue) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityChallengeValue) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityChallengeValue) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- bts, err = msgp.ReadExactBytes(bts, (*z)[:]) if err != nil { err = msgp.WrapError(err) @@ -771,6 +824,9 @@ func (z *identityChallengeValue) UnmarshalMsg(bts []byte) (o []byte, err error) return } +func (z *identityChallengeValue) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityChallengeValue) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityChallengeValue) return ok @@ -822,7 +878,12 @@ func (_ *identityVerificationMessage) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityVerificationMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityVerificationMessage) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -884,6 +945,9 @@ func (z *identityVerificationMessage) UnmarshalMsg(bts []byte) (o []byte, err er return } +func (z *identityVerificationMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityVerificationMessage) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityVerificationMessage) return ok @@ -958,7 +1022,12 @@ func (_ *identityVerificationMessageSigned) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *identityVerificationMessageSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *identityVerificationMessageSigned) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0002 int @@ -1030,7 +1099,7 @@ func (z *identityVerificationMessageSigned) UnmarshalMsg(bts []byte) (o []byte, } if zb0002 > 0 { zb0002-- - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Signature") return @@ -1116,7 +1185,7 @@ func (z *identityVerificationMessageSigned) UnmarshalMsg(bts []byte) (o []byte, } } case "sig": - bts, err = (*z).Signature.UnmarshalMsg(bts) + bts, err = (*z).Signature.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Signature") return @@ -1134,6 +1203,9 @@ func (z *identityVerificationMessageSigned) UnmarshalMsg(bts []byte) (o []byte, return } +func (z *identityVerificationMessageSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *identityVerificationMessageSigned) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*identityVerificationMessageSigned) return ok diff --git a/node/msgp_gen.go b/node/msgp_gen.go index 146e8635bb..9d79065fe8 100644 --- a/node/msgp_gen.go +++ b/node/msgp_gen.go @@ -14,6 +14,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -23,6 +24,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -57,7 +59,12 @@ func (_ *netPrioResponse) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *netPrioResponse) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *netPrioResponse) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -139,6 +146,9 @@ func (z *netPrioResponse) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *netPrioResponse) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *netPrioResponse) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*netPrioResponse) return ok @@ -229,7 +239,12 @@ func (_ *netPrioResponseSigned) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *netPrioResponseSigned) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -321,7 +336,7 @@ func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -329,7 +344,7 @@ func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sender") return @@ -337,7 +352,7 @@ func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -443,19 +458,19 @@ func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { } } case "Round": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "Sender": - bts, err = (*z).Sender.UnmarshalMsg(bts) + bts, err = (*z).Sender.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sender") return } case "Sig": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -473,6 +488,9 @@ func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *netPrioResponseSigned) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *netPrioResponseSigned) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*netPrioResponseSigned) return ok diff --git a/protocol/msgp_gen.go b/protocol/msgp_gen.go index db191f018d..d2c7c1a2e1 100644 --- a/protocol/msgp_gen.go +++ b/protocol/msgp_gen.go @@ -11,6 +11,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -20,6 +21,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -29,6 +31,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -38,6 +41,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -47,6 +51,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -56,6 +61,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -65,6 +71,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -87,7 +94,12 @@ func (_ ConsensusVersion) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *ConsensusVersion) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *ConsensusVersion) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string var zb0002 int @@ -111,6 +123,9 @@ func (z *ConsensusVersion) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *ConsensusVersion) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *ConsensusVersion) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*ConsensusVersion) return ok @@ -149,7 +164,12 @@ func (_ Error) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Error) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Error) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -163,6 +183,9 @@ func (z *Error) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Error) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Error) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Error) return ok @@ -201,7 +224,12 @@ func (_ HashID) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *HashID) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *HashID) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -215,6 +243,9 @@ func (z *HashID) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *HashID) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *HashID) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*HashID) return ok @@ -253,7 +284,12 @@ func (_ NetworkID) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *NetworkID) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *NetworkID) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -267,6 +303,9 @@ func (z *NetworkID) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *NetworkID) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *NetworkID) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*NetworkID) return ok @@ -305,7 +344,12 @@ func (_ StateProofType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *StateProofType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *StateProofType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 uint64 zb0001, bts, err = msgp.ReadUint64Bytes(bts) @@ -319,6 +363,9 @@ func (z *StateProofType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *StateProofType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *StateProofType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*StateProofType) return ok @@ -357,7 +404,12 @@ func (_ Tag) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *Tag) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *Tag) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) @@ -371,6 +423,9 @@ func (z *Tag) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *Tag) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *Tag) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*Tag) return ok @@ -409,7 +464,12 @@ func (_ TxType) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *TxType) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *TxType) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- { var zb0001 string var zb0002 int @@ -433,6 +493,9 @@ func (z *TxType) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *TxType) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *TxType) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*TxType) return ok diff --git a/protocol/test/msgp_gen.go b/protocol/test/msgp_gen.go index 518afb1cb7..b7500acdd9 100644 --- a/protocol/test/msgp_gen.go +++ b/protocol/test/msgp_gen.go @@ -11,6 +11,7 @@ import ( // |-----> MarshalMsg // |-----> CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> Msgsize // |-----> MsgIsZero @@ -40,7 +41,12 @@ func (_ testSlice) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *testSlice) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *testSlice) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var zb0002 int var zb0003 bool zb0002, zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) @@ -71,6 +77,9 @@ func (z *testSlice) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *testSlice) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *testSlice) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*testSlice) return ok diff --git a/rpcs/msgp_gen.go b/rpcs/msgp_gen.go index 5f8af433f7..4e091781cd 100644 --- a/rpcs/msgp_gen.go +++ b/rpcs/msgp_gen.go @@ -14,6 +14,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -39,7 +40,12 @@ func (_ *EncodedBlockCert) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *EncodedBlockCert) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -53,7 +59,7 @@ func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Block.UnmarshalMsg(bts) + bts, err = (*z).Block.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Block") return @@ -61,7 +67,7 @@ func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Certificate.UnmarshalMsg(bts) + bts, err = (*z).Certificate.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Certificate") return @@ -91,13 +97,13 @@ func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "block": - bts, err = (*z).Block.UnmarshalMsg(bts) + bts, err = (*z).Block.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Block") return } case "cert": - bts, err = (*z).Certificate.UnmarshalMsg(bts) + bts, err = (*z).Certificate.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Certificate") return @@ -115,6 +121,9 @@ func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *EncodedBlockCert) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *EncodedBlockCert) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*EncodedBlockCert) return ok diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index f2f5401fe2..ba43b37f60 100644 --- a/scripts/buildtools/versions +++ b/scripts/buildtools/versions @@ -1,6 +1,6 @@ golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/tools v0.9.3 -github.com/algorand/msgp v1.1.55 +github.com/algorand/msgp v1.1.60 github.com/algorand/oapi-codegen v1.12.0-algorand.0 github.com/go-swagger/go-swagger v0.30.4 gotest.tools/gotestsum v1.10.0 diff --git a/stateproof/msgp_gen.go b/stateproof/msgp_gen.go index 11ad409337..f7a04efecd 100644 --- a/stateproof/msgp_gen.go +++ b/stateproof/msgp_gen.go @@ -19,6 +19,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -28,6 +29,7 @@ import ( // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg // |-----> (*) UnmarshalMsg +// |-----> (*) UnmarshalMsgWithState // |-----> (*) CanUnmarshalMsg // |-----> (*) Msgsize // |-----> (*) MsgIsZero @@ -80,7 +82,12 @@ func (_ *sigFromAddr) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *sigFromAddr) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0001 int @@ -94,7 +101,7 @@ func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).SignerAddress.UnmarshalMsg(bts) + bts, err = (*z).SignerAddress.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "SignerAddress") return @@ -102,7 +109,7 @@ func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return @@ -110,7 +117,7 @@ func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Sig") return @@ -140,19 +147,19 @@ func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { } switch string(field) { case "a": - bts, err = (*z).SignerAddress.UnmarshalMsg(bts) + bts, err = (*z).SignerAddress.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "SignerAddress") return } case "r": - bts, err = (*z).Round.UnmarshalMsg(bts) + bts, err = (*z).Round.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Round") return } case "s": - bts, err = (*z).Sig.UnmarshalMsg(bts) + bts, err = (*z).Sig.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Sig") return @@ -170,6 +177,9 @@ func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *sigFromAddr) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *sigFromAddr) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*sigFromAddr) return ok @@ -266,7 +276,12 @@ func (_ *spProver) CanMarshalMsg(z interface{}) bool { } // UnmarshalMsg implements msgp.Unmarshaler -func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { +func (z *spProver) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error) { + if st.AllowableDepth == 0 { + err = msgp.ErrMaxDepthExceeded{} + return + } + st.AllowableDepth-- var field []byte _ = field var zb0003 int @@ -290,7 +305,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Prover == nil { (*z).Prover = new(stateproof.Prover) } - bts, err = (*z).Prover.UnmarshalMsg(bts) + bts, err = (*z).Prover.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Prover") return @@ -320,7 +335,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 uint64 zb0005-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "AddrToPos") return @@ -335,7 +350,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).VotersHdr.UnmarshalMsg(bts) + bts, err = (*z).VotersHdr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "VotersHdr") return @@ -343,7 +358,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0003 > 0 { zb0003-- - bts, err = (*z).Message.UnmarshalMsg(bts) + bts, err = (*z).Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Message") return @@ -383,7 +398,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { if (*z).Prover == nil { (*z).Prover = new(stateproof.Prover) } - bts, err = (*z).Prover.UnmarshalMsg(bts) + bts, err = (*z).Prover.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Prover") return @@ -411,7 +426,7 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { var zb0001 basics.Address var zb0002 uint64 zb0007-- - bts, err = zb0001.UnmarshalMsg(bts) + bts, err = zb0001.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "AddrToPos") return @@ -424,13 +439,13 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { (*z).AddrToPos[zb0001] = zb0002 } case "hdr": - bts, err = (*z).VotersHdr.UnmarshalMsg(bts) + bts, err = (*z).VotersHdr.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "VotersHdr") return } case "msg": - bts, err = (*z).Message.UnmarshalMsg(bts) + bts, err = (*z).Message.UnmarshalMsgWithState(bts, st) if err != nil { err = msgp.WrapError(err, "Message") return @@ -448,6 +463,9 @@ func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { return } +func (z *spProver) UnmarshalMsg(bts []byte) (o []byte, err error) { + return z.UnmarshalMsgWithState(bts, msgp.DefaultUnmarshalState) +} func (_ *spProver) CanUnmarshalMsg(z interface{}) bool { _, ok := (z).(*spProver) return ok diff --git a/tools/block-generator/go.mod b/tools/block-generator/go.mod index 139c8fa164..212ceed63d 100644 --- a/tools/block-generator/go.mod +++ b/tools/block-generator/go.mod @@ -19,7 +19,7 @@ require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/algorand/falcon v0.1.0 // indirect github.com/algorand/go-sumhash v0.1.0 // indirect - github.com/algorand/msgp v1.1.55 // indirect + github.com/algorand/msgp v1.1.60 // indirect github.com/algorand/oapi-codegen v1.12.0-algorand.0 // indirect github.com/algorand/sortition v1.0.0 // indirect github.com/algorand/websocket v1.4.6 // indirect diff --git a/tools/block-generator/go.sum b/tools/block-generator/go.sum index e8e54875fc..6c6aeda101 100644 --- a/tools/block-generator/go.sum +++ b/tools/block-generator/go.sum @@ -64,8 +64,8 @@ github.com/algorand/go-deadlock v0.2.3 h1:ek9rjUyUF1HhUm0I2DyaCN8+3S850ONJNl5jQr github.com/algorand/go-deadlock v0.2.3/go.mod h1:Gli2d0Cb7kgXzSpJLC4Vn0DCLgjNVi6fNldY/mOtO/U= github.com/algorand/go-sumhash v0.1.0 h1:b/QRhyLuF//vOcicBIxBXYW8bERNoeLxieht/dUYpVg= github.com/algorand/go-sumhash v0.1.0/go.mod h1:OOe7jdDWUhLkuP1XytkK5gnLu9entAviN5DfDZh6XAc= -github.com/algorand/msgp v1.1.55 h1:kWc9Xc08xtxCTWUiq1cRW5XGF+DFcfSGihYf0IZ/ivs= -github.com/algorand/msgp v1.1.55/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= +github.com/algorand/msgp v1.1.60 h1:+IVUC34+tSj1P2M1mkYtl4GLyfzdzXfBLSw6TDT19M8= +github.com/algorand/msgp v1.1.60/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= github.com/algorand/oapi-codegen v1.12.0-algorand.0 h1:W9PvED+wAJc+9EeXPONnA+0zE9UhynEqoDs4OgAxKhk= github.com/algorand/oapi-codegen v1.12.0-algorand.0/go.mod h1:tIWJ9K/qrLDVDt5A1p82UmxZIEGxv2X+uoujdhEAL48= github.com/algorand/sortition v1.0.0 h1:PJiZtdSTBm4nArQrZXBnhlljHXhuyAXRJBqVWowQu3E=